qed: LL2 to use packed information for tx
First step in revising the LL2 interface, this declares qed_ll2_tx_pkt_info as part of the ll2 interface, and uses it for transmission instead of receiving lots of parameters. Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5189c55506
commit
7c7973b2ae
4 changed files with 102 additions and 111 deletions
|
|
@ -43,6 +43,18 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/qed/qed_if.h>
|
||||
|
||||
enum qed_ll2_roce_flavor_type {
|
||||
QED_LL2_ROCE,
|
||||
QED_LL2_RROCE,
|
||||
MAX_QED_LL2_ROCE_FLAVOR_TYPE
|
||||
};
|
||||
|
||||
enum qed_ll2_tx_dest {
|
||||
QED_LL2_TX_DEST_NW, /* Light L2 TX Destination to the Network */
|
||||
QED_LL2_TX_DEST_LB, /* Light L2 TX Destination to the Loopback */
|
||||
QED_LL2_TX_DEST_MAX
|
||||
};
|
||||
|
||||
struct qed_ll2_stats {
|
||||
u64 gsi_invalid_hdr;
|
||||
u64 gsi_invalid_pkt_length;
|
||||
|
|
@ -67,6 +79,21 @@ struct qed_ll2_stats {
|
|||
u64 sent_bcast_pkts;
|
||||
};
|
||||
|
||||
struct qed_ll2_tx_pkt_info {
|
||||
void *cookie;
|
||||
dma_addr_t first_frag;
|
||||
enum qed_ll2_tx_dest tx_dest;
|
||||
enum qed_ll2_roce_flavor_type qed_roce_flavor;
|
||||
u16 vlan;
|
||||
u16 l4_hdr_offset_w; /* from start of packet */
|
||||
u16 first_frag_len;
|
||||
u8 num_of_bds;
|
||||
u8 bd_flags;
|
||||
bool enable_ip_cksum;
|
||||
bool enable_l4_cksum;
|
||||
bool calc_ip_len;
|
||||
};
|
||||
|
||||
#define QED_LL2_UNUSED_HANDLE (0xff)
|
||||
|
||||
struct qed_ll2_cb_ops {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue