net/sfc: fix unused variable in RSS-agnostic build
[dpdk.git] / drivers / net / sfc / sfc.c
index 22141c6..7849a1c 100644 (file)
@@ -398,7 +398,8 @@ sfc_configure(struct sfc_adapter *sa)
 
        SFC_ASSERT(sfc_adapter_is_locked(sa));
 
-       SFC_ASSERT(sa->state == SFC_ADAPTER_INITIALIZED);
+       SFC_ASSERT(sa->state == SFC_ADAPTER_INITIALIZED ||
+                  sa->state == SFC_ADAPTER_CONFIGURED);
        sa->state = SFC_ADAPTER_CONFIGURING;
 
        rc = sfc_check_conf(sa);
@@ -464,7 +465,7 @@ static int
 sfc_mem_bar_init(struct sfc_adapter *sa)
 {
        struct rte_eth_dev *eth_dev = sa->eth_dev;
-       struct rte_pci_device *pci_dev = SFC_DEV_TO_PCI(eth_dev);
+       struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
        efsys_bar_t *ebp = &sa->mem_bar;
        unsigned int i;
        struct rte_mem_resource *res;
@@ -509,10 +510,10 @@ static const uint8_t default_rss_key[SFC_RSS_KEY_SIZE] = {
 };
 #endif
 
+#if EFSYS_OPT_RX_SCALE
 static int
 sfc_set_rss_defaults(struct sfc_adapter *sa)
 {
-#if EFSYS_OPT_RX_SCALE
        int rc;
 
        rc = efx_intr_init(sa->nic, sa->intr.type, NULL);
@@ -555,10 +556,14 @@ fail_ev_init:
 
 fail_intr_init:
        return rc;
+}
 #else
+static int
+sfc_set_rss_defaults(__rte_unused struct sfc_adapter *sa)
+{
        return 0;
-#endif
 }
+#endif
 
 int
 sfc_attach(struct sfc_adapter *sa)
@@ -665,7 +670,7 @@ sfc_detach(struct sfc_adapter *sa)
 int
 sfc_probe(struct sfc_adapter *sa)
 {
-       struct rte_pci_device *pci_dev = SFC_DEV_TO_PCI(sa->eth_dev);
+       struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(sa->eth_dev);
        efx_nic_t *enp;
        int rc;