From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D08241C24; Mon, 6 Feb 2023 18:14:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F09C9427E9; Mon, 6 Feb 2023 18:14:07 +0100 (CET) Received: from mail-ej1-f97.google.com (mail-ej1-f97.google.com [209.85.218.97]) by mails.dpdk.org (Postfix) with ESMTP id 2A0B340ED7 for ; Mon, 6 Feb 2023 18:14:07 +0100 (CET) Received: by mail-ej1-f97.google.com with SMTP id lu11so36231680ejb.3 for ; Mon, 06 Feb 2023 09:14:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=whTyBKoKetAkGDwYS36l+d6KyiOLf5dya6UWOO/x4to=; b=APguOgeZim/bMvjOQa6TYpW5Az5owaU7iy7d9YO47t+SX+uZ4xZhUVO5Et5/d9L2M7 kkRYUWx42UYNWhVnHz8Gn3pnHuyBz6z6BHdCrxZmnG/pkHLjCkXBmtRBkLdCU5ohHtIu YaKpVO2/qvcfNuLvg5Cl0XzmasuhrvPFcPZck7yRSq/Husq6moDHTsgZtzTJ4W2cidm4 Bo95bw9nhYgLGKTLiTY7kdK6TXkU5Zqwjhylr/UezWHHsxbC3gFOw1WrFw5NlhtJ5k8a edLRcL2l3ojYMrjAePQDrgBGu5htmRmDaEME/RDvgpt5SEQxKDm0uBo0y+h1IhU1CBXx tWng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=whTyBKoKetAkGDwYS36l+d6KyiOLf5dya6UWOO/x4to=; b=htFFVyV4r95a482NmN5wCId4lPkSvvlCLFRYXEN8qqFSPFIw9q7xkd4Ks+vJc1+0PS h2+4iR4EyI64OjxfRDzQX60baBa9/bF4ZL2viVZSCJFCHC44iipGSkHQiXzdO9QrJPvU OalPp0+xKre1MzEPWiKs3IRr+FvGtLVRf9pymDcNenXYuq1xRRlNTZmv81U3Qp4Ojqy6 78slt3NBZ9KFDVqC+mzzD8Z8EeTnJhP2w98BN8LwIL7hMiL+q4XtUa5AyZ4+bsuRZRCr 7ow02jkzEqEpjCd8KdlwUNYtDG6VygqSivHjup/OM+AnfcJTtpEXQaetK7dXvlnwZYqP f7LA== X-Gm-Message-State: AO0yUKVb9sfL7UsOdzp1QJwuqrCP16BMwckve8zK/hNEIFg9sIWtf7AS TPeUgHZbpdcaN4fI3a4F/uBUSS9VPEr735iFKZvIO5wi9X9oCg== X-Google-Smtp-Source: AK7set9Dp3PqIKaGuoE69Fli5xadyOo4nHKNw8wtbKnHNdDy7PUY84R0UJMcdZJ+ajDaEJMz5/yCFcLNdKNp X-Received: by 2002:a17:906:3143:b0:885:2313:c8b0 with SMTP id e3-20020a170906314300b008852313c8b0mr71124eje.28.1675703646852; Mon, 06 Feb 2023 09:14:06 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id s1-20020a17090699c100b0088e1bbefb07sm925980ejn.45.2023.02.06.09.14.06; Mon, 06 Feb 2023 09:14:06 -0800 (PST) X-Relaying-Domain: 6wind.com Received: from dio.dev.6wind.com (dio.dev.6wind.com [10.17.1.86]) by smtpservice.6wind.com (Postfix) with ESMTP id 86F39601AD; Mon, 6 Feb 2023 18:14:06 +0100 (CET) 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 Subject: [PATCH] bnxt: fix unwanted interrupt config on link state change Date: Mon, 6 Feb 2023 18:11:13 +0100 Message-Id: <20230206171113.2176936-1-edwin.brossette@6wind.com> X-Mailer: git-send-email 2.35.0.4.g44a5d4affccf In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Edwin Brossette 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 --- 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