Revision adfb7b4966c0c4c63a791f202b8b3837b07a9ece authored by Yunsheng Lin on 19 October 2021, 14:16:31 UTC, committed by David S. Miller on 20 October 2021, 10:38:11 UTC
Currently the max tx size supported by the hw is calculated by
using the max BD num supported by the hw. According to the hw
user manual, the max tx size is fixed value for both non-TSO and
TSO skb.

This patch updates the max tx size according to the manual.

Fixes: 8ae10cfb5089("net: hns3: support tx-scatter-gather-fraglist feature")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 731797f
Raw File
rcu-cbs.py
#!/usr/bin/env drgn
# SPDX-License-Identifier: GPL-2.0+
#
# Dump out the number of RCU callbacks outstanding.
#
# On older kernels having multiple flavors of RCU, this dumps out the
# number of callbacks for the most heavily used flavor.
#
# Usage: sudo drgn rcu-cbs.py
#
# Copyright (C) 2021 Facebook, Inc.
#
# Authors: Paul E. McKenney <paulmck@kernel.org>

import sys
import drgn
from drgn import NULL, Object
from drgn.helpers.linux import *

def get_rdp0(prog):
	try:
		rdp0 = prog.variable('rcu_preempt_data', 'kernel/rcu/tree.c');
	except LookupError:
		rdp0 = NULL;

	if rdp0 == NULL:
		try:
			rdp0 = prog.variable('rcu_sched_data',
					     'kernel/rcu/tree.c');
		except LookupError:
			rdp0 = NULL;

	if rdp0 == NULL:
		rdp0 = prog.variable('rcu_data', 'kernel/rcu/tree.c');
	return rdp0.address_of_();

rdp0 = get_rdp0(prog);

# Sum up RCU callbacks.
sum = 0;
for cpu in for_each_possible_cpu(prog):
	rdp = per_cpu_ptr(rdp0, cpu);
	len = rdp.cblist.len.value_();
	# print("CPU " + str(cpu) + " RCU callbacks: " + str(len));
	sum += len;
print("Number of RCU callbacks in flight: " + str(sum));
back to top