netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Rose, Gregory V" <gregory.v.rose@intel.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"gospo@redhat.com" <gospo@redhat.com>
Subject: Re: [net-next 05/10] if_link: Add additional parameter to IFLA_VF_INFO for spoof checking
Date: Mon, 26 Sep 2011 09:37:57 -0700	[thread overview]
Message-ID: <20110926093757.6a9fa23e@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <43F901BD926A4E43B106BF17856F0755019C5193B4@orsmsx508.amr.corp.intel.com>

On Mon, 26 Sep 2011 09:32:35 -0700
"Rose, Gregory V" <gregory.v.rose@intel.com> wrote:

> > -----Original Message-----
> > From: Stephen Hemminger [mailto:shemminger@vyatta.com]
> > Sent: Monday, September 26, 2011 9:14 AM
> > To: Ben Hutchings
> > Cc: Kirsher, Jeffrey T; davem@davemloft.net; Rose, Gregory V;
> > netdev@vger.kernel.org; gospo@redhat.com
> > Subject: Re: [net-next 05/10] if_link: Add additional parameter to
> > IFLA_VF_INFO for spoof checking
> > 
> > On Sun, 25 Sep 2011 21:06:49 +0100
> > Ben Hutchings <bhutchings@solarflare.com> wrote:
> > 
> > > On Sun, 2011-09-25 at 10:22 -0700, Stephen Hemminger wrote:
> > > > On Sat, 24 Sep 2011 02:17:38 -0700
> > > > Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote:
> > > >
> > > > > From: Greg Rose <gregory.v.rose@intel.com>
> > > > >
> > > > > Add configuration setting for drivers to turn spoof checking on or
> > off
> > > > > for discrete VFs.
> > > > >
> > > > > Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
> > > > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > > > > ---
> > > > >  include/linux/if_link.h   |    7 +++++++
> > > > >  include/linux/netdevice.h |    3 +++
> > > > >  net/core/rtnetlink.c      |   25 ++++++++++++++++++++++---
> > > > >  3 files changed, 32 insertions(+), 3 deletions(-)
> > > > >
> > > > > diff --git a/include/linux/if_link.h b/include/linux/if_link.h
> > > > > index 0ee969a..8bd6d6d 100644
> > > > > --- a/include/linux/if_link.h
> > > > > +++ b/include/linux/if_link.h
> > > > > @@ -279,6 +279,7 @@ enum {
> > > > >  	IFLA_VF_MAC,		/* Hardware queue specific attributes
> > */
> > > > >  	IFLA_VF_VLAN,
> > > > >  	IFLA_VF_TX_RATE,	/* TX Bandwidth Allocation */
> > > > > +	IFLA_VF_SPOOFCHK,	/* Spoof Checking on/off switch */
> > > > >  	__IFLA_VF_MAX,
> > > > >  };
> > > > >
> > > > > @@ -300,12 +301,18 @@ struct ifla_vf_tx_rate {
> > > > >  	__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling
> > */
> > > > >  };
> > > > >
> > > > > +struct ifla_vf_spoofchk {
> > > > > +	__u32 vf;
> > > > > +	__u32 setting;
> > > > > +};
> > > > > +
> > > > >  struct ifla_vf_info {
> > > > >  	__u32 vf;
> > > > >  	__u8 mac[32];
> > > > >  	__u32 vlan;
> > > > >  	__u32 qos;
> > > > >  	__u32 tx_rate;
> > > > > +	__u32 spoofchk;
> > > > >  };
> > > >
> > > > This breaks ABI compatibility, unless you add some special case code
> > > > to handle the case of tools sending the old ifla_vf_info. Users may
> > have older version
> > > > of ip utilities that send smaller size structure.
> > >
> > > Unless I'm missing something, that structure is not sent or received by
> > > userland; that's why I thought it should be #ifdef __KERNEL__.
> > 
> > The struct ifla_vf_info is exposed to userland, it is not inside the
> > #ifdef
> > and therefore exposed.
> > 
> > But it is probably okay to change this structure because the ifla_vf_info
> > is not used/supported by any released version iproute2.  There may have
> > been
> > some patches to use this, but they never made it into the git or released
> > code.
> > 
> 
> I will respin the patches with *ifdef __KERNEL__ wrapper.
> 
> Thanks,
> 
> - Greg
> 

Just make spoofchk a new nested attribute.

  reply	other threads:[~2011-09-26 16:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-24  9:17 [net-next 00/10][pull request] Intel Wired LAN Drivers Update Jeff Kirsher
2011-09-24  9:17 ` [net-next 01/10] e1000: don't enable dma receives until after dma address has been setup Jeff Kirsher
2011-09-24  9:17 ` [net-next 02/10] ixgbevf: Fix broken trunk vlan Jeff Kirsher
2011-09-24 16:33   ` Jesse Gross
2011-09-25  5:47     ` Jeff Kirsher
2011-09-26 15:57     ` Rose, Gregory V
2011-09-26 23:08       ` Jesse Gross
2011-09-26 23:24         ` Rose, Gregory V
2011-09-27  0:54           ` Jesse Gross
2011-09-27 16:39             ` Rose, Gregory V
2011-09-27 16:49               ` Jesse Gross
2011-09-24  9:17 ` [net-next 03/10] ixgbe: Cleanup q_vector interrupt throttle rate logic Jeff Kirsher
2011-09-24  9:17 ` [net-next 04/10] ixgbe: disable LLI for FCoE Jeff Kirsher
2011-09-24  9:17 ` [net-next 05/10] if_link: Add additional parameter to IFLA_VF_INFO for spoof checking Jeff Kirsher
2011-09-24 16:40   ` Ben Hutchings
2011-09-25  5:54     ` Jeff Kirsher
2011-09-26 16:06     ` Rose, Gregory V
2011-09-25 17:22   ` Stephen Hemminger
2011-09-25 20:06     ` Ben Hutchings
2011-09-26 16:14       ` Stephen Hemminger
2011-09-26 16:32         ` Rose, Gregory V
2011-09-26 16:37           ` Stephen Hemminger [this message]
2011-09-26 16:18     ` Rose, Gregory V
2011-09-26 16:21       ` Stephen Hemminger
2011-09-26 16:57         ` Rose, Gregory V
2011-09-24  9:17 ` [net-next 06/10] ixgbe: Add new netdev op to turn spoof checking on or off per VF Jeff Kirsher
2011-09-24  9:17 ` [net-next 07/10] ixgbe: update {P}FC thresholds to account for X540 and loopback Jeff Kirsher
2011-09-24  9:17 ` [net-next 08/10] ixgbe add thermal sensor support for x540 hardware Jeff Kirsher
2011-09-24  9:17 ` [net-next 09/10] ixgbe: cleanup ixgbe_setup_gpie() for X540 Jeff Kirsher
2011-09-24  9:17 ` [net-next 10/10] ixgbe: add ECC warning for legacy interrupts Jeff Kirsher

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=20110926093757.6a9fa23e@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=gregory.v.rose@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    /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).