diff options
author | Ilya Lesokhin <ilyal@mellanox.com> | 2018-04-30 10:16:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-01 09:42:46 -0400 |
commit | ebf4e808fa0b22e551baf862e17c26c325c068f4 (patch) | |
tree | b2e673a3847e61d60a6ce2e50860bdba771202e5 /net | |
parent | 08303c189581c985e60f588ad92a041e46b6e307 (diff) | |
download | linux-ebf4e808fa0b22e551baf862e17c26c325c068f4.tar.bz2 |
net: Add Software fallback infrastructure for socket dependent offloads
With socket dependent offloads we rely on the netdev to transform
the transmitted packets before sending them to the wire.
When a packet from an offloaded socket is rerouted to a different
device we need to detect it and do the transformation in software.
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/Kconfig | 3 | ||||
-rw-r--r-- | net/core/dev.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/net/Kconfig b/net/Kconfig index 6fa1a4493b8c..b62089fb1332 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -407,6 +407,9 @@ config GRO_CELLS bool default n +config SOCK_VALIDATE_XMIT + bool + config NET_DEVLINK tristate "Network physical/parent device Netlink interface" help diff --git a/net/core/dev.c b/net/core/dev.c index e01c21a88cae..8944e1e0059d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3112,6 +3112,10 @@ static struct sk_buff *validate_xmit_skb(struct sk_buff *skb, struct net_device if (unlikely(!skb)) goto out_null; + skb = sk_validate_xmit_skb(skb, dev); + if (unlikely(!skb)) + goto out_null; + if (netif_needs_gso(skb, features)) { struct sk_buff *segs; |