From patchwork Thu Dec 13 15:20:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Burman X-Patchwork-Id: 206136 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 623362C0080 for ; Fri, 14 Dec 2012 02:56:53 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755603Ab2LMP4v (ORCPT ); Thu, 13 Dec 2012 10:56:51 -0500 Received: from eu1sys200aog113.obsmtp.com ([207.126.144.135]:40668 "HELO eu1sys200aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755360Ab2LMP4u (ORCPT ); Thu, 13 Dec 2012 10:56:50 -0500 Received: from mtlsws123.lab.mtl.com ([82.166.227.17]) (using TLSv1) by eu1sys200aob113.postini.com ([207.126.147.11]) with SMTP ID DSNKUMn6uz9r6iZAlDFD6k6UMs04SR054cGn@postini.com; Thu, 13 Dec 2012 15:56:49 UTC Received: from r-vnc09.lab.mtl.com (r-vnc09.mtr.labs.mlnx [10.208.0.120]) by mtlsws123.lab.mtl.com (8.13.8/8.13.8) with ESMTP id qBDFLHFM009680; Thu, 13 Dec 2012 17:21:17 +0200 From: Yan Burman To: "Or Gerlitz" , "Amir Vadai" , netdev@vger.kernel.org, "David S. Miller" , "Ben Hutchings" Cc: Yan Burman Subject: [PATCH net-next] net: ethool: Document struct ethtool_flow_ext Date: Thu, 13 Dec 2012 17:20:59 +0200 Message-Id: <1355412059-25663-1-git-send-email-yanb@mellanox.com> X-Mailer: git-send-email 1.7.10.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add documentation for struct ethtool_flow_ext especially in regard to what flags are needed for which fields. Signed-off-by: Yan Burman Reviewed-by: Ben Hutchings --- include/uapi/linux/ethtool.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index be8c41e..0c9b448 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -503,9 +503,20 @@ union ethtool_flow_union { __u8 hdata[52]; }; +/** + * struct ethtool_flow_ext - additional RX flow fields + * @h_dest: destination MAC address + * @vlan_etype: VLAN EtherType + * @vlan_tci: VLAN tag control information + * @data: user defined data + * + * Note, @vlan_etype, @vlan_tci, and @data are only valid if %FLOW_EXT + * is set in &struct ethtool_rx_flow_spec @flow_type. + * @h_dest is valid if %FLOW_MAC_EXT is set. + */ struct ethtool_flow_ext { __u8 padding[2]; - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ + unsigned char h_dest[ETH_ALEN]; __be16 vlan_etype; __be16 vlan_tci; __be32 data[2]; @@ -519,7 +530,8 @@ struct ethtool_flow_ext { * @m_u: Masks for flow field bits to be matched * @m_ext: Masks for additional field bits to be matched * Note, all additional fields must be ignored unless @flow_type - * includes the %FLOW_EXT flag. + * includes the %FLOW_EXT or %FLOW_MAC_EXT flag + * (see &struct ethtool_flow_ext description). * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC * if packets should be discarded * @location: Location of rule in the table. Locations must be