RE: [PATCH net-next v14 07/13] rtase: Implement a function to receive packets

Justin Lai
2023-12-18T10:18:56Z

> > +
> > + cur_rx = ring->cur_idx;
> > + entry = cur_rx % NUM_DESC;
> > + desc = &desc_base[entry];
> > +
> > + do {
> > + /* make sure discriptor has been updated */
> > + rmb();
> > + status = le32_to_cpu(desc->desc_status.opts1);
> > +
> > + if (status & DESC_OWN)
> > + break;
> > +
> > + if (unlikely(status & RX_RES)) {
> > + if (net_ratelimit())
> > + netdev_warn(dev, "Rx ERROR. status =
> %08x\n",
> > + status);
> > +
> > + dev->stats.rx_errors++;
> > +
> > + if (status & (RX_RWT | RX_RUNT))
> > + dev->stats.rx_length_errors++;
>
> The device has a single RX queue, right? Otherwise this kind of stats
> accounting is going to be costly.
>
> Cheers,
>
> Paolo

Hi, Paolo

This device supports multiple RX queue.
Could you please provide an example of how you would like it done?