Skip to content

Commit 55482ed

Browse files
Manish Chopradavem330
authored andcommitted
qede: Add slowpath/fastpath support and enable hardware GRO
This patch configures hardware to use GRO and adds support for fastpath APIs to handle HW aggregated packets. Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: Manish Chopra <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 088c861 commit 55482ed

File tree

2 files changed

+388
-1
lines changed

2 files changed

+388
-1
lines changed

drivers/net/ethernet/qlogic/qede/qede.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ struct qede_dev {
160160
u16 q_num_rx_buffers; /* Must be a power of two */
161161
u16 q_num_tx_buffers; /* Must be a power of two */
162162

163+
bool gro_disable;
163164
struct list_head vlan_list;
164165
u16 configured_vlans;
165166
u16 non_configured_vlans;
@@ -188,6 +189,24 @@ struct sw_rx_data {
188189
unsigned int page_offset;
189190
};
190191

192+
enum qede_agg_state {
193+
QEDE_AGG_STATE_NONE = 0,
194+
QEDE_AGG_STATE_START = 1,
195+
QEDE_AGG_STATE_ERROR = 2
196+
};
197+
198+
struct qede_agg_info {
199+
struct sw_rx_data replace_buf;
200+
dma_addr_t replace_buf_mapping;
201+
struct sw_rx_data start_buf;
202+
dma_addr_t start_buf_mapping;
203+
struct eth_fast_path_rx_tpa_start_cqe start_cqe;
204+
enum qede_agg_state agg_state;
205+
struct sk_buff *skb;
206+
int frag_id;
207+
u16 vlan_tag;
208+
};
209+
191210
struct qede_rx_queue {
192211
__le16 *hw_cons_ptr;
193212
struct sw_rx_data *sw_rx_ring;
@@ -197,6 +216,9 @@ struct qede_rx_queue {
197216
struct qed_chain rx_comp_ring;
198217
void __iomem *hw_rxq_prod_addr;
199218

219+
/* GRO */
220+
struct qede_agg_info tpa_info[ETH_TPA_MAX_AGGS_NUM];
221+
200222
int rx_buf_size;
201223
unsigned int rx_buf_seg_size;
202224

0 commit comments

Comments
 (0)