Skip to contentSkip to conversation

example: enable zero-copy support in ixgbe

PATCH Superseded Shirley Ma 1 participant 1 message May 16, 2011

Subsystems (3)

v5 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Shirley Ma

author
#0 lore raw

PATCH v5 6/6 example: enable zero-copy support in ixgbe

Device can enable zero-copy flag when HIGHDMA is supported.

---

 drivers/net/ixgbe/ixgbe_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +4 -0
index 2dce3d0..7e9e881 100644
@@ -7553,6 +7553,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
 		netdev->vlan_features |= NETIF_F_HIGHDMA;
 	}
 
+	/* enable zero-copy when device supports HIGHDMA */
+	if (netdev->features & NETIF_F_HIGHDMA)
+		netdev->features |= NETIF_F_ZEROCOPY;
+
 	if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
 		netdev->features |= NETIF_F_LRO;