diff options
author | Mintz, Yuval <Yuval.Mintz@cavium.com> | 2017-06-09 17:13:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-09 15:49:00 -0400 |
commit | 7c7973b2ae277c6e89dceda2246fff2472c8ffdb (patch) | |
tree | 41d2434538d420fb42de5047a636e4b9a4b18229 /drivers/net/ethernet/qlogic/qed/qed_roce.c | |
parent | 5189c55506a54ab302ec08004140b99556c7df07 (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_roce.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_roce.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_roce.c b/drivers/net/ethernet/qlogic/qed/qed_roce.c index b9434b707b08..afc63c0e7c44 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_roce.c +++ b/drivers/net/ethernet/qlogic/qed/qed_roce.c @@ -2937,6 +2937,7 @@ static int qed_roce_ll2_tx(struct qed_dev *cdev, struct qed_hwfn *hwfn = QED_LEADING_HWFN(cdev); struct qed_roce_ll2_info *roce_ll2 = hwfn->ll2; enum qed_ll2_roce_flavor_type qed_roce_flavor; + struct qed_ll2_tx_pkt_info ll2_pkt; u8 flags = 0; int rc; int i; @@ -2955,11 +2956,18 @@ static int qed_roce_ll2_tx(struct qed_dev *cdev, flags |= BIT(CORE_TX_BD_DATA_IP_CSUM_SHIFT); /* Tx header */ - rc = qed_ll2_prepare_tx_packet(QED_LEADING_HWFN(cdev), roce_ll2->handle, - 1 + pkt->n_seg, 0, flags, 0, - QED_LL2_TX_DEST_NW, - qed_roce_flavor, pkt->header.baddr, - pkt->header.len, pkt, 1); + memset(&ll2_pkt, 0, sizeof(ll2_pkt)); + ll2_pkt.num_of_bds = 1 + pkt->n_seg; + ll2_pkt.bd_flags = flags; + ll2_pkt.tx_dest = QED_LL2_TX_DEST_NW; + ll2_pkt.qed_roce_flavor = qed_roce_flavor; + ll2_pkt.first_frag = pkt->header.baddr; + ll2_pkt.first_frag_len = pkt->header.len; + ll2_pkt.cookie = pkt; + + rc = qed_ll2_prepare_tx_packet(QED_LEADING_HWFN(cdev), + roce_ll2->handle, + &ll2_pkt, 1); if (rc) { DP_ERR(cdev, "roce ll2 tx: header failed (rc=%d)\n", rc); return QED_ROCE_TX_HEAD_FAILURE; |