Re: [net-next RFC PATCH v4 01/15] net: dsa: provide switch operations for tracking the master state

Vladimir Oltean
2021-12-12T18:19:45Z

Hi Florian,

On Sat, Dec 11, 2021 at 08:22:39PM -0800, Florian Fainelli wrote:
> If my kernel is built with no packet scheduler, is not the interface going
> to be configured with noop all of the time?

I made this test and it looks like interfaces that are down use noop,
normal multi-queue interfaces use mq, and stacked interfaces using LLTX
like DSA use noqueue when up:

root@debian:~# zcat /proc/config.gz | grep NET_SCHED
# CONFIG_NET_SCHED is not set
root@debian:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 02:0b:67:72:9a:d5 brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
4: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq state UP group default qlen 1000
link/ether de:79:92:89:2e:e6 brd ff:ff:ff:ff:ff:ff
altname enp0s0f2
inet6 fe80::dc79:92ff:fe89:2ee6/64 scope link
valid_lft forever preferred_lft forever
5: swp0@eno2: <BROADCAST,MULTICAST> mtu 1504 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
6: swp1@eno2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
7: swp2@eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc noqueue state UP group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
inet6 fe80::a4f4:afff:fefd:fc73/64 scope link
valid_lft forever preferred_lft forever
8: sw0p0@swp0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
9: sw0p1@swp0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
10: sw0p2@swp0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
11: sw2p0@swp2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
inet6 fe80::a4f4:afff:fefd:fc73/64 scope link
valid_lft forever preferred_lft forever
12: sw2p1@swp2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
13: sw2p2@swp2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff
14: sw2p3@swp2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6:f4:af:fd:fc:73 brd ff:ff:ff:ff:ff:ff

Would this test be sufficient or do you have a specific concern?