> -----Original Message-----
> From: Saeed Mahameed <[email protected]>
> Sent: Thursday, November 12, 2020 22:43
> To: Camelia Alexandra Groza <[email protected]>; [email protected];
> [email protected]; [email protected]
> Cc: Madalin Bucur (OSS) <[email protected]>; Ioana Ciornei
> <[email protected]>; [email protected]
> Subject: Re: [PATCH net-next 2/7] dpaa_eth: add basic XDP support
> 
> On Thu, 2020-11-12 at 20:10 +0200, Camelia Groza wrote:
> > +       if (likely(fd_format == qm_fd_contig)) {
> >
> > +               xdp_act = dpaa_run_xdp(priv, (struct qm_fd *)fd,
> > vaddr,
> >
> > +                                      &xdp_meta_len);
> >
> > +               if (xdp_act != XDP_PASS) {
> >
> > +                       percpu_stats->rx_packets++;
> >
> > +                       percpu_stats->rx_bytes +=
> > qm_fd_get_length(fd);
> >
> > +                       return qman_cb_dqrr_consume;
> >
> > +               }
> >
> >                 skb = contig_fd_to_skb(priv, fd);
> >
> > -       else
> >
> > +       } else {
> >
> > +               WARN_ONCE(priv->xdp_prog, "S/G frames not supported
> > under XDP\n");
> >
> 
> Why do you even allow xdp_setup() if S/G is configured ?
> just block this on xdp_setup() or on S/G setup on device open()

We don't have a S/G on/off switch. The S/G support is a consequence of the 
ration between the buffer size and the hardware's maximum frame size, the 
latter being configured at probe.

> >                 skb = sg_fd_to_skb(priv, fd);
> >
> > +       }

Reply via email to