netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethool: Document struct ethtool_flow_ext
@ 2012-12-13 15:20 Yan Burman
  2012-12-13 16:27 ` Ben Hutchings
  2012-12-13 18:01 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Yan Burman @ 2012-12-13 15:20 UTC (permalink / raw)
  To: Or Gerlitz, Amir Vadai, netdev, David S. Miller, Ben Hutchings; +Cc: Yan Burman

Add documentation for struct ethtool_flow_ext especially in regard
to what flags are needed for which fields.

Signed-off-by: Yan Burman <yanb@mellanox.com>
---
 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
-- 
1.7.11.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: ethool: Document struct ethtool_flow_ext
  2012-12-13 15:20 [PATCH net-next] net: ethool: Document struct ethtool_flow_ext Yan Burman
@ 2012-12-13 16:27 ` Ben Hutchings
  2012-12-13 18:01 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2012-12-13 16:27 UTC (permalink / raw)
  To: Yan Burman, David S. Miller; +Cc: Or Gerlitz, Amir Vadai, netdev

On Thu, 2012-12-13 at 17:20 +0200, Yan Burman wrote:
> Add documentation for struct ethtool_flow_ext especially in regard
> to what flags are needed for which fields.
> 
> Signed-off-by: Yan Burman <yanb@mellanox.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>

David, please apply this to 'net' so that FLOW_MAC_EXT is properly
documented in 3.8.

Ben.

> ---
>  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

-- 
Ben Hutchings, Staff 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: ethool: Document struct ethtool_flow_ext
  2012-12-13 15:20 [PATCH net-next] net: ethool: Document struct ethtool_flow_ext Yan Burman
  2012-12-13 16:27 ` Ben Hutchings
@ 2012-12-13 18:01 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-12-13 18:01 UTC (permalink / raw)
  To: yanb; +Cc: ogerlitz, amirv, netdev, bhutchings

From: Yan Burman <yanb@mellanox.com>
Date: Thu, 13 Dec 2012 17:20:59 +0200

> Add documentation for struct ethtool_flow_ext especially in regard
> to what flags are needed for which fields.
> 
> Signed-off-by: Yan Burman <yanb@mellanox.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-13 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-13 15:20 [PATCH net-next] net: ethool: Document struct ethtool_flow_ext Yan Burman
2012-12-13 16:27 ` Ben Hutchings
2012-12-13 18:01 ` David Miller

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).