Netdev List
 help / color / mirror / Atom feed
From: Michal Kalderon <Michal.Kalderon@cavium.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
	<dledford@redhat.com>,
	Michal Kalderon <Michal.Kalderon@cavium.com>,
	"Ariel Elior" <Ariel.Elior@cavium.com>
Subject: [PATCH net-next 05/12] qed: Add the source of a packet sent on an iWARP ll2 connection
Date: Mon, 2 Oct 2017 11:23:51 +0300	[thread overview]
Message-ID: <1506932638-26268-6-git-send-email-Michal.Kalderon@cavium.com> (raw)
In-Reply-To: <1506932638-26268-1-git-send-email-Michal.Kalderon@cavium.com>

When a packet is sent back to iWARP FW via the tx ll2 connection
the FW needs to know the source of the packet. Whether it is
OOO or unaligned MPA related. Since OOO is implemented entirely
inside the ll2 code (and shared with iSCSI), packets are marked
as IN_ORDER inside the ll2 code. For unaligned mpa the value
will be determined in the iWARP code and sent on the pkt->vlan
field.

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_ll2.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index 864132a..dbcbf86 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -1613,7 +1613,12 @@ static void qed_ll2_prepare_tx_packet_set(struct qed_hwfn *p_hwfn,
 	}
 
 	start_bd = (struct core_tx_bd *)qed_chain_produce(p_tx_chain);
-	start_bd->nw_vlan_or_lb_echo = cpu_to_le16(pkt->vlan);
+	if (QED_IS_IWARP_PERSONALITY(p_hwfn) &&
+	    p_ll2->input.conn_type == QED_LL2_TYPE_OOO)
+		start_bd->nw_vlan_or_lb_echo =
+		    cpu_to_le16(IWARP_LL2_IN_ORDER_TX_QUEUE);
+	else
+		start_bd->nw_vlan_or_lb_echo = cpu_to_le16(pkt->vlan);
 	SET_FIELD(start_bd->bitfield1, CORE_TX_BD_L4_HDR_OFFSET_W,
 		  cpu_to_le16(pkt->l4_hdr_offset_w));
 	SET_FIELD(start_bd->bitfield1, CORE_TX_BD_TX_DST, tx_dest);
-- 
1.8.3.1

  parent reply	other threads:[~2017-10-02  8:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02  8:23 [PATCH net-next 00/12] qed: Add iWARP support for unaligned MPA packets Michal Kalderon
2017-10-02  8:23 ` [PATCH net-next 02/12] qed: Add ll2 ability of opening a secondary queue Michal Kalderon
     [not found]   ` <1506932638-26268-3-git-send-email-Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-10-02 17:56     ` David Miller
2017-10-02  8:23 ` [PATCH net-next 04/12] qed: Fix initialization of ll2 offload feature Michal Kalderon
2017-10-02  8:23 ` Michal Kalderon [this message]
2017-10-02  8:23 ` [PATCH net-next 06/12] qed: Add LL2 slowpath handling Michal Kalderon
2017-10-02  8:23 ` [PATCH net-next 08/12] qed: Add mpa buffer descriptors for storing and processing mpa fpdus Michal Kalderon
     [not found] ` <1506932638-26268-1-git-send-email-Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-10-02  8:23   ` [PATCH net-next 01/12] qed: Add ll2 option to limit the number of bds per packet Michal Kalderon
     [not found]     ` <1506932638-26268-2-git-send-email-Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-10-02 17:56       ` David Miller
2017-10-02  8:23   ` [PATCH net-next 03/12] qed: Add ll2 option for dropping a tx packet Michal Kalderon
2017-10-02  8:23   ` [PATCH net-next 07/12] qed: Add ll2 connection for processing unaligned MPA packets Michal Kalderon
2017-10-02  8:23   ` [PATCH net-next 09/12] qed: Add unaligned and packed packet processing Michal Kalderon
2017-10-02  8:23   ` [PATCH net-next 10/12] qed: Add support for freeing two ll2 buffers for corner cases Michal Kalderon
2017-10-02  8:23   ` [PATCH net-next 11/12] qed: Add support for MPA header being split over two tcp packets Michal Kalderon
2017-10-02  8:23   ` [PATCH net-next 12/12] qed: Add iWARP support for fpdu spanned over more than " Michal Kalderon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506932638-26268-6-git-send-email-Michal.Kalderon@cavium.com \
    --to=michal.kalderon@cavium.com \
    --cc=Ariel.Elior@cavium.com \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox