From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
davem@davemloft.net, netdev@vger.kernel.org, gospo@redhat.com
Subject: Re: [net-next 30/40] ixgbe: add support for nfc addition and removal of filters
Date: Tue, 07 Jun 2011 15:39:10 -0700 [thread overview]
Message-ID: <4DEEA88E.3020006@intel.com> (raw)
In-Reply-To: <1307481879.2908.25.camel@bwh-desktop>
On 06/07/2011 02:24 PM, Ben Hutchings wrote:
> On Tue, 2011-06-07 at 05:33 -0700, Jeff Kirsher wrote:
>> From: Alexander Duyck<alexander.h.duyck@intel.com>
>>
>> This change is meant to allow for nfc to insert and remove filters in order
>> to test the ethtool interface which includes it's own rules manager.
>>
>> Signed-off-by: Alexander Duyck<alexander.h.duyck@intel.com>
>> Tested-by: Ross Brattain<ross.b.brattain@intel.com>
>> Signed-off-by: Jeff Kirsher<jeffrey.t.kirsher@intel.com>
>> ---
>> drivers/net/ixgbe/ixgbe_ethtool.c | 245 +++++++++++++++++++++++++++++++++++++
>> drivers/net/ixgbe/ixgbe_main.c | 45 +++++++
>> 2 files changed, 290 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
>> index 2c70363..f37c9b8 100644
>> --- a/drivers/net/ixgbe/ixgbe_ethtool.c
>> +++ b/drivers/net/ixgbe/ixgbe_ethtool.c
> [...]
>> + /* Copy input into formatted structures */
>> + input->filter.formatted.src_ip[0] = fsp->h_u.tcp_ip4_spec.ip4src;
>> + mask.formatted.src_ip[0] = fsp->m_u.tcp_ip4_spec.ip4src;
>> + input->filter.formatted.dst_ip[0] = fsp->h_u.tcp_ip4_spec.ip4dst;
>> + mask.formatted.dst_ip[0] = fsp->m_u.tcp_ip4_spec.ip4dst;
>> + input->filter.formatted.src_port = fsp->h_u.tcp_ip4_spec.psrc;
>> + mask.formatted.src_port = fsp->m_u.tcp_ip4_spec.psrc;
>> + input->filter.formatted.dst_port = fsp->h_u.tcp_ip4_spec.pdst;
>> + mask.formatted.dst_port = fsp->m_u.tcp_ip4_spec.pdst;
>> +
>> + if (fsp->flow_type& FLOW_EXT) {
>> + input->filter.formatted.vm_pool =
>> + (unsigned char)ntohl(fsp->h_ext.data[1]);
>> + mask.formatted.vm_pool =
>> + (unsigned char)ntohl(fsp->m_ext.data[1]);
>> + input->filter.formatted.vlan_id = fsp->h_ext.vlan_tci;
>> + mask.formatted.vlan_id = fsp->m_ext.vlan_tci;
>> + input->filter.formatted.flex_bytes =
>> + fsp->h_ext.vlan_etype;
>> + mask.formatted.flex_bytes = fsp->m_ext.vlan_etype;
>> + }
> [...]
>
> Sure you don't need any byte-swapping for the IP, port, and VLAN tag?
>
> Also is the 'vlan_id' field used to match the whole VLAN/priority tag or
> only the VID? If it only matches the VID then you need to check that
> the priority and CF bits are not set in the given mask.
>
> Ben.
I'm pretty sure that is all correct. The input filter for the Flow
Director hashes has everything in big-endian byte order. Most of the
input fields in the hardware for the perfect filters also accept things
in big-endian byte order. So it is in my best interest to just leave
things in that byte order since that way I have to do as few byte swaps
as possible.
The VLAN field can include the VLAN priority. There is a check of the
input masks done that verifies that the valid VLAN masks can be 0xEFFF,
0xE000, 0x0FFF, and 0x0000. This mask is anded against the input data
when setting up the filter so there isn't any way that a input with a CF
bit would be valid.
Thanks,
Alex
next prev parent reply other threads:[~2011-06-07 22:39 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 12:32 [net-next 00/40][pull request] Intel Wired LAN Driver Update Jeff Kirsher
2011-06-07 12:32 ` [net-next 01/40] e1000e: disable far-end loopback mode on ESB2 Jeff Kirsher
2011-06-07 12:32 ` [net-next 02/40] e1000e: 82579 intermittently disabled during S0->Sx Jeff Kirsher
2011-06-07 12:32 ` [net-next 03/40] e1000e: log when swflag is cleared unexpectedly on ICH/PCH devices Jeff Kirsher
2011-06-07 12:32 ` [net-next 04/40] e1000e: do not schedule the Tx queue until ready Jeff Kirsher
2011-06-07 12:32 ` [net-next 05/40] e1000e: access multiple PHY registers on same page at the same time Jeff Kirsher
2011-06-07 12:32 ` [net-next 06/40] e1000e: Clear host wakeup bit on 82577/8 without touching PHY page 800 Jeff Kirsher
2011-06-07 12:32 ` [net-next 07/40] e1000e: remove redundant reverse dependency on CRC32 Jeff Kirsher
2011-06-07 12:32 ` [net-next 08/40] e1000e: update driver version Jeff Kirsher
2011-06-07 12:32 ` [net-next 09/40] igbvf: update version number Jeff Kirsher
2011-06-07 12:32 ` [net-next 10/40] igb: Change version to remove number after -k in kernel versions Jeff Kirsher
2011-06-07 12:32 ` [net-next 11/40] ixgbe: dcbnl reduce duplicated code and indentation Jeff Kirsher
2011-06-07 12:32 ` [net-next 12/40] ixgbe: consolidate packet buffer allocation Jeff Kirsher
2011-06-07 12:32 ` [net-next 13/40] ixgbe: consolidate MRQC and MTQC handling Jeff Kirsher
2011-06-07 12:32 ` [net-next 14/40] ixgbe: configure minimal packet buffers to support TC Jeff Kirsher
2011-06-07 12:32 ` [net-next 15/40] ixgbe: DCB use existing TX and RX queues Jeff Kirsher
2011-06-07 12:32 ` [net-next 16/40] ixgbe: DCB 82598 devices, tx_idx and rx_idx swapped Jeff Kirsher
2011-06-07 12:32 ` [net-next 17/40] ixgbe: setup redirection table for multiple packet buffers Jeff Kirsher
2011-06-07 12:32 ` [net-next 18/40] ixgbe: fix bit mask for DCB version Jeff Kirsher
2011-06-07 12:32 ` [net-next 19/40] ixgbe: DCB and perfect filters can coexist Jeff Kirsher
2011-06-07 12:32 ` [net-next 20/40] ixgbe: DCB, remove unneeded ixgbe_dcb_txq_to_tc() routine Jeff Kirsher
2011-06-07 12:32 ` [net-next 21/40] ixgbe: add support for Dell CEM Jeff Kirsher
2011-06-07 12:32 ` [net-next 22/40] ixgbe: setup per CPU PCI pool for FCoE DDP Jeff Kirsher
2011-06-07 12:32 ` [net-next 23/40] ixgbe: use per NUMA node lock " Jeff Kirsher
2011-06-07 12:32 ` [net-next 24/40] ixgbe: alloc DDP PCI pool and ixgbe queues as per NUMA nodes Jeff Kirsher
2011-06-07 12:58 ` Ben Hutchings
2011-06-14 0:14 ` Vasu Dev
2011-06-07 12:33 ` [net-next 25/40] ixgbe: remove ntuple filtering Jeff Kirsher
2011-06-07 12:33 ` [net-next 26/40] ixgbe: fix flags relating to perfect filters to support coexistence Jeff Kirsher
2011-06-07 12:33 ` [net-next 27/40] ixgbe: update perfect filter framework to support retaining filters Jeff Kirsher
2011-06-07 12:33 ` [net-next 28/40] ixgbe: add basic support for setting and getting nfc controls Jeff Kirsher
2011-06-07 12:33 ` [net-next 29/40] ixgbe: add support for displaying ntuple filters via the nfc interface Jeff Kirsher
2011-06-07 12:33 ` [net-next 30/40] ixgbe: add support for nfc addition and removal of filters Jeff Kirsher
2011-06-07 21:24 ` Ben Hutchings
2011-06-07 22:39 ` Alexander Duyck [this message]
2011-06-07 12:33 ` [net-next 31/40] ethtool: remove support for ETHTOOL_GRXNTUPLE Jeff Kirsher
2011-06-07 13:06 ` Ben Hutchings
2011-06-07 22:20 ` Alexander Duyck
2011-06-07 12:33 ` [net-next 32/40] ixgbe: add support for modifying UDP RSS flow hash options Jeff Kirsher
2011-06-07 12:33 ` [net-next 33/40] ixgbe: move setting RSC into a separate function Jeff Kirsher
2011-06-07 12:33 ` [net-next 34/40] ixgbe: move reset code " Jeff Kirsher
2011-06-07 12:33 ` [net-next 35/40] ixgbe: disable RSC when Rx checksum is off Jeff Kirsher
2011-06-07 12:33 ` [net-next 36/40] ixgbe: fix ring assignment issues for SR-IOV and drop cases Jeff Kirsher
2011-06-07 12:33 ` [net-next 37/40] rtnetlink: Compute and store minimum ifinfo dump size Jeff Kirsher
2011-06-08 6:09 ` Johannes Berg
2011-06-08 7:12 ` David Miller
2011-06-07 12:33 ` [net-next 38/40] ixgbe: Update feature flags so that LRO and Ntuple are restricted Jeff Kirsher
2011-06-07 13:15 ` Ben Hutchings
2011-06-07 22:32 ` Alexander Duyck
2011-06-07 12:33 ` [net-next 39/40] ixgbe: update driver version string Jeff Kirsher
2011-06-07 12:33 ` [net-next 40/40] ixgbevf: Update the driver string Jeff Kirsher
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=4DEEA88E.3020006@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).