@@ -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;
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(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html