On Thu, Apr 01, 2021 at 01:26:02PM +0200, Toke Høiland-Jørgensen wrote: > > +int enetc_xdp_xmit(struct net_device *ndev, int num_frames, > > + struct xdp_frame **frames, u32 flags) > > +{ > > + struct enetc_tx_swbd xdp_redirect_arr[ENETC_MAX_SKB_FRAGS] = {0}; > > + struct enetc_ndev_priv *priv = netdev_priv(ndev); > > + struct enetc_bdr *tx_ring; > > + int xdp_tx_bd_cnt, i, k; > > + int xdp_tx_frm_cnt = 0; > > + > > + tx_ring = priv->tx_ring[smp_processor_id()]; > > What mechanism guarantees that this won't overflow the array? :) Which array, the array of TX rings? You mean that it's possible to receive a TC_SETUP_QDISC_MQPRIO or TC_SETUP_QDISC_TAPRIO with num_tc == 1, and we have 2 CPUs? Well, yeah, I don't know what's the proper way to deal with that. Ideas?