Skip to content

Commit 59b44ea

Browse files
OrlovEIkuba-moo
authored andcommitted
net: marvell: prestera: Add length macros for prestera_ip_addr
Add macros to determine IP address length (internal driver types). This will be used in next patches for nexthops logic. Co-developed-by: Taras Chornyi <[email protected]> Signed-off-by: Taras Chornyi <[email protected]> Co-developed-by: Oleksandr Mazur <[email protected]> Signed-off-by: Oleksandr Mazur <[email protected]> Signed-off-by: Yevhen Orlov <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 90b6f9c commit 59b44ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/marvell/prestera/prestera_router_hw.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ struct prestera_ip_addr {
3131
PRESTERA_IPV4 = 0,
3232
PRESTERA_IPV6
3333
} v;
34+
#define PRESTERA_IP_ADDR_PLEN(V) ((V) == PRESTERA_IPV4 ? 32 : \
35+
/* (V) == PRESTERA_IPV6 ? */ 128 /* : 0 */)
3436
};
3537

3638
struct prestera_nh_neigh_key {

0 commit comments

Comments
 (0)