Skip to content

Commit 152971e

Browse files
Alexander Duyckdavem330
authored andcommitted
bnxt: Add support for segmentation of tunnels with outer checksums
This patch assumes that the bnxt hardware will ignore existing IPv4/v6 header fields for length and checksum as well as the length and checksum fields for outer UDP and GRE headers. I have been told by Michael Chan that this is working. Though this might be somewhat redundant for IPv6 as they are forcing the checksum to be computed for all IPv6 frames that are offloaded. A follow-up patch may be necessary in order to fix this as it is essentially mangling the outer IPv6 headers to add a checksum where none was requested. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f3ed653 commit 152971e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • drivers/net/ethernet/broadcom/bnxt

‎drivers/net/ethernet/broadcom/bnxt/bnxt.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6219,14 +6219,19 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
62196219
NETIF_F_TSO | NETIF_F_TSO6 |
62206220
NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_GRE |
62216221
NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |
6222-
NETIF_F_RXHASH |
6222+
NETIF_F_GSO_UDP_TUNNEL_CSUM | NETIF_F_GSO_GRE_CSUM |
6223+
NETIF_F_GSO_PARTIAL | NETIF_F_RXHASH |
62236224
NETIF_F_RXCSUM | NETIF_F_LRO | NETIF_F_GRO;
62246225

62256226
dev->hw_enc_features =
62266227
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_SG |
62276228
NETIF_F_TSO | NETIF_F_TSO6 |
62286229
NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_GRE |
6229-
NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT;
6230+
NETIF_F_GSO_UDP_TUNNEL_CSUM | NETIF_F_GSO_GRE_CSUM |
6231+
NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |
6232+
NETIF_F_GSO_PARTIAL;
6233+
dev->gso_partial_features = NETIF_F_GSO_UDP_TUNNEL_CSUM |
6234+
NETIF_F_GSO_GRE_CSUM;
62306235
dev->vlan_features = dev->hw_features | NETIF_F_HIGHDMA;
62316236
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX |
62326237
NETIF_F_HW_VLAN_STAG_RX | NETIF_F_HW_VLAN_STAG_TX;

0 commit comments

Comments
 (0)