> -static bool fec_enet_copybreak(struct net_device *ndev, struct sk_buff **skb,
> - struct bufdesc *bdp, u32 length, bool swap)
> +static bool __maybe_unused
> +fec_enet_copybreak(struct net_device *ndev, struct sk_buff **skb,
> + struct bufdesc *bdp, u32 length, bool swap)
> {
Why add __maybe_unused? If its not used, remove it. We don't leave
dead functions in the code.
Andrew
> -----Original Message-----
> From: Andrew Lunn <[email protected]>
> Sent: Friday, September 30, 2022 3:05 PM
> To: Shenwei Wang <[email protected]>
> Cc: David S . Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> <[email protected]>; Alexei Starovoitov <[email protected]>; Daniel Borkmann
> <[email protected]>; Jesper Dangaard Brouer <[email protected]>; John
> Fastabend <[email protected]>; Wei Fang <[email protected]>;
> [email protected]; [email protected]; [email protected]
> Subject: [EXT] Re: [PATCH 1/1] net: fec: using page pool to manage RX buffers
>
> Caution: EXT Email
>
> > -static bool fec_enet_copybreak(struct net_device *ndev, struct sk_buff **skb,
> > - struct bufdesc *bdp, u32 length, bool swap)
> > +static bool __maybe_unused
> > +fec_enet_copybreak(struct net_device *ndev, struct sk_buff **skb,
> > + struct bufdesc *bdp, u32 length, bool swap)
> > {
>
> Why add __maybe_unused? If its not used, remove it. We don't leave dead
> functions in the code.
>
I was thinking to remove them by a separate patch once the page pool solution is accepted.
Regards,
Shenwei
> Andrew
On Fri, Sep 30, 2022 at 08:07:55PM +0000, Shenwei Wang wrote:
>
>
> > -----Original Message-----
> > From: Andrew Lunn <[email protected]>
> > Sent: Friday, September 30, 2022 3:05 PM
> > To: Shenwei Wang <[email protected]>
> > Cc: David S . Miller <[email protected]>; Eric Dumazet
> > <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> > <[email protected]>; Alexei Starovoitov <[email protected]>; Daniel Borkmann
> > <[email protected]>; Jesper Dangaard Brouer <[email protected]>; John
> > Fastabend <[email protected]>; Wei Fang <[email protected]>;
> > [email protected]; [email protected]; [email protected]
> > Subject: [EXT] Re: [PATCH 1/1] net: fec: using page pool to manage RX buffers
> >
> > Caution: EXT Email
> >
> > > -static bool fec_enet_copybreak(struct net_device *ndev, struct sk_buff **skb,
> > > - struct bufdesc *bdp, u32 length, bool swap)
> > > +static bool __maybe_unused
> > > +fec_enet_copybreak(struct net_device *ndev, struct sk_buff **skb,
> > > + struct bufdesc *bdp, u32 length, bool swap)
> > > {
> >
> > Why add __maybe_unused? If its not used, remove it. We don't leave dead
> > functions in the code.
> >
>
> I was thinking to remove them by a separate patch once the page pool solution is accepted.
Then say that in the commit message. The commit message is how you
answer questions the Maintainers might have, without them having to
ask.
What is small packet performance like on the imx6? If you provide some
numbers as to how small the reduction in performance is, we can decide
if the reduction in complexity is worth it.
Andrew