All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartek Kois <bartek.kois@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: Problem with queuing vlan tagged packets after migration from 3.16.0 to 4.9.0
Date: Thu, 3 Jan 2019 16:25:58 +0100	[thread overview]
Message-ID: <0498cc65-fd90-034a-2a23-9b2fdc3ef3c0@gmail.com> (raw)
In-Reply-To: <CAM_iQpU332Vrv5bZ10TYJ-crRUR0Y2yzgY41+eChs3hGJQzaoA@mail.gmail.com>

Hi
1. What exactly caused this change in the kernel?
2. I don`t understand why adding VLAN tag, which is just 4  additional 
bytes to the passing packet make it impossible to classify.
3. This whole thing makes the QoS under Linux routers hard to configure 
in scenarios with more than one VLAN which is pretty much every slightly 
bigger router nowadays especially if we use IFB and hashing filters. Is 
there any walkaround for that problem?

Best regards
Bartek Kois

W dniu 03.01.2019 o 04:30, Cong Wang pisze:
> On Tue, Jan 1, 2019 at 11:46 AM Bartek Kois <bartek.kois@gmail.com> wrote:
>> Hi
>> Yes it did work since I remember (like around 2.4.x) and it changed
>> since I moved from Debian 8 to 9. I would appreciate fixing that in the
>> future beacuse it is essential for queueing traffic on the routers, but
>> the question is why these filters don`t work in that case:
>>
>>       tc filter add dev $LAN_ETH parent 1:0 protocol ip prio 4 u32 match
>> u32 0x0a000c08 0xffffffff at 20 classid 1:2001      # for 10.0.12.8 ip
>> address
>>       tc filter add dev $LAN_ETH parent 1:0 protocol ip prio 4 u32 match
>> u32 0x0a000c09 0xffffffff at 20 classid 1:2002      # for 10.0.12.9 ip
>> address
>>       tc filter add dev $LAN_ETH parent 1:0 protocol ip prio 4 u32 match
>> u32 0x0a000c10 0xffffffff at 20 classid 1:2003      # for 10.0.12.10 ip
>> address
>>
>> I`ve changed "at 16" which works without vlan tags to "at 20" to take
>> vlan tag into account.
> Yeah, this confirms my speculation.
>
> The problem is essentially a design flaw of u32 filter, the IP header
> and TCP header offsets are never fixed, for example VLAN tagging and
> IP options. What's more, it is not easy for user-space to learn the offset
> for different packets as it requires to parse into each packets.
>
> I don't know whether we can fix this either, VLAN call path probably
> already makes assumptions on the current skb->data position, if
> we "fix" it for u32, it would probably break other things.

  reply	other threads:[~2019-01-03 15:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-29 12:52 Problem with queuing vlan tagged packets after migration from 3.16.0 to 4.9.0 Bartek Kois
2018-12-30 18:53 ` Cong Wang
2018-12-30 21:14   ` Bartek Kois
2018-12-31 18:13     ` Bartek Kois
2019-01-01 19:33       ` Cong Wang
2019-01-01 19:46         ` Bartek Kois
2019-01-03  3:30           ` Cong Wang
2019-01-03 15:25             ` Bartek Kois [this message]
2019-01-03 20:44               ` Cong Wang
2019-01-04 18:11                 ` Bartek Kois
2019-01-05  5:03                   ` Cong Wang
2019-01-06 14:44                     ` Jamal Hadi Salim
2019-01-10 13:45                       ` Simon Horman
2019-01-12 12:12                         ` Jamal Hadi Salim
2019-01-13 18:22                           ` Cong Wang
2019-01-15 15:09                             ` Jamal Hadi Salim
2019-01-15 18:19                               ` Cong Wang
2019-01-16 14:13                                 ` Jamal Hadi Salim
2019-01-14  8:12                           ` Simon Horman
2019-01-15 15:16                             ` Jamal Hadi Salim
2019-01-18  4:32                       ` Eric W. Biederman
2019-01-03 21:49               ` Anton Danilov
2019-01-04  7:07                 ` Bartek Kois
2018-12-31 21:47 ` Jakub Kicinski
2018-12-31 22:12   ` Bartek Kois

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0498cc65-fd90-034a-2a23-9b2fdc3ef3c0@gmail.com \
    --to=bartek.kois@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.