net/ice: fix queue MSI-X interrupt binding
authorTao Zhu <taox.zhu@intel.com>
Wed, 19 Feb 2020 10:17:12 +0000 (18:17 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Feb 2020 10:41:20 +0000 (11:41 +0100)
Operator '<<' should be used instead of '<' for shifting value to be
set in MSI-X configuration register.

Old code adds 1 on even MSI-X interrupt vector index used by queue,
resulting in interrupt mapping error.

Fixes: 65dfc889d86b ("net/ice: support Rx queue interruption")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/ice_ethdev.c

index 8e9369e..85ef83e 100644 (file)
@@ -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);