cxgb4: enable inner header checksum calculation
Subsystems (3)
PATCH 2/3 cxgb4: enable inner header checksum calculation
set cntrl bits to indicate whether inner header checksum needs to be calculated whenever the packet is an encapsulated packet and enable supported encap features.
Fixes d0a1299c6bf7 ("cxgb4: add support for vxlan segmentation offload")
Signed-off-by Ganesh Goudar <[email protected]>
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 9 ++- drivers/net/ethernet/chelsio/cxgb4/sge.c | 91 +++++++++++++++++++------ drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 5 ++ 3 files changed, 83 insertions(+), 22 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +8 -1
@@ -5636,8 +5636,15 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_HW_VLAN_CTAG_TX |NETIF_F_HW_VLAN_CTAG_RX |NETIF_F_HW_TC ; -if (CHELSIO_CHIP_VERSION (chip) >CHELSIO_T5 ) +if (CHELSIO_CHIP_VERSION (chip) >CHELSIO_T5 ) { + netdev->hw_enc_features |=NETIF_F_IP_CSUM | +NETIF_F_IPV6_CSUM | +NETIF_F_RXCSUM | +NETIF_F_GSO_UDP_TUNNEL | +NETIF_F_TSO |NETIF_F_TSO6 ; + netdev->hw_features |=NETIF_F_GSO_UDP_TUNNEL ; + }if (highdma) netdev->hw_features |=NETIF_F_HIGHDMA ;
drivers/net/ethernet/chelsio/cxgb4/sge.c +70 -21
176 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/t4_msg.h +5 -0
@@ -1233,6 +1233,11 @@ struct cpl_rx_pkt {#define T6_COMPR_RXERR_SUM_V (x) ((x) << T6_COMPR_RXERR_SUM_S)#define T6_COMPR_RXERR_SUM_F T6_COMPR_RXERR_SUM_V(1U) +#define T6_RX_TNLHDR_LEN_S 8 +#define T6_RX_TNLHDR_LEN_M 0xFF +#define T6_RX_TNLHDR_LEN_V (x) ((x) << T6_RX_TNLHDR_LEN_S) +#define T6_RX_TNLHDR_LEN_G (x) (((x) >> T6_RX_TNLHDR_LEN_S) & T6_RX_TNLHDR_LEN_M) +struct cpl_trace_pkt {u8 opcode;u8 intf;
Signature · 1 line
2.1.0
From: Ganesh Goudar <[email protected]>
Date: Fri, 11 May 2018 18:35:33 +0530
Quoted 6 lines
set cntrl bits to indicate whether inner header checksum needs to be calculated whenever the packet is an encapsulated packet and enable supported encap features.
Fixes d0a1299c6bf7 ("cxgb4: add support for vxlan segmentation offload")Signed-off-by Ganesh Goudar <[email protected]>
Applied.