ipvlan: implement VEPA mode
This is very similar to the Macvlan VEPA mode, however, there is some difference. IPvlan uses the mac-address of the lower device, so the VEPA mode has implications of ICMP-redirects for packets destined for its immediate neighbors sharing same master since the packets will have same source and dest mac. The external switch/router will send redirect msg. Having said that, this will be useful tool in terms of debugging since IPvlan will not switch packets within its slaves and rely completely on the external entity as intended in 802.1Qbg. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a190d04db9
commit
fe89aa6b25
@@ -139,6 +139,21 @@ static inline void ipvlan_clear_private(struct ipvl_port *port)
|
||||
port->flags &= ~IPVLAN_F_PRIVATE;
|
||||
}
|
||||
|
||||
static inline bool ipvlan_is_vepa(const struct ipvl_port *port)
|
||||
{
|
||||
return !!(port->flags & IPVLAN_F_VEPA);
|
||||
}
|
||||
|
||||
static inline void ipvlan_mark_vepa(struct ipvl_port *port)
|
||||
{
|
||||
port->flags |= IPVLAN_F_VEPA;
|
||||
}
|
||||
|
||||
static inline void ipvlan_clear_vepa(struct ipvl_port *port)
|
||||
{
|
||||
port->flags &= ~IPVLAN_F_VEPA;
|
||||
}
|
||||
|
||||
void ipvlan_init_secret(void);
|
||||
unsigned int ipvlan_mac_hash(const unsigned char *addr);
|
||||
rx_handler_result_t ipvlan_handle_frame(struct sk_buff **pskb);
|
||||
|
Reference in New Issue
Block a user