[Cake] [PATCH net] sched: consistently handle layer3 header accesses in the presence of VLANs

Davide Caratti dcaratti at redhat.com
Fri Jul 3 08:53:50 EDT 2020


hello Toke,

thanks for answering!

On Fri, 2020-07-03 at 14:05 +0200, Toke Høiland-Jørgensen wrote:
>   while (proto == htons(ETH_P_8021Q) || proto == htons(ETH_P_8021AD)) {

maybe this line be shortened, since if_vlan.h has [1]:

while (eth_type_vlan(proto)) {
 	...
}

If I read well, the biggest change from functional point of view is that
now qdiscs can set the ECN bit also on non-accelerated VLAN packets and
QinQ-tagged packets, if the IP header is the outer-most header after VLAN;
and the same applies to almost all net/sched former users of skb->protocol 
or tc_skb_protocol().

Question (sorry in advance because it might be a dumb one :) ):

do you know why cls_flower, act_ct, act_mpls and act_connmark keep reading
skb->protocol? is that intentional?

(for act_mpls that doesn't look intentional, and probably the result is
that the BOS bit is not set correctly if someone tries to push/pop a label
for a non-accelerated or QinQ packet. But I didn't try it experimentally
:) )

[1] https://elixir.bootlin.com/linux/latest/source/include/linux/if_vlan.h#L300

-- 
davide




More information about the Cake mailing list