Skip to content

Commit

Permalink
qede: Add slowpath/fastpath support and enable hardware GRO
Browse files Browse the repository at this point in the history
This patch configures hardware to use GRO and adds support
for fastpath APIs to handle HW aggregated packets.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Manish Chopra authored and David S. Miller committed Mar 7, 2016
1 parent 088c861 commit 55482ed
Show file tree
Hide file tree
Showing 2 changed files with 388 additions and 1 deletion.
22 changes: 22 additions & 0 deletions drivers/net/ethernet/qlogic/qede/qede.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ struct qede_dev {
u16 q_num_rx_buffers; /* Must be a power of two */
u16 q_num_tx_buffers; /* Must be a power of two */

bool gro_disable;
struct list_head vlan_list;
u16 configured_vlans;
u16 non_configured_vlans;
Expand Down Expand Up @@ -188,6 +189,24 @@ struct sw_rx_data {
unsigned int page_offset;
};

enum qede_agg_state {
QEDE_AGG_STATE_NONE = 0,
QEDE_AGG_STATE_START = 1,
QEDE_AGG_STATE_ERROR = 2
};

struct qede_agg_info {
struct sw_rx_data replace_buf;
dma_addr_t replace_buf_mapping;
struct sw_rx_data start_buf;
dma_addr_t start_buf_mapping;
struct eth_fast_path_rx_tpa_start_cqe start_cqe;
enum qede_agg_state agg_state;
struct sk_buff *skb;
int frag_id;
u16 vlan_tag;
};

struct qede_rx_queue {
__le16 *hw_cons_ptr;
struct sw_rx_data *sw_rx_ring;
Expand All @@ -197,6 +216,9 @@ struct qede_rx_queue {
struct qed_chain rx_comp_ring;
void __iomem *hw_rxq_prod_addr;

/* GRO */
struct qede_agg_info tpa_info[ETH_TPA_MAX_AGGS_NUM];

int rx_buf_size;
unsigned int rx_buf_seg_size;

Expand Down
Loading

0 comments on commit 55482ed

Please sign in to comment.