[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201126135004.aq2lruz5kxptmsvl@skbuf>
Date: Thu, 26 Nov 2020 15:50:04 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: George McCollister <george.mccollister@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S . Miller " <davem@...emloft.net>, netdev@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH net-next v2 1/3] dsa: add support for Arrow XRS700x tag
trailer
On Wed, Nov 25, 2020 at 09:34:29PM +0100, Andrew Lunn wrote:
> > +static struct sk_buff *xrs700x_rcv(struct sk_buff *skb, struct net_device *dev,
> > + struct packet_type *pt)
> > +{
> > + int source_port;
> > + u8 *trailer;
> > +
> > + if (skb_linearize(skb))
> > + return NULL;
>
> Something for Vladimir:
>
> Could this linearise be moved into the core, depending on the
> tail_tag?
Honestly I believe that the skb_linearize is not needed at all. It is
copy-pasted from tag_trailer.c, a driver that has not exercised at
runtime by anybody for a long time now. The pskb_trim_rcsum function
used for removing the tail tag should do the right thing even with
fragmented packets.
> > + if (pskb_trim_rcsum(skb, skb->len - 1))
> > + return NULL;
>
> And the overhead is also in dsa_devlink_ops, so maybe this can be
> moved as well?
Sorry, I don't understand this comment.
Powered by blists - more mailing lists