From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A77A1A0555; Wed, 19 Feb 2020 11:31:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6BC811B951; Wed, 19 Feb 2020 11:31:24 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7CF54397D; Wed, 19 Feb 2020 11:31:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2020 02:31:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,459,1574150400"; d="scan'208";a="348915077" Received: from unknown (HELO localhost.localdomain) ([10.239.250.16]) by fmsmga001.fm.intel.com with ESMTP; 19 Feb 2020 02:31:19 -0800 From: taox.zhu@intel.com To: qiming.yang@intel.com, wenzhuo.lu@intel.com Cc: dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com, xiaolong.ye@intel.com, Zhu Tao , stable@dpdk.org Date: Wed, 19 Feb 2020 18:17:12 +0800 Message-Id: <20200219101712.9525-1-taox.zhu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/ice: fix queue bind MSI-X interrupt error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Zhu Tao To bind a queue to an MSI-X interrupt, need to set some register. The register consists of many parts, each of which has several bits; therefore, the shift operator '<<' was used; so the operator '<' in the code should be '<<'. Old code adds 1 on even MSI-X interrupt vector index used by queue, resulting in interrupt mapping error. Fixes: 65dfc889d8 ("net/ice: support Rx queue interruption") Cc: stable@dpdk.org Signed-off-by: Zhu Tao --- drivers/net/ice/ice_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 8e9369e0a..85ef83e92 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2605,9 +2605,9 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect, for (i = 0; i < nb_queue; i++) { /*do actual bind*/ val = (msix_vect & QINT_RQCTL_MSIX_INDX_M) | - (0 < QINT_RQCTL_ITR_INDX_S) | QINT_RQCTL_CAUSE_ENA_M; + (0 << QINT_RQCTL_ITR_INDX_S) | QINT_RQCTL_CAUSE_ENA_M; val_tx = (msix_vect & QINT_TQCTL_MSIX_INDX_M) | - (0 < QINT_TQCTL_ITR_INDX_S) | QINT_TQCTL_CAUSE_ENA_M; + (0 << QINT_TQCTL_ITR_INDX_S) | QINT_TQCTL_CAUSE_ENA_M; PMD_DRV_LOG(INFO, "queue %d is binding to vect %d", base_queue + i, msix_vect); -- 2.17.1