netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Amir Vadai <amirv@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Yan Burman <yanb@mellanox.com>
Subject: Re: [PATCH net-next 1/2] net: ethtool: Add destination MAC address to flow steering API
Date: Tue, 11 Dec 2012 09:37:50 -0800	[thread overview]
Message-ID: <50C76F6E.2010600@intel.com> (raw)
In-Reply-To: <1355227436-18383-2-git-send-email-amirv@mellanox.com>

On 12/11/2012 04:03 AM, Amir Vadai wrote:
> From: Yan Burman <yanb@mellanox.com>
> 
> Add ability to specify destination MAC address for L3/L4 flow spec
> in order to be able to specify action for different VM's under vSwitch
> configuration. This change is transparent to older userspace.
> 
> Signed-off-by: Yan Burman <yanb@mellanox.com>
> Signed-off-by: Amir Vadai <amirv@mellanox.com>
> ---
>  include/uapi/linux/ethtool.h | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index d3eaaaf..be8c41e 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -500,13 +500,15 @@ union ethtool_flow_union {
>  	struct ethtool_ah_espip4_spec		esp_ip4_spec;
>  	struct ethtool_usrip4_spec		usr_ip4_spec;
>  	struct ethhdr				ether_spec;
> -	__u8					hdata[60];
> +	__u8					hdata[52];
>  };
>  
>  struct ethtool_flow_ext {
> -	__be16	vlan_etype;
> -	__be16	vlan_tci;
> -	__be32	data[2];
> +	__u8		padding[2];
> +	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
> +	__be16		vlan_etype;
> +	__be16		vlan_tci;
> +	__be32		data[2];
>  };
>  

Is there any special reason why you need to change the size of this
structure?  It seems like you could probably just replace the data
section with a union containing either 8 bytes of user specified data or
your MAC address data.  Then we wouldn't need all of the changes to the
rest of the flow specifier.

Thanks,

Alex

  reply	other threads:[~2012-12-11 17:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11 12:03 [PATCH net-next 0/3] Add destination MAC address to ethtool flow steering Amir Vadai
2012-12-11 12:03 ` [PATCH net-next 1/2] net: ethtool: Add destination MAC address to flow steering API Amir Vadai
2012-12-11 17:37   ` Alexander Duyck [this message]
2012-12-11 19:55     ` Or Gerlitz
2012-12-11 20:57       ` Alexander Duyck
2012-12-12 17:17   ` Ben Hutchings
2012-12-11 12:03 ` [PATCH net-next 2/2] net/mlx4_en: Add support for destination MAC in steering rules Amir Vadai
2012-12-11 15:38   ` Brian Haley
2012-12-12 10:07     ` Amir Vadai
2012-12-11 12:03 ` [PATCH ETHTOOL] Added dst-mac parameter for L3/L4 flow spec rules. This is usefull in vSwitch configurations Amir Vadai
2013-01-22 20:27   ` Ben Hutchings

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=50C76F6E.2010600@intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=amirv@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=yanb@mellanox.com \
    /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).