#ifndef TRIE_H #define TRIE_H #include extern void trie_addr_lookup(char *buff, size_t len, int ipv4, int *fd, struct sockaddr_storage *addr, size_t *alen); extern int trie_addr_maybe_update(char *buff, size_t len, int ipv4, int fd, struct sockaddr_storage *addr, size_t alen); extern void trie_addr_remove(int fd); extern void trie_addr_remove_addr(struct sockaddr_storage *addr, size_t alen); extern void trie_init(void); extern void trie_cleanup(void); #endif /* TRIE_H */ tory'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2016-09-22 20:01:47 +0300
committerDavid S. Miller <davem@davemloft.net>2016-09-23 07:22:12 -0400
commitf5f82476090fd2c6fc4fde03ba61aef984900009 (patch)
tree05ed7848e3f5e57cb072e560b0f2c5963e227e32
parent8515c581dfa574420559d8cef24c2ba24e8eb8dd (diff)
net/mlx5: E-Switch, Support VLAN actions in the offloads mode
Many virtualization systems use a policy under which a vlan tag is pushed to packets sent by guests, and popped before the packet is forwarded to the VM. The current generation of the mlx5 HW doesn't fully support that on a per flow level. As such, we are addressing the above common use case with the SRIOV e-Switch abilities to push vlan into packets sent by VFs and pop vlan from packets forwarded to VFs. The HW can match on the correct vlan being present in packets forwarded to VFs (eSwitch steering is done before stripping the tag), so this part is offloaded as is. A common practice for vlans is to avoid both push vlan and pop vlan for inter-host VM/VM (east-west) communication because in this case, push on egress cancels out with pop on ingress. For supporting that, we use a global eswitch vlan pop policy, hence allowing guest A to communicate with both remote VM B and local VM C. This works since the HW pops the vlan only if it exists (e.g for C --> A packets but not for B --> A packets). On the slow path, when a VF vport has an offloaded flow which involves pushing vlans, wheres another flow is not currently offloaded, the packets from the 2nd flow seen by the VF representor on the host have vlan. The VF rep driver removes such vlan before calling into the host networking stack. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>