net/sfc: forward function control window offset to datapath

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>
This commit is contained in:
Igor Romanov 2020-10-13 14:45:51 +01:00 committed by Ferruh Yigit
parent 1aacc3d388
commit e285f30d98
4 changed files with 8 additions and 0 deletions

View 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;
}

View 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;

View 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;
};

View 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,