summaryrefslogtreecommitdiffstats
path: root/drivers/net/vrf.c
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2016-06-13 20:14:12 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-15 17:03:48 -0400
commit7889681f4a6c2148e1245604bac751a1cae8f882 (patch)
tree699152a0f30683a142af8f221c61b1d71b66e44f /drivers/net/vrf.c
parentdf10db98ab546e899b79d1b2b8a00a86fe8bb29d (diff)
net: vrf: Update flags and features settings
1. Default VRF devices to not having a qdisc (IFF_NO_QUEUE). Users can add one as desired. 2. Disable adding a VLAN to a VRF device. 3. Enable offloads and hardware features similar to other logical devices (e.g., dummy, veth) Change provides a significant boost in TCP stream Tx performance, from ~2,700 Mbps to ~18,100 Mbps and makes throughput close to the performance without a VRF (18,500 Mbps). netperf TCP_STREAM benchmark using qemu with virtio+vhost for the NICs Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r--drivers/net/vrf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 0b5b3c258c2b..e3fc6d32a289 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1099,6 +1099,20 @@ static void vrf_setup(struct net_device *dev)
1099 1099
1100 /* don't allow vrf devices to change network namespaces. */ 1100 /* don't allow vrf devices to change network namespaces. */
1101 dev->features |= NETIF_F_NETNS_LOCAL; 1101 dev->features |= NETIF_F_NETNS_LOCAL;
1102
1103 /* does not make sense for a VLAN to be added to a vrf device */
1104 dev->features |= NETIF_F_VLAN_CHALLENGED;
1105
1106 /* enable offload features */
1107 dev->features |= NETIF_F_GSO_SOFTWARE;
1108 dev->features |= NETIF_F_RXCSUM | NETIF_F_HW_CSUM;
1109 dev->features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA;
1110
1111 dev->hw_features = dev->features;
1112 dev->hw_enc_features = dev->features;
1113
1114 /* default to no qdisc; user can add if desired */
1115 dev->priv_flags |= IFF_NO_QUEUE;
1102} 1116}
1103 1117
1104static int vrf_validate(struct nlattr *tb[], struct nlattr *data[]) 1118static int vrf_validate(struct nlattr *tb[], struct nlattr *data[])