From: Andrew Boyer <aboyer@pensando.io>
To: dev@dpdk.org
Cc: Alfredo Cardigliano <cardigliano@ntop.org>,
Andrew Boyer <aboyer@pensando.io>
Subject: [dpdk-dev] [PATCH 5/6] net/ionic: clear up confusion around FC autoneg
Date: Mon, 11 Jan 2021 11:02:08 -0800 [thread overview]
Message-ID: <20210111190209.70928-6-aboyer@pensando.io> (raw)
In-Reply-To: <20210111190209.70928-1-aboyer@pensando.io>
IONIC does not support Flow-Control autonegotiation.
Always wait for completion after each dev cmd.
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
drivers/net/ionic/ionic_ethdev.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 5ff155f85..838e93ef7 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -463,7 +463,8 @@ ionic_flow_ctrl_get(struct rte_eth_dev *eth_dev,
struct ionic_dev *idev = &adapter->idev;
if (idev->port_info) {
- fc_conf->autoneg = idev->port_info->config.an_enable;
+ /* Flow control autoneg not supported */
+ fc_conf->autoneg = 0;
if (idev->port_info->config.pause_type)
fc_conf->mode = RTE_FC_FULL;
@@ -482,7 +483,12 @@ ionic_flow_ctrl_set(struct rte_eth_dev *eth_dev,
struct ionic_adapter *adapter = lif->adapter;
struct ionic_dev *idev = &adapter->idev;
uint8_t pause_type = IONIC_PORT_PAUSE_TYPE_NONE;
- uint8_t an_enable;
+ int err;
+
+ if (fc_conf->autoneg) {
+ IONIC_PRINT(WARNING, "Flow control autoneg not supported");
+ return -ENOTSUP;
+ }
switch (fc_conf->mode) {
case RTE_FC_NONE:
@@ -496,12 +502,12 @@ ionic_flow_ctrl_set(struct rte_eth_dev *eth_dev,
return -ENOTSUP;
}
- an_enable = fc_conf->autoneg;
-
ionic_dev_cmd_port_pause(idev, pause_type);
- ionic_dev_cmd_port_autoneg(idev, an_enable);
+ err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
+ if (err)
+ IONIC_PRINT(WARNING, "Failed to configure flow control");
- return 0;
+ return err;
}
static int
--
2.17.1
next prev parent reply other threads:[~2021-01-11 19:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 19:02 [dpdk-dev] [PATCH 0/6] net/ionic: fix device configuration and init Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 1/6] net/ionic: revise configuration flag handling Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 2/6] net/ionic: combine queue init and enable commands Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 3/6] net/ionic: set port admin state to up in port init Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 4/6] net/ionic: don't add station MAC filter on init Andrew Boyer
2021-01-11 19:02 ` Andrew Boyer [this message]
2021-01-11 19:02 ` [dpdk-dev] [PATCH 6/6] net/ionic: correctly set link speed and autonegotiation Andrew Boyer
2021-01-18 17:10 ` Ferruh Yigit
2021-01-18 17:09 ` [dpdk-dev] [PATCH 0/6] net/ionic: fix device configuration and init 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=20210111190209.70928-6-aboyer@pensando.io \
--to=aboyer@pensando.io \
--cc=cardigliano@ntop.org \
--cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).