netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Haley <brian.haley@hp.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 2/2] net/mlx4_en: Add support for destination MAC in steering rules
Date: Tue, 11 Dec 2012 10:38:42 -0500	[thread overview]
Message-ID: <50C75382.3040504@hp.com> (raw)
In-Reply-To: <1355227436-18383-3-git-send-email-amirv@mellanox.com>

On 12/11/2012 07:03 AM, Amir Vadai wrote:
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -619,7 +619,13 @@ static int mlx4_en_validate_flow(struct net_device *dev,
>  	if (cmd->fs.location >= MAX_NUM_OF_FS_RULES)
>  		return -EINVAL;
>  
> -	switch (cmd->fs.flow_type & ~FLOW_EXT) {
> +	if (cmd->fs.flow_type & FLOW_MAC_EXT) {
> +		/* dest mac mask must be ff:ff:ff:ff:ff:ff */
> +		if (memcmp(cmd->fs.m_ext.h_dest, &full_mac, ETH_ALEN))
> +			return -EINVAL;
> +	}

etherdevice.h has is_broadcast_ether_addr() and is_zero_ether_addr() if you want
to get rid of full_mac and zero_mac in this function.

-Brian

  reply	other threads:[~2012-12-11 15:38 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
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 [this message]
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=50C75382.3040504@hp.com \
    --to=brian.haley@hp.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).