net/sfc: forward function control window offset to datapath
authorIgor Romanov <igor.romanov@oktetlabs.ru>
Tue, 13 Oct 2020 13:45:51 +0000 (14:45 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:18 +0000 (19:48 +0200)
Store function control window offset to correctly set the offset
of prime EvQ in EF100.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc.c
drivers/net/sfc/sfc.h
drivers/net/sfc/sfc_dp_rx.h
drivers/net/sfc/sfc_rx.c

index d4478a2..8fa790d 100644 (file)
@@ -667,6 +667,9 @@ sfc_mem_bar_init(struct sfc_adapter *sa, const efx_bar_region_t *mem_ebrp)
        ebp->esb_rid = mem_ebrp->ebr_index;
        ebp->esb_dev = pci_dev;
        ebp->esb_base = res->addr;
+
+       sa->fcw_offset = mem_ebrp->ebr_offset;
+
        return 0;
 }
 
index ecdd716..047ca64 100644 (file)
@@ -221,6 +221,8 @@ struct sfc_adapter {
        struct rte_kvargs               *kvargs;
        int                             socket_id;
        efsys_bar_t                     mem_bar;
+       /* Function control window offset */
+       efsys_dma_addr_t                fcw_offset;
        efx_family_t                    family;
        efx_nic_t                       *nic;
        rte_spinlock_t                  nic_lock;
index 362be93..f3e00e2 100644 (file)
@@ -88,6 +88,8 @@ struct sfc_dp_rx_qcreate_info {
         * doorbell
         */
        volatile void           *mem_bar;
+       /** Function control window offset */
+       efsys_dma_addr_t        fcw_offset;
        /** VI window size shift */
        unsigned int            vi_window_shift;
 };
index ff4e69e..de0773b 100644 (file)
@@ -1199,6 +1199,7 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
        info.hw_index = rxq->hw_index;
        info.mem_bar = sa->mem_bar.esb_base;
        info.vi_window_shift = encp->enc_vi_window_shift;
+       info.fcw_offset = sa->fcw_offset;
 
        rc = sa->priv.dp_rx->qcreate(sa->eth_dev->data->port_id, sw_index,
                                     &RTE_ETH_DEV_TO_PCI(sa->eth_dev)->addr,