From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: Nirranjan Kirubaharan <nirranjan@chelsio.com>,
Indranil Choudhury <indranil@chelsio.com>,
Kumar Sanghvi <kumaras@chelsio.com>
Subject: [dpdk-dev] [PATCH 2/4] cxgbe: fix rxq default params for ports under same PF
Date: Sat, 27 May 2017 09:17:58 +0530 [thread overview]
Message-ID: <677838ff3cb8dd3e3af2ec04a3dd3cf781606f37.1495856647.git.rahul.lakkireddy@chelsio.com> (raw)
In-Reply-To: <cover.1495856647.git.rahul.lakkireddy@chelsio.com>
In-Reply-To: <cover.1495856647.git.rahul.lakkireddy@chelsio.com>
Enabling rx queues with default interrupt parameters doesn't happen
for other ports under same PF due to FULL_INIT_DONE flag being set
by the first port.
Fix is to to allow each port to enable its own rx queues with default
parameters.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
---
drivers/net/cxgbe/cxgbe.h | 3 ++-
drivers/net/cxgbe/cxgbe_ethdev.c | 2 ++
drivers/net/cxgbe/cxgbe_main.c | 33 +++++++++++----------------------
3 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 0201c99..9120c43 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2014-2015 Chelsio Communications.
+ * Copyright(c) 2014-2017 Chelsio Communications.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,5 +59,6 @@ int setup_sge_fwevtq(struct adapter *adapter);
void cfg_queues(struct rte_eth_dev *eth_dev);
int cfg_queue_count(struct rte_eth_dev *eth_dev);
int setup_rss(struct port_info *pi);
+void cxgbe_enable_rx_queues(struct port_info *pi);
#endif /* _CXGBE_H_ */
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 7282575..ade0b11 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -339,6 +339,8 @@ static int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
goto out;
}
+ cxgbe_enable_rx_queues(pi);
+
err = setup_rss(pi);
if (err)
goto out;
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 2522354..4d95f5d 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -984,33 +984,22 @@ int setup_rss(struct port_info *pi)
/*
* Enable NAPI scheduling and interrupt generation for all Rx queues.
*/
-static void enable_rx(struct adapter *adap)
+static void enable_rx(struct adapter *adap, struct sge_rspq *q)
{
- struct sge *s = &adap->sge;
- struct sge_rspq *q = &s->fw_evtq;
- int i, j;
-
/* 0-increment GTS to start the timer and enable interrupts */
t4_write_reg(adap, MYPF_REG(A_SGE_PF_GTS),
V_SEINTARM(q->intr_params) |
V_INGRESSQID(q->cntxt_id));
+}
- for_each_port(adap, i) {
- const struct port_info *pi = &adap->port[i];
- struct rte_eth_dev *eth_dev = pi->eth_dev;
-
- for (j = 0; j < eth_dev->data->nb_rx_queues; j++) {
- q = eth_dev->data->rx_queues[j];
-
- /*
- * 0-increment GTS to start the timer and enable
- * interrupts
- */
- t4_write_reg(adap, MYPF_REG(A_SGE_PF_GTS),
- V_SEINTARM(q->intr_params) |
- V_INGRESSQID(q->cntxt_id));
- }
- }
+void cxgbe_enable_rx_queues(struct port_info *pi)
+{
+ struct adapter *adap = pi->adapter;
+ struct sge *s = &adap->sge;
+ unsigned int i;
+
+ for (i = 0; i < pi->n_rx_qsets; i++)
+ enable_rx(adap, &s->ethrxq[pi->first_qset + i].rspq);
}
/**
@@ -1023,7 +1012,7 @@ static void enable_rx(struct adapter *adap)
*/
int cxgbe_up(struct adapter *adap)
{
- enable_rx(adap);
+ enable_rx(adap, &adap->sge.fw_evtq);
t4_sge_tx_monitor_start(adap);
t4_intr_enable(adap);
adap->flags |= FULL_INIT_DONE;
--
2.5.3
next prev parent reply other threads:[~2017-05-27 5:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-27 3:47 [dpdk-dev] [PATCH 0/4] cxgbe: latency and performance fixes Rahul Lakkireddy
2017-05-27 3:47 ` [dpdk-dev] [PATCH 1/4] cxgbe: improve latency for slow traffic Rahul Lakkireddy
2017-05-27 3:47 ` Rahul Lakkireddy [this message]
2017-05-27 3:47 ` [dpdk-dev] [PATCH 3/4] cxgbe: remove rmb bottleneck in RX path Rahul Lakkireddy
2017-05-27 3:48 ` [dpdk-dev] [PATCH 4/4] cxgbe: configure PCIe extended tags Rahul Lakkireddy
2017-05-30 11:25 ` [dpdk-dev] [PATCH 0/4] cxgbe: latency and performance fixes Ferruh Yigit
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=677838ff3cb8dd3e3af2ec04a3dd3cf781606f37.1495856647.git.rahul.lakkireddy@chelsio.com \
--to=rahul.lakkireddy@chelsio.com \
--cc=dev@dpdk.org \
--cc=indranil@chelsio.com \
--cc=kumaras@chelsio.com \
--cc=nirranjan@chelsio.com \
/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;
as well as URLs for NNTP newsgroup(s).