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 <tchornyi@marvell.com> Signed-off-by: Taras Chornyi <tchornyi@marvell.com> Co-developed-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu> Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu> Signed-off-by: Yevhen Orlov <yevhen.orlov@plvision.eu> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
90b6f9c098
commit
59b44ea8aa
|
@ -31,6 +31,8 @@ struct prestera_ip_addr {
|
|||
PRESTERA_IPV4 = 0,
|
||||
PRESTERA_IPV6
|
||||
} v;
|
||||
#define PRESTERA_IP_ADDR_PLEN(V) ((V) == PRESTERA_IPV4 ? 32 : \
|
||||
/* (V) == PRESTERA_IPV6 ? */ 128 /* : 0 */)
|
||||
};
|
||||
|
||||
struct prestera_nh_neigh_key {
|
||||
|
|
Loading…
Reference in New Issue