igc: Add tx_csum offload functionality
Subsystems (2)
PATCH 1/1 igc: Add tx_csum offload functionality
Add ip generic TX checksum offload functionality.
Signed-off-by Sasha Neftin <[email protected]>
--- drivers/net/ethernet/intel/igc/igc.h | 4 ++ drivers/net/ethernet/intel/igc/igc_base.h | 8 +++ drivers/net/ethernet/intel/igc/igc_defines.h | 5 ++ drivers/net/ethernet/intel/igc/igc_main.c | 97 ++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+)
drivers/net/ethernet/intel/igc/igc.h +4 -0
@@ -135,6 +135,9 @@ extern char igc_driver_version[];/* How many Rx Buffers do we bundle into one write to the hardware ? */ #define IGC_RX_BUFFER_WRITE 16/* Must be power of 2 */ +/* VLAN info */ +#define IGC_TX_FLAGS_VLAN_MASK 0xffff0000 +/* igc_test_staterr - tests bits within Rx descriptor status and error fields */ static inline __le32 igc_test_staterr (union igc_adv_rx_desc *rx_desc,const u32 stat_err_bits)
@@ -254,6 +257,7 @@ struct igc_ring {u16 count;/* number of desc. in the ring */ u8 queue_index;/* logical index of the ring*/ u8 reg_idx;/* physical index of the ring */ +bool launchtime_enable;/* true if LaunchTime is enabled */ /* everything past this point are written often */ u16 next_to_clean;
drivers/net/ethernet/intel/igc/igc_base.h +8 -0
@@ -22,6 +22,14 @@ union igc_adv_tx_desc { } wb; }; +/* Context descriptors */ +struct igc_adv_tx_context_desc { +__le32 vlan_macip_lens; +__le32 launch_time; +__le32 type_tucmd_mlhl; +__le32 mss_l4len_idx; +}; +/* Adv Transmit Descriptor Config Masks */ #define IGC_ADVTXD_MAC_TSTAMP 0x00080000/* IEEE1588 Timestamp packet */ #define IGC_ADVTXD_DTYP_CTXT 0x00200000/* Advanced Context Descriptor */
drivers/net/ethernet/intel/igc/igc_defines.h +5 -0
@@ -397,4 +397,9 @@#define IGC_VLAPQF_P_VALID (_n) (0x1 << (3 + (_n) * 4))#define IGC_VLAPQF_QUEUE_MASK 0x03 +#define IGC_ADVTXD_MACLEN_SHIFT 9/* Adv ctxt desc mac len shift */ +#define IGC_ADVTXD_TUCMD_IPV4 0x00000400/* IP Packet Type:1=IPv4 */ +#define IGC_ADVTXD_TUCMD_L4T_TCP 0x00000800/* L4 Packet Type of TCP */ +#define IGC_ADVTXD_TUCMD_L4T_SCTP 0x00001000/* L4 packet TYPE of SCTP */ +#endif /* _IGC_DEFINES_H_ */
drivers/net/ethernet/intel/igc/igc_main.c +97 -0
123 lines not on this page · raw message
Signature · 1 line
2.11.0
Brown
PATCH 1/1 igc: Add tx_csum offload functionality
Quoted 8 lines
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Sasha Neftin
Sent: Wednesday, August 7, 2019 11:12 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v1] igc: Addtx_csumoffload functionalityAdd ip generic TX checksum offload functionality.
Quoted 9 lines
Signed-off-by Sasha Neftin <[email protected]>--- drivers/net/ethernet/intel/igc/igc.h | 4 ++ drivers/net/ethernet/intel/igc/igc_base.h | 8 +++ drivers/net/ethernet/intel/igc/igc_defines.h | 5 ++ drivers/net/ethernet/intel/igc/igc_main.c | 97 ++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+)
Tested-by Aaron Brown <[email protected]>