diff options
author | Yotam Gigi <yotamg@mellanox.com> | 2017-10-03 10:58:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-03 20:06:30 +0300 |
commit | a5bc9294d70fe85729bb343eef281ccbe78ff119 (patch) | |
tree | 5e122c80aafdc2c30baed336b36663a3af4056e4 /crypto/jitterentropy-kcapi.c | |
parent | 5d8b3e69fc5e5ccafc9db1251bb7c78a8622fddd (diff) | |
download | linux-a5bc9294d70fe85729bb343eef281ccbe78ff119.tar.xz |
ipv4: ipmr: Don't forward packets already forwarded by hardware
Change the ipmr module to not forward packets if:
- The packet is marked with the offload_mr_fwd_mark, and
- Both input interface and output interface share the same parent ID.
This way, a packet can go through partial multicast forwarding in the
hardware, where it will be forwarded only to the devices that share the
same parent ID (AKA, reside inside the same hardware). The kernel will
forward the packet to all other interfaces.
To do this, add the ipmr_offload_forward helper, which per skb, ingress VIF
and egress VIF, returns whether the forwarding was offloaded to hardware.
The ipmr_queue_xmit frees the skb and does not forward it if the result is
a true value.
All the forwarding path code compiles out when the CONFIG_NET_SWITCHDEV is
not set.
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/jitterentropy-kcapi.c')
0 files changed, 0 insertions, 0 deletions