[PATCH v7 09/12] net/nfp: add flower ctrl VNIC rxtx logic
Ferruh Yigit
ferruh.yigit at xilinx.com
Mon Sep 5 17:42:34 CEST 2022
On 8/12/2022 11:22 AM, Chaoyong He wrote:
> Adds a Rx and Tx function for the ctrl VNIC. The logic is mostly
> identical to the normal Rx and Tx functionality of the NFP PMD.
>
> Make use of the ctrl VNIC service logic to service the ctrl VNIC Rx
> path.
>
> Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
> Signed-off-by: Heinrich Kuhn <heinrich.kuhn at corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
<...>
> +uint16_t
> +nfp_flower_ctrl_vnic_xmit(struct nfp_app_flower *app_flower,
> + struct rte_mbuf *mbuf)
> +{
> + uint16_t cnt = 0;
> + uint64_t dma_addr;
> + uint32_t free_descs;
> + struct rte_mbuf **lmbuf;
> + struct nfp_net_txq *txq;
> + struct nfp_net_hw *ctrl_hw;
> + struct rte_eth_dev *ctrl_dev;
> + struct nfp_net_nfd3_tx_desc *txds;
> +
> + ctrl_hw = app_flower->ctrl_hw;
> + ctrl_dev = ctrl_hw->eth_dev;
> +
> + /* Flower ctrl vNIC only has a single tx queue */
> + txq = ctrl_dev->data->tx_queues[0];
> + if (unlikely(txq == NULL)) {
> + /*
> + * DPDK just checks the queue is lower than max queues
> + * enabled. But the queue needs to be configured
> + */
> + PMD_TX_LOG(ERROR, "ctrl dev TX Bad queue");
There is no log type 'RTE_LOG_ERROR', which cause build error, it should
be 'ERR'.
> + goto xmit_end;
> + }
> +
> + txds = &txq->txds[txq->wr_p];
> + txds->vals[0] = 0;
> + txds->vals[1] = 0;
> + txds->vals[2] = 0;
> + txds->vals[3] = 0;
> +
> + if (nfp_net_nfd3_txq_full(txq))
> + nfp_net_tx_free_bufs(txq);
> +
> + free_descs = nfp_net_nfd3_free_tx_desc(txq);
> + if (unlikely(free_descs == 0)) {
> + PMD_TX_LOG(ERROR, "ctrl dev no free descs");
ditto.
More information about the dev
mailing list