From: Jiri Pirko <jiri@resnulli.us>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Correct tc-vlan usage
Date: Mon, 20 Apr 2020 16:37:54 +0200 [thread overview]
Message-ID: <20200420143754.GP6581@nanopsycho.orion> (raw)
In-Reply-To: <CA+h21hoxwRdhq4y+w8Kwgm74d4cA0xLeiHTrmT-VpSaM7obhkg@mail.gmail.com>
Wed, Apr 15, 2020 at 07:59:06PM CEST, olteanv@gmail.com wrote:
>Hi,
>
>I am trying to use tc-vlan to create a set of asymmetric tagging
>rules: push VID X on egress, and pop VID Y on ingress. I am using
>tc-vlan specifically because regular VLAN interfaces are unfit for
>this purpose - the VID that gets pushed by the 8021q driver is the
>same as the one that gets popped.
>The rules look like this:
>
># tc filter show dev eno2 ingress
>filter protocol 802.1Q pref 49150 flower chain 0
>filter protocol 802.1Q pref 49150 flower chain 0 handle 0x1
> vlan_id 103
> dst_mac 00:04:9f:63:35:eb
> not_in_hw
> action order 1: vlan pop pipe
> index 6 ref 1 bind 1
>
>filter protocol 802.1Q pref 49151 flower chain 0
>filter protocol 802.1Q pref 49151 flower chain 0 handle 0x1
> vlan_id 102
> dst_mac 00:04:9f:63:35:eb
> not_in_hw
> action order 1: vlan pop pipe
> index 5 ref 1 bind 1
>
>filter protocol 802.1Q pref 49152 flower chain 0
>filter protocol 802.1Q pref 49152 flower chain 0 handle 0x1
> vlan_id 101
> dst_mac 00:04:9f:63:35:eb
> not_in_hw
> action order 1: vlan pop pipe
> index 4 ref 1 bind 1
>
># tc filter show dev eno2 egress
>filter protocol all pref 49150 flower chain 0
>filter protocol all pref 49150 flower chain 0 handle 0x1
> dst_mac 00:04:9f:63:35:ec
> not_in_hw
> action order 1: vlan push id 102 protocol 802.1Q priority 0 pipe
> index 3 ref 1 bind 1
>
>filter protocol all pref 49151 flower chain 0
>filter protocol all pref 49151 flower chain 0 handle 0x1
> dst_mac 00:04:9f:63:35:eb
> not_in_hw
> action order 1: vlan push id 102 protocol 802.1Q priority 0 pipe
> index 2 ref 1 bind 1
>
>filter protocol all pref 49152 flower chain 0
>filter protocol all pref 49152 flower chain 0 handle 0x1
> dst_mac 00:04:9f:63:35:ea
> not_in_hw
> action order 1: vlan push id 102 protocol 802.1Q priority 0 pipe
> index 1 ref 1 bind 1
>
>My problem is that the VLAN tags are discarded by the network
>interface's RX filter:
>
># ethtool -S eno2
> SI VLAN nomatch u-cast discards: 1280
>
>and this is because nobody calls .ndo_vlan_rx_add_vid for these VLANs
>(only the 8021q driver does). This makes me think that I am using the
>tc-vlan driver incorrectly. What step am I missing?
Hmm, that is a good point. Someone should add the vid to the filter. I
believe that "someone" should be the driver in case of flow_offload.
>
>Thanks,
>-Vladimir
next prev parent reply other threads:[~2020-04-20 14:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 17:59 Correct tc-vlan usage Vladimir Oltean
2020-04-15 18:13 ` Edward Cree
2020-04-15 18:14 ` Vladimir Oltean
2020-04-20 14:37 ` Jiri Pirko [this message]
2020-04-21 18:26 ` Vladimir Oltean
2020-04-21 19:51 ` Jiri Pirko
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=20200420143754.GP6581@nanopsycho.orion \
--to=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=olteanv@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox