Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77caa792 authored by Michal Kalderon's avatar Michal Kalderon Committed by David S. Miller
Browse files

qed: Add ll2 option for dropping a tx packet



The option of sending a packet on the ll2 and dropping it exists in
hardware and was not used until now, thus not exposed.
The iWARP unaligned MPA flow requires this functionality for
flushing the tx queue.

Signed-off-by: default avatarMichal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: default avatarAriel Elior <Ariel.Elior@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ed468ebe
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -1597,8 +1597,20 @@ qed_ll2_prepare_tx_packet_set_bd(struct qed_hwfn *p_hwfn,
	roce_flavor = (pkt->qed_roce_flavor == QED_LL2_ROCE) ? CORE_ROCE
							     : CORE_RROCE;

	tx_dest = (pkt->tx_dest == QED_LL2_TX_DEST_NW) ? CORE_TX_DEST_NW
						       : CORE_TX_DEST_LB;
	switch (pkt->tx_dest) {
	case QED_LL2_TX_DEST_NW:
		tx_dest = CORE_TX_DEST_NW;
		break;
	case QED_LL2_TX_DEST_LB:
		tx_dest = CORE_TX_DEST_LB;
		break;
	case QED_LL2_TX_DEST_DROP:
		tx_dest = CORE_TX_DEST_DROP;
		break;
	default:
		tx_dest = CORE_TX_DEST_LB;
		break;
	}

	start_bd = (struct core_tx_bd *)qed_chain_produce(p_tx_chain);
	start_bd->nw_vlan_or_lb_echo = cpu_to_le16(pkt->vlan);
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ enum 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_DROP, /* Light L2 Drop the TX packet */
	QED_LL2_TX_DEST_MAX
};