From: Ben Hutchings <bhutchings@solarflare.com>
To: zhou rui <zhourui.cn@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: how to set vlan filter for intel 82599
Date: Tue, 26 Apr 2011 03:57:18 +0100 [thread overview]
Message-ID: <1303786638.3032.307.camel@localhost> (raw)
In-Reply-To: <BANLkTikZcdda5-3NBaXyKmij09f62Da3cQ@mail.gmail.com>
On Tue, 2011-04-26 at 10:19 +0800, zhou rui wrote:
> hi
> here is the problem troubles me,how to set vlan filter for intel
> 82599? for example
> I want vlan id 0~31 will go to queue 0, vlan id 32-63 will go to queue
> 1...below is my setting,but doesn't work
>
> don't know the exact meanning of the vlan-mask and vlan,how are they calculated?
>
> ./ethtool -K eth5 ntuple on
>
> ./ethtool -U eth5 flow-type udp4 src-ip 0x0 src-ip-mask 0x0 dst-ip 0x0
> dst-ip-mask 0x0 src-port 0x0 src-port-mask 0x0 dst-port 0x0
> dst-port-mask 0x0 vlan 0x0000 vlan-mask 0x00E0 user-def 0x0
> user-def-mask 0x0 action 0
[...]
This specifies a filter for UDP/IPv4 packets, and the masks are wrong.
If you actually wanted to filter only UDP/IPv4 packets for VID 0-31 then
the correct syntax would be:
ethtool -U eth5 flow-type udp4 vlan 0 vlan-mask 0xf01f
If you don't care about the layer 3/4 protocols then you would need to
use 'flow-type ether', but no driver implements that yet. (Well, sfc
implements the *type*, but not filtering by VID only.)
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-04-26 2:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 2:19 how to set vlan filter for intel 82599 zhou rui
2011-04-26 2:57 ` Ben Hutchings [this message]
2011-04-26 3:39 ` zhou rui
2011-04-26 3:51 ` Ben Hutchings
2011-04-26 4:39 ` zhou rui
2011-04-26 13:31 ` Ben Hutchings
2011-04-26 15:22 ` Alexander Duyck
2011-04-26 15:30 ` zhou rui
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=1303786638.3032.307.camel@localhost \
--to=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=zhourui.cn@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.