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 v3 net-next 02/12] qed: Add ll2 ability of opening a secondary queue
Date: Mon, 9 Oct 2017 12:37:44 +0300	[thread overview]
Message-ID: <1507541874-18344-3-git-send-email-Michal.Kalderon@cavium.com> (raw)
In-Reply-To: <1507541874-18344-1-git-send-email-Michal.Kalderon@cavium.com>

When more than one ll2 queue is opened ( that is not an OOO queue )
ll2 code does not have enough information to determine whether
the queue is the main one or not, so a new field is added to the
acquire input data to expose the control of determining whether
the queue is the main queue or a secondary queue.

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 ++++++-
 drivers/net/ethernet/qlogic/qed/qed_ll2.h | 1 +
 include/linux/qed/qed_ll2_if.h            | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index 75af40a..3c695da 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -894,7 +894,7 @@ static int qed_sp_ll2_rx_queue_start(struct qed_hwfn *p_hwfn,
 	p_ramrod->drop_ttl0_flg = p_ll2_conn->input.rx_drop_ttl0_flg;
 	p_ramrod->inner_vlan_removal_en = p_ll2_conn->input.rx_vlan_removal_en;
 	p_ramrod->queue_id = p_ll2_conn->queue_id;
-	p_ramrod->main_func_queue = (conn_type == QED_LL2_TYPE_OOO) ? 0 : 1;
+	p_ramrod->main_func_queue = p_ll2_conn->main_func_queue ? 1 : 0;
 
 	if ((IS_MF_DEFAULT(p_hwfn) || IS_MF_SI(p_hwfn)) &&
 	    p_ramrod->main_func_queue && (conn_type != QED_LL2_TYPE_ROCE) &&
@@ -1265,6 +1265,11 @@ int qed_ll2_acquire_connection(void *cxt, struct qed_ll2_acquire_data *data)
 
 	p_ll2_info->tx_dest = (data->input.tx_dest == QED_LL2_TX_DEST_NW) ?
 			      CORE_TX_DEST_NW : CORE_TX_DEST_LB;
+	if (data->input.conn_type == QED_LL2_TYPE_OOO ||
+	    data->input.secondary_queue)
+		p_ll2_info->main_func_queue = false;
+	else
+		p_ll2_info->main_func_queue = true;
 
 	/* Correct maximum number of Tx BDs */
 	p_tx_max = &p_ll2_info->input.tx_max_bds_per_packet;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.h b/drivers/net/ethernet/qlogic/qed/qed_ll2.h
index 9bdd08f..f658170 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.h
@@ -121,6 +121,7 @@ struct qed_ll2_info {
 	bool b_active;
 	enum core_tx_dest tx_dest;
 	u8 tx_stats_en;
+	bool main_func_queue;
 	struct qed_ll2_rx_queue rx_queue;
 	struct qed_ll2_tx_queue tx_queue;
 	struct qed_ll2_cbs cbs;
diff --git a/include/linux/qed/qed_ll2_if.h b/include/linux/qed/qed_ll2_if.h
index 89fa0bb..d7cca59 100644
--- a/include/linux/qed/qed_ll2_if.h
+++ b/include/linux/qed/qed_ll2_if.h
@@ -171,6 +171,7 @@ struct qed_ll2_acquire_data_inputs {
 	enum qed_ll2_tx_dest tx_dest;
 	enum qed_ll2_error_handle ai_err_packet_too_big;
 	enum qed_ll2_error_handle ai_err_no_buf;
+	bool secondary_queue;
 	u8 gsi_enable;
 };
 
-- 
1.8.3.1

  reply	other threads:[~2017-10-09  9:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09  9:37 [PATCH v3 net-next 00/12] qed: Add iWARP support for unaligned MPA packets Michal Kalderon
2017-10-09  9:37 ` Michal Kalderon [this message]
2017-10-09  9:37 ` [PATCH v3 net-next 03/12] qed: Add ll2 option for dropping a tx packet Michal Kalderon
2017-10-09  9:37 ` [PATCH v3 net-next 04/12] qed: Fix initialization of ll2 offload feature Michal Kalderon
2017-10-09  9:37 ` [PATCH v3 net-next 05/12] qed: Add the source of a packet sent on an iWARP ll2 connection Michal Kalderon
2017-10-09  9:37 ` [PATCH v3 net-next 06/12] qed: Add LL2 slowpath handling Michal Kalderon
2017-10-09  9:37 ` [PATCH v3 net-next 08/12] qed: Add mpa buffer descriptors for storing and processing mpa fpdus Michal Kalderon
2017-10-09  9:37 ` [PATCH v3 net-next 09/12] qed: Add unaligned and packed packet processing Michal Kalderon
2017-10-09  9:37 ` [PATCH v3 net-next 10/12] qed: Add support for freeing two ll2 buffers for corner cases Michal Kalderon
     [not found] ` <1507541874-18344-1-git-send-email-Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-10-09  9:37   ` [PATCH v3 net-next 01/12] qed: Add ll2 option to limit the number of bds per packet Michal Kalderon
2017-10-09  9:37   ` [PATCH v3 net-next 07/12] qed: Add ll2 connection for processing unaligned MPA packets Michal Kalderon
2017-10-09  9:37   ` [PATCH v3 net-next 11/12] qed: Add support for MPA header being split over two tcp packets Michal Kalderon
2017-10-09 17:21   ` [PATCH v3 net-next 00/12] qed: Add iWARP support for unaligned MPA packets David Miller
2017-10-09  9:37 ` [PATCH v3 net-next 12/12] qed: Add iWARP support for fpdu spanned over more than two tcp packets 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=1507541874-18344-3-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