From: Alexander Duyck <alexander.h.duyck@intel.com>
To: davem@davemloft.net, jeffrey.t.kirsher@intel.com,
bhutchings@solarflare.com
Cc: netdev@vger.kernel.org
Subject: [net-next-2.6 PATCH 10/10] [RFC] ixgbe: Add support for using the same fields as ntuple in nfc
Date: Fri, 25 Feb 2011 15:33:31 -0800 [thread overview]
Message-ID: <20110225233331.7920.22212.stgit@gitlad.jf.intel.com> (raw)
In-Reply-To: <20110225232357.7920.58559.stgit@gitlad.jf.intel.com>
This change is meant to make use of the NTUPLE_FLOW_EXT to allow the
network flow classifier interface to support the same type of options in
terms of VLAN and User-defined as the ntuple interface.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
drivers/net/ixgbe/ixgbe_ethtool.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index a91e8db..494e1bf 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -2388,6 +2388,13 @@ static int ixgbe_get_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
fsp->m_u.tcp_ip4_spec.ip4src = mask->formatted.src_ip[0];
fsp->h_u.tcp_ip4_spec.ip4dst = rule->filter.formatted.dst_ip[0];
fsp->m_u.tcp_ip4_spec.ip4dst = mask->formatted.dst_ip[0];
+ fsp->h_u.ntuple_spec.vlan_tci = rule->filter.formatted.vlan_id;
+ fsp->m_u.ntuple_spec.vlan_tci = mask->formatted.vlan_id;
+ fsp->h_u.ntuple_spec.vlan_etype = rule->filter.formatted.flex_bytes;
+ fsp->m_u.ntuple_spec.vlan_etype = mask->formatted.flex_bytes;
+ *(u8 *)fsp->h_u.ntuple_spec.data = rule->filter.formatted.vm_pool;
+ *(u8 *)fsp->m_u.ntuple_spec.data = mask->formatted.vm_pool;
+ fsp->flow_type_ext = NTUPLE_FLOW_EXT;
/* record action */
if (rule->action == IXGBE_FDIR_DROP_QUEUE)
@@ -2603,6 +2610,18 @@ static int ixgbe_add_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
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_ext == NTUPLE_FLOW_EXT) {
+ input->filter.formatted.vm_pool =
+ *(unsigned char *)fsp->h_u.ntuple_spec.data;
+ mask.formatted.vm_pool =
+ *(unsigned char *)fsp->m_u.ntuple_spec.data;
+ input->filter.formatted.vlan_id = fsp->h_u.ntuple_spec.vlan_tci;
+ mask.formatted.vlan_id = fsp->m_u.ntuple_spec.vlan_tci;
+ input->filter.formatted.flex_bytes =
+ fsp->h_u.ntuple_spec.vlan_etype;
+ mask.formatted.flex_bytes = fsp->m_u.ntuple_spec.vlan_etype;
+ }
+
/* determine if we need to drop or route the packet */
if (fsp->ring_cookie == RX_CLS_FLOW_DISC)
input->action = IXGBE_FDIR_DROP_QUEUE;
prev parent reply other threads:[~2011-02-25 23:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 23:32 [net-next-2.6 PATCH 00/10] Workarounds and fixes for ntuple filters Alexander Duyck
2011-02-25 23:32 ` [net-next-2.6 PATCH 01/10] ethtool: prevent null pointer dereference with NTUPLE set but no set_rx_ntuple Alexander Duyck
2011-02-26 0:21 ` Ben Hutchings
2011-02-26 0:40 ` Alexander Duyck
2011-02-27 0:07 ` David Miller
2011-02-27 2:16 ` Alexander Duyck
2011-02-25 23:32 ` [net-next-2.6 PATCH 02/10] ethtool: add ntuple flow specifier to network flow classifier Alexander Duyck
2011-02-26 1:00 ` Ben Hutchings
2011-02-26 5:30 ` Alexander Duyck
2011-03-02 18:50 ` Ben Hutchings
2011-03-02 19:11 ` Dimitrios Michailidis
2011-03-02 19:27 ` Ben Hutchings
2011-03-02 20:03 ` Dimitrios Michailidis
2011-03-04 19:30 ` Alexander Duyck
2011-03-04 21:00 ` Alexander Duyck
2011-02-27 0:05 ` David Miller
2011-02-25 23:32 ` [net-next-2.6 PATCH 03/10] [RFC] ixgbe: remove ntuple filtering Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 04/10] [RFC] ethtool: remove support for ETHTOOL_GRXNTUPLE Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 05/10] [RFC] ixgbe: add support for different Rx packet buffer sizes Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 06/10] [RFC] ixgbe: update perfect filter framework to support retaining filters Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 07/10] [RFC] ixgbe: add basic support for settting and getting nfc controls Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 08/10] [RFC] ixgbe: add support for displaying ntuple filters via the nfc interface Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 09/10] [RFC] ixgbe: add support for nfc addition and removal of filters Alexander Duyck
2011-02-25 23:33 ` Alexander Duyck [this message]
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=20110225233331.7920.22212.stgit@gitlad.jf.intel.com \
--to=alexander.h.duyck@intel.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--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).