From: edwin.brossette@6wind.com
To: dev@dpdk.org
Cc: somnath.kotur@broadcom.com, ajit.khaparde@broadcom.com,
didier.pallard@6wind.com, olivier.matz@6wind.com,
laurent.hardy@6wind.com,
Edwin Brossette <edwin.brossette@6wind.com>
Subject: [PATCH] bnxt: fix unwanted interrupt config on link state change
Date: Mon, 6 Feb 2023 18:11:13 +0100 [thread overview]
Message-ID: <20230206171113.2176936-1-edwin.brossette@6wind.com> (raw)
In-Reply-To: <CANDF9xBL_YZxX+rHqMO4Oahm080_D2+DVP81wEVz-M+3uyBOEQ@mail.gmail.com>
From: Edwin Brossette <edwin.brossette@6wind.com>
When getting the device's info via bnxt_dev_info_get_op(), the device
enables interrupts on link state changes because of the following line:
> eth_dev->data->dev_conf.intr_conf.lsc = 1;
Enabling this mode might not be wanted by the user.
The flag RTE_ETH_DEV_INTR_LSC can be used to inform the above
application that lsc interrupts are supported. Thus, checking this flag,
the user can decide whether or not to enable these interrupts.
Since there is no reason for a function meant to display config to
actually modify it, remove this line. In addition, raise the dev_flag
associated with this state on the device's intialization to show the
device supports link state change interrupts.
Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b3de490d3667..753e86b4b2af 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1017,7 +1017,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
.tx_free_thresh = 32,
.tx_rs_thresh = 32,
};
- eth_dev->data->dev_conf.intr_conf.lsc = 1;
dev_info->rx_desc_lim.nb_min = BNXT_MIN_RING_DESC;
dev_info->rx_desc_lim.nb_max = BNXT_MAX_RX_RING_DESC;
@@ -5859,6 +5858,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
rte_eth_copy_pci_info(eth_dev, pci_dev);
eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
bp = eth_dev->data->dev_private;
--
2.35.0.4.g44a5d4affccf
next prev parent reply other threads:[~2023-02-06 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 13:37 net/bnxt: wrong link status when lsc_intr is used Edwin Brossette
2023-01-20 1:04 ` Ajit Khaparde
2023-01-31 5:08 ` Somnath Kotur
2023-02-06 8:44 ` Edwin Brossette
2023-02-07 2:07 ` Somnath Kotur
2023-02-06 17:11 ` edwin.brossette [this message]
2023-02-07 5:44 ` [PATCH] bnxt: fix unwanted interrupt config on link state change Somnath Kotur
2023-02-08 18:19 ` Ajit Khaparde
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=20230206171113.2176936-1-edwin.brossette@6wind.com \
--to=edwin.brossette@6wind.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=didier.pallard@6wind.com \
--cc=laurent.hardy@6wind.com \
--cc=olivier.matz@6wind.com \
--cc=somnath.kotur@broadcom.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).