[PATCH] bnxt: fix unwanted interrupt config on link state change
Somnath Kotur
somnath.kotur at broadcom.com
Tue Feb 7 06:44:08 CET 2023
On Mon, Feb 6, 2023 at 10:44 PM <edwin.brossette at 6wind.com> wrote:
>
> From: Edwin Brossette <edwin.brossette at 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 at 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
>
Acked-by: Somnath Kotur <somnath.kotur at broadcom.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4212 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/dev/attachments/20230207/47da67fb/attachment-0001.bin>
More information about the dev
mailing list