Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: always dump full packets with skb_dump

Currently skb_dump has a restriction to only dump full packet for the
first 5 socket buffers, then only headers will be printed. Remove this
arbitrary and confusing restriction, which is only documented vaguely
("up to") in the comments above the prototype.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vladimir Oltean and committed by
David S. Miller
302af7c6 717f2034

+1 -5
+1 -5
net/core/skbuff.c
··· 712 712 * 713 713 * Must only be called from net_ratelimit()-ed paths. 714 714 * 715 - * Dumps up to can_dump_full whole packets if full_pkt, headers otherwise. 715 + * Dumps whole packets if full_pkt, only headers otherwise. 716 716 */ 717 717 void skb_dump(const char *level, const struct sk_buff *skb, bool full_pkt) 718 718 { 719 - static atomic_t can_dump_full = ATOMIC_INIT(5); 720 719 struct skb_shared_info *sh = skb_shinfo(skb); 721 720 struct net_device *dev = skb->dev; 722 721 struct sock *sk = skb->sk; ··· 723 724 bool has_mac, has_trans; 724 725 int headroom, tailroom; 725 726 int i, len, seg_len; 726 - 727 - if (full_pkt) 728 - full_pkt = atomic_dec_if_positive(&can_dump_full) >= 0; 729 727 730 728 if (full_pkt) 731 729 len = skb->len;