ice: Add support for VLANs and offloads
This patch adds support for VLANs. When a VLAN is created a switch filter
is added to direct the VLAN traffic to the corresponding VSI. When a VLAN
is deleted, the filter is deleted as well.
This patch also adds support for the following hardware offloads.
1) VLAN tag insertion/stripping
2) Receive Side Scaling (RSS)
3) Tx checksum and TCP segmentation
4) Rx checksum
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
committed by
Jeff Kirsher
parent
2b245cb294
commit
d76a60ba7a
@@ -28,6 +28,12 @@
|
||||
((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
|
||||
(R)->next_to_clean - (R)->next_to_use - 1)
|
||||
|
||||
#define ICE_TX_FLAGS_TSO BIT(0)
|
||||
#define ICE_TX_FLAGS_HW_VLAN BIT(1)
|
||||
#define ICE_TX_FLAGS_SW_VLAN BIT(2)
|
||||
#define ICE_TX_FLAGS_VLAN_M 0xffff0000
|
||||
#define ICE_TX_FLAGS_VLAN_S 16
|
||||
|
||||
struct ice_tx_buf {
|
||||
struct ice_tx_desc *next_to_watch;
|
||||
struct sk_buff *skb;
|
||||
@@ -38,6 +44,17 @@ struct ice_tx_buf {
|
||||
DEFINE_DMA_UNMAP_LEN(len);
|
||||
};
|
||||
|
||||
struct ice_tx_offload_params {
|
||||
u8 header_len;
|
||||
u32 td_cmd;
|
||||
u32 td_offset;
|
||||
u32 td_l2tag1;
|
||||
u16 cd_l2tag2;
|
||||
u32 cd_tunnel_params;
|
||||
u64 cd_qw1;
|
||||
struct ice_ring *tx_ring;
|
||||
};
|
||||
|
||||
struct ice_rx_buf {
|
||||
struct sk_buff *skb;
|
||||
dma_addr_t dma;
|
||||
|
||||
Reference in New Issue
Block a user