[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iLeUSOhVRM=Fm3Fnq1qi68sqAqzAMqMZnbLHqJdcpUbWQ@mail.gmail.com>
Date: Sun, 7 Apr 2024 10:03:56 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Willem de Bruijn <willemb@...gle.com>, netdev@...r.kernel.org,
eric.dumazet@...il.com
Subject: Re: [PATCH net-next] net: display more skb fields in skb_dump()
On Sat, Apr 6, 2024 at 7:48 PM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
> Eric Dumazet wrote:
> > Print these additional fields in skb_dump()
> >
> > - mac_len
> > - priority
> > - mark
> > - alloc_cpu
> > - vlan_all
> > - encapsulation
> > - inner_protocol
> > - inner_mac_header
> > - inner_network_header
> > - inner_transport_header
> >
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>
> Reviewed-by: Willem de Bruijn <willemb@...gle.com>
>
> > ---
> > net/core/skbuff.c | 12 +++++++++---
> > 1 file changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > index 2a5ce6667bbb9bb70e89d47abda5daca5d16aae2..fa0d1364657e001c6668aafaf2c2a3d434980798 100644
> > --- a/net/core/skbuff.c
> > +++ b/net/core/skbuff.c
> > @@ -1304,13 +1304,16 @@ void skb_dump(const char *level, const struct sk_buff *skb, bool full_pkt)
> > has_trans = skb_transport_header_was_set(skb);
> >
> > printk("%sskb len=%u headroom=%u headlen=%u tailroom=%u\n"
> > - "mac=(%d,%d) net=(%d,%d) trans=%d\n"
> > + "mac=(%d,%d) mac_len=%u net=(%d,%d) trans=%d\n"
> > "shinfo(txflags=%u nr_frags=%u gso(size=%hu type=%u segs=%hu))\n"
> > "csum(0x%x ip_summed=%u complete_sw=%u valid=%u level=%u)\n"
>
> If touching this function, also add csum_start and csum_offset?
> These are technically already present in csum, as it's a union:
>
> union {
> __wsum csum;
> struct {
> __u16 csum_start;
> __u16 csum_offset;
> };
> };
>
> But it is a bit annoying to have to do the conversion manually.
> And this is a regular playground for syzbot.
I agree, I am adding them in V2, thanks !
Powered by blists - more mailing lists