Re: [PATCH v4 11/35] net/intel: create a common scalar Tx function

Bruce Richardson
2026-02-10T18:04:09Z

On Tue, Feb 10, 2026 at 02:14:04PM +0100, Burakov, Anatoly wrote:
> On 2/9/2026 5:45 PM, Bruce Richardson wrote:
> > Given the similarities between the transmit functions across various
> > Intel drivers, make a start on consolidating them by moving the ice Tx
> > function into common, for reuse by other drivers.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
>
> > + if (ts_fns != NULL)
> > + ts_id = ts_fns->get_ts_tail(txq);
> > +
> > + /* Check if the descriptor ring needs to be cleaned. */
> > + if (txq->nb_tx_free < txq->tx_free_thresh)
> > + (void)ci_tx_xmit_cleanup(txq);
>
> Why (void) ?
>

Not sure, it seems superfluous, but I think it may help with some static
analysis perhaps? I've seen some tools warn you if you generally check a
return value from a function but fail to do so in one place. The other
places where the xmit_cleanup function is called here the return value is
checked each time, making this the outlier and so an explicit "void"
doesn't hurt.

If you feel it should be removed, I can do so though....

>
> > + if (ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG))
> > + nb_used = (uint16_t)(ci_calc_pkt_desc(tx_pkt) + nb_ctx);
> > + else
> > + nb_used = (uint16_t)(tx_pkt->nb_segs + nb_ctx);
> > + tx_last = (uint16_t)(tx_id + nb_used - 1);
> > +
> > + /* Circular ring */
>
> nicholas_cage_you_dont_say.jpg
>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
>
> --
> Thanks,
> Anatoly