net/sfc: avoid usage of TxQ control structure in info get
TxQ control structure contains primary process only data and will become primary process only. TxQ info get is supported in secondary process. Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
parent
5befcecbe0
commit
b57870f2ab
@ -281,7 +281,7 @@ sfc_set_fw_subvariant(struct sfc_adapter *sa)
|
||||
struct sfc_txq_info *txq_info = &sa->txq_info[txq_index];
|
||||
|
||||
if (txq_info->txq != NULL)
|
||||
tx_offloads |= txq_info->txq->offloads;
|
||||
tx_offloads |= txq_info->offloads;
|
||||
}
|
||||
|
||||
if (tx_offloads & (DEV_TX_OFFLOAD_IPV4_CKSUM |
|
||||
|
@ -1104,12 +1104,11 @@ sfc_tx_queue_info_get(struct rte_eth_dev *dev, uint16_t tx_queue_id,
|
||||
SFC_ASSERT(tx_queue_id < sa->txq_count);
|
||||
|
||||
txq_info = &sa->txq_info[tx_queue_id];
|
||||
SFC_ASSERT(txq_info->txq != NULL);
|
||||
|
||||
memset(qinfo, 0, sizeof(*qinfo));
|
||||
|
||||
qinfo->conf.offloads = txq_info->txq->offloads;
|
||||
qinfo->conf.tx_free_thresh = txq_info->txq->free_thresh;
|
||||
qinfo->conf.offloads = txq_info->offloads;
|
||||
qinfo->conf.tx_free_thresh = txq_info->free_thresh;
|
||||
qinfo->conf.tx_deferred_start = txq_info->deferred_start;
|
||||
qinfo->nb_desc = txq_info->entries;
|
||||
|
||||
|
@ -168,10 +168,10 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
|
||||
|
||||
txq->hw_index = sw_index;
|
||||
txq->evq = evq;
|
||||
txq->free_thresh =
|
||||
txq_info->free_thresh =
|
||||
(tx_conf->tx_free_thresh) ? tx_conf->tx_free_thresh :
|
||||
SFC_TX_DEFAULT_FREE_THRESH;
|
||||
txq->offloads = offloads;
|
||||
txq_info->offloads = offloads;
|
||||
|
||||
rc = sfc_dma_alloc(sa, "txq", sw_index, EFX_TXQ_SIZE(txq_info->entries),
|
||||
socket_id, &txq->mem);
|
||||
@ -180,7 +180,7 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.max_fill_level = txq_max_fill_level;
|
||||
info.free_thresh = txq->free_thresh;
|
||||
info.free_thresh = txq_info->free_thresh;
|
||||
info.offloads = offloads;
|
||||
info.txq_entries = txq_info->entries;
|
||||
info.dma_desc_size_max = encp->enc_tx_dma_desc_size_max;
|
||||
@ -434,21 +434,21 @@ sfc_tx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
|
||||
if (rc != 0)
|
||||
goto fail_ev_qstart;
|
||||
|
||||
if (txq->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
|
||||
if (txq_info->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
|
||||
flags |= EFX_TXQ_CKSUM_IPV4;
|
||||
|
||||
if (txq->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
|
||||
if (txq_info->offloads & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
|
||||
flags |= EFX_TXQ_CKSUM_INNER_IPV4;
|
||||
|
||||
if ((txq->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) ||
|
||||
(txq->offloads & DEV_TX_OFFLOAD_UDP_CKSUM)) {
|
||||
if ((txq_info->offloads & DEV_TX_OFFLOAD_TCP_CKSUM) ||
|
||||
(txq_info->offloads & DEV_TX_OFFLOAD_UDP_CKSUM)) {
|
||||
flags |= EFX_TXQ_CKSUM_TCPUDP;
|
||||
|
||||
if (offloads_supported & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
|
||||
flags |= EFX_TXQ_CKSUM_INNER_TCPUDP;
|
||||
}
|
||||
|
||||
if (txq->offloads & DEV_TX_OFFLOAD_TCP_TSO)
|
||||
if (txq_info->offloads & DEV_TX_OFFLOAD_TCP_TSO)
|
||||
flags |= EFX_TXQ_FATSOV2;
|
||||
|
||||
rc = efx_tx_qcreate(sa->nic, txq->hw_index, 0, &txq->mem,
|
||||
|
@ -57,8 +57,6 @@ struct sfc_txq {
|
||||
efsys_mem_t mem;
|
||||
struct sfc_dp_txq *dp;
|
||||
efx_txq_t *common;
|
||||
unsigned int free_thresh;
|
||||
uint64_t offloads;
|
||||
};
|
||||
|
||||
static inline unsigned int
|
||||
@ -113,6 +111,8 @@ struct sfc_txq_info {
|
||||
struct sfc_txq *txq;
|
||||
boolean_t deferred_start;
|
||||
boolean_t deferred_started;
|
||||
unsigned int free_thresh;
|
||||
uint64_t offloads;
|
||||
};
|
||||
|
||||
int sfc_tx_configure(struct sfc_adapter *sa);
|
||||
|
Loading…
Reference in New Issue
Block a user