Re: [PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-07 Thread Ariel Otilibili
Hi Maryam, hi Stephen; On Fri, Feb 7, 2025 at 10:14 AM Maryam Tahhan wrote: > Sorry if my remarks were confusing, it was just missing from the previous > patch and it needs to be: > desc->len = mbuf->pkt_len; > > We need to keep this the same as the original code. This is a scenario > where we n

Re: [PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-07 Thread Maryam Tahhan
On 06/02/2025 21:42, Stephen Hemminger wrote: On Thu, 6 Feb 2025 21:46:45 +0100 Ariel Otilibili wrote: +static inline struct xdp_desc * +reserve_and_fill(struct pkt_tx_queue *txq, struct rte_mbuf *mbuf, +struct xsk_umem_info *umem, void **pkt_ptr) +{ + struct xdp_desc

Re: [PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-07 Thread Maryam Tahhan
> > > @@ -559,51 +587,30 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) > mbuf = bufs[i]; > > if (mbuf->pool == umem->mb_pool) { > - if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) > { > + if (!(des

Re: [PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-06 Thread Stephen Hemminger
On Thu, 6 Feb 2025 21:46:45 +0100 Ariel Otilibili wrote: > > +static inline struct xdp_desc * > +reserve_and_fill(struct pkt_tx_queue *txq, struct rte_mbuf *mbuf, > + struct xsk_umem_info *umem, void **pkt_ptr) > +{ > + struct xdp_desc *desc = NULL; > + uint64_t addr, offs

[PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc

2025-02-06 Thread Ariel Otilibili
Both legs of the loop share the same logic: the common parts are about reserving and filling both address and length into the description. This is moved into reserve_and_fill(). Bugzilla ID: 1440 Suggested-by: Maryam Tahhan Signed-off-by: Ariel Otilibili --- drivers/net/af_xdp/rte_eth_af_xdp.c