In blamed commit, I added a check against the temporary queue
built in __dev_xmit_skb(). Idea was to drop packets early,
before any spinlock was acquired.
if (unlikely(defer_count > READ_ONCE(q->limit))) {
kfree_skb_reason(skb, SKB_DROP_REASON_QDISC_DROP);
return NET_XMIT_DROP;
}
It turned out that HTB Qdisc has a zero q->limit.
HTB limits packets on a per-class basis.
Some of our tests became flaky.
Add a new sysctl : net.core.qdisc_max_burst to control
how many packets can be stored in the temporary lockless queue.
Also add a new QDISC_BURST_DROP drop reason to better diagnose
future issues.
Thanks Neal !
Fixes: 100dfa74ca ("net: dev_queue_xmit() llist adoption")
Reported-and-bisected-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Link: https://patch.msgid.link/20260107104159.3669285-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
31 lines
840 B
C
31 lines
840 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#include <linux/cache.h>
|
|
#include <linux/jiffies.h>
|
|
#include <linux/list.h>
|
|
#include <net/aligned_data.h>
|
|
#include <net/hotdata.h>
|
|
#include <net/ip.h>
|
|
#include <net/proto_memory.h>
|
|
|
|
struct net_hotdata net_hotdata __cacheline_aligned = {
|
|
.offload_base = LIST_HEAD_INIT(net_hotdata.offload_base),
|
|
.gro_normal_batch = 8,
|
|
|
|
.netdev_budget = 300,
|
|
/* Must be at least 2 jiffes to guarantee 1 jiffy timeout */
|
|
.netdev_budget_usecs = 2 * USEC_PER_SEC / HZ,
|
|
|
|
.tstamp_prequeue = 1,
|
|
.max_backlog = 1000,
|
|
.qdisc_max_burst = 1000,
|
|
.dev_tx_weight = 64,
|
|
.dev_rx_weight = 64,
|
|
.sysctl_max_skb_frags = MAX_SKB_FRAGS,
|
|
.sysctl_skb_defer_max = 128,
|
|
.sysctl_mem_pcpu_rsv = SK_MEMORY_PCPU_RESERVE
|
|
};
|
|
EXPORT_SYMBOL(net_hotdata);
|
|
|
|
struct net_aligned_data net_aligned_data;
|
|
EXPORT_IPV6_MOD(net_aligned_data);
|