Netdev List
 help / color / mirror / Atom feed
* Re: [E1000-devel] [PATCH] e1000: Allow the driver to be used on PA RISC C8000 workstation
From: Grant Grundler @ 2011-07-03  0:33 UTC (permalink / raw)
  To: Matt Turner, Jesse Brandeburg, Kirsher, Jeffrey T
  Cc: Rolf Eike Beer, Guy Martin, e1000-devel@lists.sourceforge.net,
	linux-parisc@vger.kernel.org, mikulas@artax.karlin.mff.cuni.cz,
	netdev
In-Reply-To: <BANLkTimbhOpp624KKU0dEE63mkAC1SDMAg@mail.gmail.com>

On Mon, Jun 27, 2011 at 03:33:43PM -0400, Matt Turner wrote:
> On Mon, Jun 27, 2011 at 2:42 PM, Rolf Eike Beer <eike-kernel@sf-tec.de> wrote:
> > Rolf Eike Beer wrote:
> >> Am Freitag, 18. M?rz 2011, 17:39:57 schrieb Rolf Eike Beer:
> >> > Am Mittwoch, 2. M?rz 2011, 21:19:24 schrieb Jesse Brandeburg:
> >> > > On Mon, Feb 28, 2011 at 5:40 AM, Guy Martin <gmsoft@tuxicoman.be> wrote:
> >> > > > Hi Jeff,
> >> > > >
> >> > > > Any luck getting this into mainline ?
> >> > >
> >> > > Hi Guy, sorry for the delay,
> >> > > We haven't been able to get our contacts in HP to give us a decent
> >> > > response so far, we are following up with them to see whats up. ?We
> >> > > have not lost the patch and are still tracking it internally.
> >> > >
> >> > > Give us a couple more weeks if that is okay and we should be able to
> >> > > settle this by then.
> >> >
> >> > I wonder what exactly you are waiting for? This is a sanity check that
> >> > we
> >> > disable, so no working systems could get broken by this. And every
> >> > single
> >> > C8000 seems to be affected by this and is working fine with that patch.
> >> > So maybe people at HP might have a clue _why_ this is screwed, but
> >> > until then I don't see any point in waiting.
> >> >
> >> > So please just add my tested-by and push this upstream soon. Since this
> >> > is basically a hardware quirk I would like to get this into stable also
> >> > so we may run vanilla 2.6.38.1 or something like that on C8000.
> >> >
> >> > Tested-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
> >>
> >> For the netdev folks: it's this patch we are talking about
> >>
> >> http://www.spinics.net/lists/linux-parisc/msg03091.html
> >>
> >> I would love to see that someone finally picks this up and pushes this
> >> upstream, CC stable. This is absolutely annoying as it breaks every time
> >> anyone touches the kernel on one of this machines.
> >>
> >> Jeff, David, James: can you please make a decision of who takes this and
> >> then just do it?
> >
> > Ping?
> 
> Ping indeed. Waiting as if HP is going to say "yes, we fucked that up.
> Go ahead with the patch." is silly.

AFAIK, HP hasn't paid anyone to work on parisc-linux in almost 10 years.
Good luck finding someone in HP who knows about C8000, much less it's
NIC firmware.

Jesse or Jeff K. should be able to accept the patch as-is.
I don't see any problem with it.

hth,
grant (ex-HP employee: 1999-2002 parisc-linux and 2002-2006 ia64-linux drivers)

^ permalink raw reply

* Re: [RFC 31/72] tulip: Move the tulip drivers
From: Grant Grundler @ 2011-07-03  0:04 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, netdev, Tobias Ringstrom
In-Reply-To: <1309010363-22750-32-git-send-email-jeffrey.t.kirsher@intel.com>

On Sat, Jun 25, 2011 at 06:58:42AM -0700, Jeff Kirsher wrote:
> Move the tulip driver into drivers/net/ethernet/tulip/ and make
> the necessary Kconfig and Makefile changes.
> 
> CC: Tobias Ringstrom <tori@unhappy.mine.nu>
> CC: Grant Grundler <grundler@parisc-linux.org>

Acked-by: Grant Grundler <grundler@parisc-linux.org>

thanks,
grant

> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  MAINTAINERS                                    |    4 +-
>  drivers/net/Kconfig                            |    2 -
>  drivers/net/Makefile                           |    1 -
>  drivers/net/ethernet/Kconfig                   |    2 +
>  drivers/net/ethernet/Makefile                  |    1 +
>  drivers/net/{ => ethernet}/tulip/21142.c       |    0
>  drivers/net/{ => ethernet}/tulip/Kconfig       |   34 ++++++++++-------------
>  drivers/net/{ => ethernet}/tulip/Makefile      |    0
>  drivers/net/{ => ethernet}/tulip/de2104x.c     |    0
>  drivers/net/{ => ethernet}/tulip/de4x5.c       |    0
>  drivers/net/{ => ethernet}/tulip/de4x5.h       |    0
>  drivers/net/{ => ethernet}/tulip/dmfe.c        |    0
>  drivers/net/{ => ethernet}/tulip/eeprom.c      |    0
>  drivers/net/{ => ethernet}/tulip/interrupt.c   |    0
>  drivers/net/{ => ethernet}/tulip/media.c       |    0
>  drivers/net/{ => ethernet}/tulip/pnic.c        |    0
>  drivers/net/{ => ethernet}/tulip/pnic2.c       |    0
>  drivers/net/{ => ethernet}/tulip/timer.c       |    0
>  drivers/net/{ => ethernet}/tulip/tulip.h       |    0
>  drivers/net/{ => ethernet}/tulip/tulip_core.c  |    0
>  drivers/net/{ => ethernet}/tulip/uli526x.c     |    0
>  drivers/net/{ => ethernet}/tulip/winbond-840.c |    0
>  drivers/net/{ => ethernet}/tulip/xircom_cb.c   |    0
>  23 files changed, 20 insertions(+), 24 deletions(-)
>  rename drivers/net/{ => ethernet}/tulip/21142.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/Kconfig (93%)
>  rename drivers/net/{ => ethernet}/tulip/Makefile (100%)
>  rename drivers/net/{ => ethernet}/tulip/de2104x.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/de4x5.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/de4x5.h (100%)
>  rename drivers/net/{ => ethernet}/tulip/dmfe.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/eeprom.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/interrupt.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/media.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/pnic.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/pnic2.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/timer.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/tulip.h (100%)
>  rename drivers/net/{ => ethernet}/tulip/tulip_core.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/uli526x.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/winbond-840.c (100%)
>  rename drivers/net/{ => ethernet}/tulip/xircom_cb.c (100%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f72a8bd..26d1029 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2040,7 +2040,7 @@ DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER
>  L:	netdev@vger.kernel.org
>  S:	Orphan
>  F:	Documentation/networking/dmfe.txt
> -F:	drivers/net/tulip/dmfe.c
> +F:	drivers/net/ethernet/tulip/dmfe.c
>  
>  DC390/AM53C974 SCSI driver
>  M:	Kurt Garloff <garloff@suse.de>
> @@ -6278,7 +6278,7 @@ TULIP NETWORK DRIVERS
>  M:	Grant Grundler <grundler@parisc-linux.org>
>  L:	netdev@vger.kernel.org
>  S:	Maintained
> -F:	drivers/net/tulip/
> +F:	drivers/net/ethernet/tulip/
>  
>  TUN/TAP driver
>  M:	Maxim Krasnyansky <maxk@qualcomm.com>
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index 71efbe4..0846518 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -481,8 +481,6 @@ config DNET
>  	  To compile this driver as a module, choose M here: the module
>  	  will be called dnet.
>  
> -source "drivers/net/tulip/Kconfig"
> -
>  config AT1700
>  	tristate "AT1700/1720 support (EXPERIMENTAL)"
>  	depends on (ISA || MCA_LEGACY) && EXPERIMENTAL
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 1ac4164..ec07331 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -160,7 +160,6 @@ obj-$(CONFIG_USB_ZD1201)        += usb/
>  obj-$(CONFIG_USB_IPHETH)        += usb/
>  
>  obj-$(CONFIG_WLAN) += wireless/
> -obj-$(CONFIG_NET_TULIP) += tulip/
>  obj-$(CONFIG_HAMRADIO) += hamradio/
>  obj-$(CONFIG_IRDA) += irda/
>  obj-$(CONFIG_ETRAX_ETHERNET) += cris/
> diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
> index 6fb1625..369f5bb 100644
> --- a/drivers/net/ethernet/Kconfig
> +++ b/drivers/net/ethernet/Kconfig
> @@ -55,4 +55,6 @@ config TEHUTI
>  	---help---
>  	  Tehuti Networks 10G Ethernet NIC
>  
> +source "drivers/net/ethernet/tulip/Kconfig"
> +
>  endif # ETHERNET
> diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
> index 1123a3d..189d112 100644
> --- a/drivers/net/ethernet/Makefile
> +++ b/drivers/net/ethernet/Makefile
> @@ -31,3 +31,4 @@ obj-$(CONFIG_NET_VENDOR_SMSC) += smsc/
>  obj-$(CONFIG_NET_VENDOR_STMICRO) += stmicro/
>  obj-$(CONFIG_NET_VENDOR_SUN) += sun/
>  obj-$(CONFIG_TEHUTI) += tehuti.o
> +obj-$(CONFIG_NET_TULIP) += tulip/
> diff --git a/drivers/net/tulip/21142.c b/drivers/net/ethernet/tulip/21142.c
> similarity index 100%
> rename from drivers/net/tulip/21142.c
> rename to drivers/net/ethernet/tulip/21142.c
> diff --git a/drivers/net/tulip/Kconfig b/drivers/net/ethernet/tulip/Kconfig
> similarity index 93%
> rename from drivers/net/tulip/Kconfig
> rename to drivers/net/ethernet/tulip/Kconfig
> index 1f8d4a8..c298a08 100644
> --- a/drivers/net/tulip/Kconfig
> +++ b/drivers/net/ethernet/tulip/Kconfig
> @@ -2,17 +2,15 @@
>  # Tulip family network device configuration
>  #
>  
> -menuconfig NET_TULIP
> -	bool "\"Tulip\" family network device support"
> +config NET_TULIP
> +	bool "\"Tulip\" family network devices"
>  	depends on PCI || EISA || CARDBUS
> -	help
> +	---help---
>  	  This selects the "Tulip" family of EISA/PCI network cards.
>  
> -if NET_TULIP
> -
>  config DE2104X
>  	tristate "Early DECchip Tulip (dc2104x) PCI support"
> -	depends on PCI
> +	depends on NET_TULIP && PCI
>  	select CRC32
>  	---help---
>  	  This driver is developed for the SMC EtherPower series Ethernet
> @@ -32,7 +30,7 @@ config DE2104X_DSL
>  	depends on DE2104X
>  	range 0 31
>  	default 0
> -	help
> +	---help---
>  	  Setting this value allows to align ring buffer descriptors into their
>  	  own cache lines. Value of 4 corresponds to the typical 32 byte line
>  	  (the descriptor is 16 bytes). This is necessary on systems that lack
> @@ -41,7 +39,7 @@ config DE2104X_DSL
>  
>  config TULIP
>  	tristate "DECchip Tulip (dc2114x) PCI support"
> -	depends on PCI
> +	depends on NET_TULIP && PCI
>  	select CRC32
>  	---help---
>  	  This driver is developed for the SMC EtherPower series Ethernet
> @@ -59,7 +57,7 @@ config TULIP
>  config TULIP_MWI
>  	bool "New bus configuration (EXPERIMENTAL)"
>  	depends on TULIP && EXPERIMENTAL
> -	help
> +	---help---
>  	  This configures your Tulip card specifically for the card and
>  	  system cache line size type you are using.
>  
> @@ -70,7 +68,7 @@ config TULIP_MWI
>  config TULIP_MMIO
>  	bool "Use PCI shared mem for NIC registers"
>  	depends on TULIP
> -	help
> +	---help---
>  	  Use PCI shared memory for the NIC registers, rather than going through
>  	  the Tulip's PIO (programmed I/O ports).  Faster, but could produce
>  	  obscure bugs if your mainboard has memory controller timing issues.
> @@ -79,7 +77,7 @@ config TULIP_MMIO
>  config TULIP_NAPI
>  	bool "Use RX polling (NAPI)"
>  	depends on TULIP
> -	help
> +	---help---
>  	  NAPI is a new driver API designed to reduce CPU and interrupt load
>  	  when the driver is receiving lots of packets from the card. It is
>  	  still somewhat experimental and thus not yet enabled by default.
> @@ -107,7 +105,7 @@ config TULIP_DM910X
>  
>  config DE4X5
>  	tristate "Generic DECchip & DIGITAL EtherWORKS PCI/EISA"
> -	depends on PCI || EISA
> +	depends on NET_TULIP && (PCI || EISA)
>  	select CRC32
>  	---help---
>  	  This is support for the DIGITAL series of PCI/EISA Ethernet cards.
> @@ -123,10 +121,10 @@ config DE4X5
>  
>  config WINBOND_840
>  	tristate "Winbond W89c840 Ethernet support"
> -	depends on PCI
> +	depends on NET_TULIP && PCI
>  	select CRC32
>  	select MII
> -	help
> +	---help---
>  	  This driver is for the Winbond W89c840 chip.  It also works with 
>  	  the TX9882 chip on the Compex RL100-ATX board.
>  	  More specific information and updates are available from
> @@ -134,7 +132,7 @@ config WINBOND_840
>  
>  config DM9102
>  	tristate "Davicom DM910x/DM980x support"
> -	depends on PCI
> +	depends on NET_TULIP && PCI
>  	select CRC32
>  	---help---
>  	  This driver is for DM9102(A)/DM9132/DM9801 compatible PCI cards from
> @@ -147,7 +145,7 @@ config DM9102
>  
>  config ULI526X
>  	tristate "ULi M526x controller support"
> -	depends on PCI
> +	depends on NET_TULIP && PCI
>  	select CRC32
>  	---help---
>  	  This driver is for ULi M5261/M5263 10/100M Ethernet Controller
> @@ -158,7 +156,7 @@ config ULI526X
>  	  
>  config PCMCIA_XIRCOM
>  	tristate "Xircom CardBus support"
> -	depends on CARDBUS
> +	depends on NET_TULIP && CARDBUS
>  	---help---
>  	  This driver is for the Digital "Tulip" Ethernet CardBus adapters.
>  	  It should work with most DEC 21*4*-based chips/ethercards, as well
> @@ -167,5 +165,3 @@ config PCMCIA_XIRCOM
>  
>  	  To compile this driver as a module, choose M here. The module will
>  	  be called xircom_cb.  If unsure, say N.
> -
> -endif # NET_TULIP
> diff --git a/drivers/net/tulip/Makefile b/drivers/net/ethernet/tulip/Makefile
> similarity index 100%
> rename from drivers/net/tulip/Makefile
> rename to drivers/net/ethernet/tulip/Makefile
> diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/ethernet/tulip/de2104x.c
> similarity index 100%
> rename from drivers/net/tulip/de2104x.c
> rename to drivers/net/ethernet/tulip/de2104x.c
> diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/ethernet/tulip/de4x5.c
> similarity index 100%
> rename from drivers/net/tulip/de4x5.c
> rename to drivers/net/ethernet/tulip/de4x5.c
> diff --git a/drivers/net/tulip/de4x5.h b/drivers/net/ethernet/tulip/de4x5.h
> similarity index 100%
> rename from drivers/net/tulip/de4x5.h
> rename to drivers/net/ethernet/tulip/de4x5.h
> diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/ethernet/tulip/dmfe.c
> similarity index 100%
> rename from drivers/net/tulip/dmfe.c
> rename to drivers/net/ethernet/tulip/dmfe.c
> diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/ethernet/tulip/eeprom.c
> similarity index 100%
> rename from drivers/net/tulip/eeprom.c
> rename to drivers/net/ethernet/tulip/eeprom.c
> diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/ethernet/tulip/interrupt.c
> similarity index 100%
> rename from drivers/net/tulip/interrupt.c
> rename to drivers/net/ethernet/tulip/interrupt.c
> diff --git a/drivers/net/tulip/media.c b/drivers/net/ethernet/tulip/media.c
> similarity index 100%
> rename from drivers/net/tulip/media.c
> rename to drivers/net/ethernet/tulip/media.c
> diff --git a/drivers/net/tulip/pnic.c b/drivers/net/ethernet/tulip/pnic.c
> similarity index 100%
> rename from drivers/net/tulip/pnic.c
> rename to drivers/net/ethernet/tulip/pnic.c
> diff --git a/drivers/net/tulip/pnic2.c b/drivers/net/ethernet/tulip/pnic2.c
> similarity index 100%
> rename from drivers/net/tulip/pnic2.c
> rename to drivers/net/ethernet/tulip/pnic2.c
> diff --git a/drivers/net/tulip/timer.c b/drivers/net/ethernet/tulip/timer.c
> similarity index 100%
> rename from drivers/net/tulip/timer.c
> rename to drivers/net/ethernet/tulip/timer.c
> diff --git a/drivers/net/tulip/tulip.h b/drivers/net/ethernet/tulip/tulip.h
> similarity index 100%
> rename from drivers/net/tulip/tulip.h
> rename to drivers/net/ethernet/tulip/tulip.h
> diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/ethernet/tulip/tulip_core.c
> similarity index 100%
> rename from drivers/net/tulip/tulip_core.c
> rename to drivers/net/ethernet/tulip/tulip_core.c
> diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/ethernet/tulip/uli526x.c
> similarity index 100%
> rename from drivers/net/tulip/uli526x.c
> rename to drivers/net/ethernet/tulip/uli526x.c
> diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/ethernet/tulip/winbond-840.c
> similarity index 100%
> rename from drivers/net/tulip/winbond-840.c
> rename to drivers/net/ethernet/tulip/winbond-840.c
> diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/ethernet/tulip/xircom_cb.c
> similarity index 100%
> rename from drivers/net/tulip/xircom_cb.c
> rename to drivers/net/ethernet/tulip/xircom_cb.c
> -- 
> 1.7.5.4

^ permalink raw reply

* Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten
From: Alexey Zaytsev @ 2011-07-02 21:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: netdev, Gary Zambrano, bugme-daemon, David S. Miller,
	Pekka Pietikainen, Florian Schirmer, Felix Fietkau,
	Michael Buesch
In-Reply-To: <BANLkTi=PxH8V58k-VycsM=1ZiE9hPqCN4Q@mail.gmail.com>

On Fri, Jul 1, 2011 at 10:01, Alexey Zaytsev <alexey.zaytsev@gmail.com> wrote:
> On Thu, Jun 30, 2011 at 01:51, Andrew Morton <akpm@linux-foundation.org> wrote:
>>
>> (switched to email.  Please respond via emailed reply-to-all, not via the
>> bugzilla web interface).
>>
>> On Thu, 23 Jun 2011 17:33:54 GMT
>> bugzilla-daemon@bugzilla.kernel.org wrote:
>>
>>> https://bugzilla.kernel.org/show_bug.cgi?id=38102
>>>
>>>            Summary: BUG kmalloc-2048: Poison overwritten
>>>            Product: Drivers
>>>            Version: 2.5
>>>     Kernel Version: 3.0.0-rc4
>>
>> Looks like a 2.6.38->2.6.39 regression, perhaps a memory scribble in b44.
>
> Actually, not sure about the version. 39 was the first one I've been
> using in the scenario. Checking older versions now.
> And git-log does not show a lot of changes to the b44 driver, so it
> might be something unrelated.
>

I've checked back as far as 2.6.27, and the problem is still there.
I've also looked through the allocation-related code, and it seemed
sane. I'm not sure I understand the 1GB dma workaround, but this path
is never hit in my case. So adding the driver authors to CC. This
could be something different, but I've been unable to reproduce using
an other machine with an rtl8139 nic.

^ permalink raw reply

* Re: [PATCH 03/12] econet: Reduce switch/case indent
From: Phil Blundell @ 2011-07-02 17:04 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, David S. Miller, netdev
In-Reply-To: <e2f659cf95b88abbdf35c7447d8a4d00d5c424dc.1309549244.git.joe@perches.com>

On Fri, 2011-07-01 at 12:43 -0700, Joe Perches wrote:
> Make the case labels the same indent as the switch.
> 
> Simplify a default case / return (unreached)
> Remove unnecessary break after return.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Phil Blundell <philb@gnu.org>

Thanks.

p.



^ permalink raw reply

* [net-next PATCH 2/2] dcbnl: Add CEE notification
From: Shmulik Ravid @ 2011-07-02 16:38 UTC (permalink / raw)
  To: davem; +Cc: John Fastabend, netdev

This patch add an unsolicited notification of the DCBX negotiated
parameters for the CEE flavor of the DCBX protocol. The notification
message is identical to the aggregated CEE get operation and holds all
the pertinent local and peer information. The notification routine is
exported so it can be invoked by drivers supporting an embedded DCBX
stack.

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
---
 include/net/dcbnl.h |    5 +-
 net/dcb/dcbnl.c     |  409 ++++++++++++++++++++++++++++-----------------------
 2 files changed, 226 insertions(+), 188 deletions(-)

diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h
index d5bbb79..f5aa399 100644
--- a/include/net/dcbnl.h
+++ b/include/net/dcbnl.h
@@ -34,7 +34,10 @@ int dcb_ieee_setapp(struct net_device *, struct dcb_app *);
 int dcb_ieee_delapp(struct net_device *, struct dcb_app *);
 u8 dcb_ieee_getapp_mask(struct net_device *, struct dcb_app *);
 
-int dcbnl_notify(struct net_device *dev, int event, int cmd, u32 seq, u32 pid);
+int dcbnl_ieee_notify(struct net_device *dev, int event, int cmd,
+		      u32 seq, u32 pid);
+int dcbnl_cee_notify(struct net_device *dev, int event, int cmd,
+		     u32 seq, u32 pid);
 
 /*
  * Ops struct for the netlink callbacks.  Used by DCB-enabled drivers through
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 5b75ed7..1937f92 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1310,8 +1310,193 @@ nla_put_failure:
 	return err;
 }
 
-int dcbnl_notify(struct net_device *dev, int event, int cmd,
-			u32 seq, u32 pid)
+static int dcbnl_cee_pg_fill(struct sk_buff *skb, struct net_device *dev,
+			     int dir)
+{
+	u8 pgid, up_map, prio, tc_pct;
+	const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops;
+	int i = dir ? DCB_ATTR_CEE_TX_PG : DCB_ATTR_CEE_RX_PG;
+	struct nlattr *pg = nla_nest_start(skb, i);
+	if (!pg)
+		goto nla_put_failure;
+
+	for (i = DCB_PG_ATTR_TC_0; i <= DCB_PG_ATTR_TC_7; i++) {
+		struct nlattr *tc_nest = nla_nest_start(skb, i);
+		if (!tc_nest)
+			goto nla_put_failure;
+
+		pgid = DCB_ATTR_VALUE_UNDEFINED;
+		prio = DCB_ATTR_VALUE_UNDEFINED;
+		tc_pct = DCB_ATTR_VALUE_UNDEFINED;
+		up_map = DCB_ATTR_VALUE_UNDEFINED;
+
+		if (!dir)
+			ops->getpgtccfgrx(dev, i - DCB_PG_ATTR_TC_0,
+					  &prio, &pgid, &tc_pct, &up_map);
+		else
+			ops->getpgtccfgtx(dev, i - DCB_PG_ATTR_TC_0,
+					  &prio, &pgid, &tc_pct, &up_map);
+
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_PGID, pgid);
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_UP_MAPPING, up_map);
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_STRICT_PRIO, prio);
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_BW_PCT, tc_pct);
+		nla_nest_end(skb, tc_nest);
+	}
+
+	for (i = DCB_PG_ATTR_BW_ID_0; i <= DCB_PG_ATTR_BW_ID_7; i++) {
+		tc_pct = DCB_ATTR_VALUE_UNDEFINED;
+
+		if (!dir)
+			ops->getpgbwgcfgrx(dev, i - DCB_PG_ATTR_BW_ID_0,
+					   &tc_pct);
+		else
+			ops->getpgbwgcfgtx(dev, i - DCB_PG_ATTR_BW_ID_0,
+					   &tc_pct);
+		NLA_PUT_U8(skb, i, tc_pct);
+	}
+	nla_nest_end(skb, pg);
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static int dcbnl_cee_fill(struct sk_buff *skb, struct net_device *netdev)
+{
+	struct nlattr *cee, *app;
+	struct dcb_app_type *itr;
+	const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops;
+	int dcbx, i, err = -EMSGSIZE;
+	u8 value;
+
+	NLA_PUT_STRING(skb, DCB_ATTR_IFNAME, netdev->name);
+
+	cee = nla_nest_start(skb, DCB_ATTR_CEE);
+	if (!cee)
+		goto nla_put_failure;
+
+	/* local pg */
+	if (ops->getpgtccfgtx && ops->getpgbwgcfgtx) {
+		err = dcbnl_cee_pg_fill(skb, netdev, 1);
+		if (err)
+			goto nla_put_failure;
+	}
+
+	if (ops->getpgtccfgrx && ops->getpgbwgcfgrx) {
+		err = dcbnl_cee_pg_fill(skb, netdev, 0);
+		if (err)
+			goto nla_put_failure;
+	}
+
+	/* local pfc */
+	if (ops->getpfccfg) {
+		struct nlattr *pfc_nest = nla_nest_start(skb, DCB_ATTR_CEE_PFC);
+		if (!pfc_nest)
+			goto nla_put_failure;
+
+		for (i = DCB_PFC_UP_ATTR_0; i <= DCB_PFC_UP_ATTR_7; i++) {
+			ops->getpfccfg(netdev, i - DCB_PFC_UP_ATTR_0, &value);
+			NLA_PUT_U8(skb, i, value);
+		}
+		nla_nest_end(skb, pfc_nest);
+	}
+
+	/* local app */
+	spin_lock(&dcb_lock);
+	app = nla_nest_start(skb, DCB_ATTR_CEE_APP_TABLE);
+	if (!app)
+		goto nla_put_failure;
+
+	list_for_each_entry(itr, &dcb_app_list, list) {
+		if (strncmp(itr->name, netdev->name, IFNAMSIZ) == 0) {
+			struct nlattr *app_nest = nla_nest_start(skb,
+								 DCB_ATTR_APP);
+			if (!app_nest)
+				goto dcb_unlock;
+
+			err = nla_put_u8(skb, DCB_APP_ATTR_IDTYPE,
+					 itr->app.selector);
+			if (err)
+				goto dcb_unlock;
+
+			err = nla_put_u16(skb, DCB_APP_ATTR_ID,
+					  itr->app.protocol);
+			if (err)
+				goto dcb_unlock;
+
+			err = nla_put_u8(skb, DCB_APP_ATTR_PRIORITY,
+					 itr->app.priority);
+			if (err)
+				goto dcb_unlock;
+
+			nla_nest_end(skb, app_nest);
+		}
+	}
+	nla_nest_end(skb, app);
+
+	if (netdev->dcbnl_ops->getdcbx)
+		dcbx = netdev->dcbnl_ops->getdcbx(netdev);
+	else
+		dcbx = -EOPNOTSUPP;
+
+	spin_unlock(&dcb_lock);
+
+	/* features flags */
+	if (ops->getfeatcfg) {
+		struct nlattr *feat = nla_nest_start(skb, DCB_ATTR_CEE_FEAT);
+		if (!feat)
+			goto nla_put_failure;
+
+		for (i = DCB_FEATCFG_ATTR_ALL + 1; i <= DCB_FEATCFG_ATTR_MAX;
+		     i++)
+			if (!ops->getfeatcfg(netdev, i, &value))
+				NLA_PUT_U8(skb, i, value);
+
+		nla_nest_end(skb, feat);
+	}
+
+	/* peer info if available */
+	if (ops->cee_peer_getpg) {
+		struct cee_pg pg;
+		err = ops->cee_peer_getpg(netdev, &pg);
+		if (!err)
+			NLA_PUT(skb, DCB_ATTR_CEE_PEER_PG, sizeof(pg), &pg);
+	}
+
+	if (ops->cee_peer_getpfc) {
+		struct cee_pfc pfc;
+		err = ops->cee_peer_getpfc(netdev, &pfc);
+		if (!err)
+			NLA_PUT(skb, DCB_ATTR_CEE_PEER_PFC, sizeof(pfc), &pfc);
+	}
+
+	if (ops->peer_getappinfo && ops->peer_getapptable) {
+		err = dcbnl_build_peer_app(netdev, skb,
+					   DCB_ATTR_CEE_PEER_APP_TABLE,
+					   DCB_ATTR_CEE_PEER_APP_INFO,
+					   DCB_ATTR_CEE_PEER_APP);
+		if (err)
+			goto nla_put_failure;
+	}
+	nla_nest_end(skb, cee);
+
+	/* DCBX state */
+	if (dcbx >= 0) {
+		err = nla_put_u8(skb, DCB_ATTR_DCBX, dcbx);
+		if (err)
+			goto nla_put_failure;
+	}
+	return 0;
+
+dcb_unlock:
+	spin_unlock(&dcb_lock);
+nla_put_failure:
+	return err;
+}
+
+static int dcbnl_notify(struct net_device *dev, int event, int cmd,
+			u32 seq, u32 pid, int dcbx_ver)
 {
 	struct net *net = dev_net(dev);
 	struct sk_buff *skb;
@@ -1337,7 +1522,11 @@ int dcbnl_notify(struct net_device *dev, int event, int cmd,
 	dcb->dcb_family = AF_UNSPEC;
 	dcb->cmd = cmd;
 
-	err = dcbnl_ieee_fill(skb, dev);
+	if (dcbx_ver == DCB_CAP_DCBX_VER_IEEE)
+		err = dcbnl_ieee_fill(skb, dev);
+	else
+		err = dcbnl_cee_fill(skb, dev);
+
 	if (err < 0) {
 		/* Report error to broadcast listeners */
 		nlmsg_cancel(skb, nlh);
@@ -1351,7 +1540,20 @@ int dcbnl_notify(struct net_device *dev, int event, int cmd,
 
 	return err;
 }
-EXPORT_SYMBOL(dcbnl_notify);
+
+int dcbnl_ieee_notify(struct net_device *dev, int event, int cmd,
+		      u32 seq, u32 pid)
+{
+	return dcbnl_notify(dev, event, cmd, seq, pid, DCB_CAP_DCBX_VER_IEEE);
+}
+EXPORT_SYMBOL(dcbnl_ieee_notify);
+
+int dcbnl_cee_notify(struct net_device *dev, int event, int cmd,
+		     u32 seq, u32 pid)
+{
+	return dcbnl_notify(dev, event, cmd, seq, pid, DCB_CAP_DCBX_VER_CEE);
+}
+EXPORT_SYMBOL(dcbnl_cee_notify);
 
 /* Handle IEEE 802.1Qaz SET commands. If any requested operation can not
  * be completed the entire msg is aborted and error value is returned.
@@ -1411,7 +1613,7 @@ static int dcbnl_ieee_set(struct net_device *netdev, struct nlattr **tb,
 err:
 	dcbnl_reply(err, RTM_SETDCB, DCB_CMD_IEEE_SET, DCB_ATTR_IEEE,
 		    pid, seq, flags);
-	dcbnl_notify(netdev, RTM_SETDCB, DCB_CMD_IEEE_SET, seq, 0);
+	dcbnl_ieee_notify(netdev, RTM_SETDCB, DCB_CMD_IEEE_SET, seq, 0);
 	return err;
 }
 
@@ -1495,7 +1697,7 @@ static int dcbnl_ieee_del(struct net_device *netdev, struct nlattr **tb,
 err:
 	dcbnl_reply(err, RTM_SETDCB, DCB_CMD_IEEE_DEL, DCB_ATTR_IEEE,
 		    pid, seq, flags);
-	dcbnl_notify(netdev, RTM_SETDCB, DCB_CMD_IEEE_DEL, seq, 0);
+	dcbnl_ieee_notify(netdev, RTM_SETDCB, DCB_CMD_IEEE_DEL, seq, 0);
 	return err;
 }
 
@@ -1642,70 +1844,16 @@ err:
 	return ret;
 }
 
-static int dcbnl_cee_pg_fill(struct sk_buff *skb, struct net_device *dev,
-			     int dir)
-{
-	u8 pgid, up_map, prio, tc_pct;
-	const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops;
-	int i = dir ? DCB_ATTR_CEE_TX_PG : DCB_ATTR_CEE_RX_PG;
-	struct nlattr *pg = nla_nest_start(skb, i);
-	if (!pg)
-		goto nla_put_failure;
-
-	for (i = DCB_PG_ATTR_TC_0; i <= DCB_PG_ATTR_TC_7; i++) {
-		struct nlattr *tc_nest = nla_nest_start(skb, i);
-		if (!tc_nest)
-			goto nla_put_failure;
-
-		pgid = DCB_ATTR_VALUE_UNDEFINED;
-		prio = DCB_ATTR_VALUE_UNDEFINED;
-		tc_pct = DCB_ATTR_VALUE_UNDEFINED;
-		up_map = DCB_ATTR_VALUE_UNDEFINED;
-
-		if (!dir)
-			ops->getpgtccfgrx(dev, i - DCB_PG_ATTR_TC_0,
-					  &prio, &pgid, &tc_pct, &up_map);
-		else
-			ops->getpgtccfgtx(dev, i - DCB_PG_ATTR_TC_0,
-					  &prio, &pgid, &tc_pct, &up_map);
-
-		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_PGID, pgid);
-		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_UP_MAPPING, up_map);
-		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_STRICT_PRIO, prio);
-		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_BW_PCT, tc_pct);
-		nla_nest_end(skb, tc_nest);
-	}
-
-	for (i = DCB_PG_ATTR_BW_ID_0; i <= DCB_PG_ATTR_BW_ID_7; i++) {
-		tc_pct = DCB_ATTR_VALUE_UNDEFINED;
-
-		if (!dir)
-			ops->getpgbwgcfgrx(dev, i - DCB_PG_ATTR_BW_ID_0,
-					   &tc_pct);
-		else
-			ops->getpgbwgcfgtx(dev, i - DCB_PG_ATTR_BW_ID_0,
-					   &tc_pct);
-		NLA_PUT_U8(skb, i, tc_pct);
-	}
-	nla_nest_end(skb, pg);
-	return 0;
-
-nla_put_failure:
-	return -EMSGSIZE;
-}
-
 /* Handle CEE DCBX GET commands. */
 static int dcbnl_cee_get(struct net_device *netdev, struct nlattr **tb,
 			 u32 pid, u32 seq, u16 flags)
 {
+	struct net *net = dev_net(netdev);
 	struct sk_buff *skb;
 	struct nlmsghdr *nlh;
 	struct dcbmsg *dcb;
-	struct nlattr *cee, *app;
-	struct dcb_app_type *itr;
 	const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops;
-	int dcbx, i, err = -EMSGSIZE;
-	u8 value;
+	int err;
 
 	if (!ops)
 		return -EOPNOTSUPP;
@@ -1714,138 +1862,25 @@ static int dcbnl_cee_get(struct net_device *netdev, struct nlattr **tb,
 	if (!skb)
 		return -ENOBUFS;
 
-	nlh = NLMSG_NEW(skb, pid, seq, RTM_GETDCB, sizeof(*dcb), flags);
+	nlh = nlmsg_put(skb, pid, seq, RTM_GETDCB, sizeof(*dcb), flags);
+	if (nlh == NULL) {
+		nlmsg_free(skb);
+		return -EMSGSIZE;
+	}
 
 	dcb = NLMSG_DATA(nlh);
 	dcb->dcb_family = AF_UNSPEC;
 	dcb->cmd = DCB_CMD_CEE_GET;
 
-	NLA_PUT_STRING(skb, DCB_ATTR_IFNAME, netdev->name);
-
-	cee = nla_nest_start(skb, DCB_ATTR_CEE);
-	if (!cee)
-		goto nla_put_failure;
-
-	/* local pg */
-	if (ops->getpgtccfgtx && ops->getpgbwgcfgtx) {
-		err = dcbnl_cee_pg_fill(skb, netdev, 1);
-		if (err)
-			goto nla_put_failure;
-	}
-
-	if (ops->getpgtccfgrx && ops->getpgbwgcfgrx) {
-		err = dcbnl_cee_pg_fill(skb, netdev, 0);
-		if (err)
-			goto nla_put_failure;
-	}
-
-	/* local pfc */
-	if (ops->getpfccfg) {
-		struct nlattr *pfc_nest = nla_nest_start(skb, DCB_ATTR_CEE_PFC);
-		if (!pfc_nest)
-			goto nla_put_failure;
-
-		for (i = DCB_PFC_UP_ATTR_0; i <= DCB_PFC_UP_ATTR_7; i++) {
-			ops->getpfccfg(netdev, i - DCB_PFC_UP_ATTR_0, &value);
-			NLA_PUT_U8(skb, i, value);
-		}
-		nla_nest_end(skb, pfc_nest);
-	}
-
-	/* local app */
-	spin_lock(&dcb_lock);
-	app = nla_nest_start(skb, DCB_ATTR_CEE_APP_TABLE);
-	if (!app)
-		goto nla_put_failure;
-
-	list_for_each_entry(itr, &dcb_app_list, list) {
-		if (strncmp(itr->name, netdev->name, IFNAMSIZ) == 0) {
-			struct nlattr *app_nest = nla_nest_start(skb,
-								 DCB_ATTR_APP);
-			if (!app_nest)
-				goto dcb_unlock;
-
-			err = nla_put_u8(skb, DCB_APP_ATTR_IDTYPE,
-					 itr->app.selector);
-			if (err)
-				goto dcb_unlock;
-
-			err = nla_put_u16(skb, DCB_APP_ATTR_ID,
-					  itr->app.protocol);
-			if (err)
-				goto dcb_unlock;
-
-			err = nla_put_u8(skb, DCB_APP_ATTR_PRIORITY,
-					 itr->app.priority);
-			if (err)
-				goto dcb_unlock;
-
-			nla_nest_end(skb, app_nest);
-		}
-	}
-	nla_nest_end(skb, app);
-
-	if (netdev->dcbnl_ops->getdcbx)
-		dcbx = netdev->dcbnl_ops->getdcbx(netdev);
-	else
-		dcbx = -EOPNOTSUPP;
-
-	spin_unlock(&dcb_lock);
-
-	/* features flags */
-	if (ops->getfeatcfg) {
-		struct nlattr *feat = nla_nest_start(skb, DCB_ATTR_CEE_FEAT);
-		if (!feat)
-			goto nla_put_failure;
+	err = dcbnl_cee_fill(skb, netdev);
 
-		for (i = DCB_FEATCFG_ATTR_ALL + 1; i <= DCB_FEATCFG_ATTR_MAX;
-		     i++)
-			if (!ops->getfeatcfg(netdev, i, &value))
-				NLA_PUT_U8(skb, i, value);
-
-		nla_nest_end(skb, feat);
-	}
-
-	/* peer info if available */
-	if (ops->cee_peer_getpg) {
-		struct cee_pg pg;
-		err = ops->cee_peer_getpg(netdev, &pg);
-		if (!err)
-			NLA_PUT(skb, DCB_ATTR_CEE_PEER_PG, sizeof(pg), &pg);
-	}
-
-	if (ops->cee_peer_getpfc) {
-		struct cee_pfc pfc;
-		err = ops->cee_peer_getpfc(netdev, &pfc);
-		if (!err)
-			NLA_PUT(skb, DCB_ATTR_CEE_PEER_PFC, sizeof(pfc), &pfc);
-	}
-
-	if (ops->peer_getappinfo && ops->peer_getapptable) {
-		err = dcbnl_build_peer_app(netdev, skb,
-					   DCB_ATTR_CEE_PEER_APP_TABLE,
-					   DCB_ATTR_CEE_PEER_APP_INFO,
-					   DCB_ATTR_CEE_PEER_APP);
-		if (err)
-			goto nla_put_failure;
-	}
-	nla_nest_end(skb, cee);
-
-	/* DCBX state */
-	if (dcbx >= 0) {
-		err = nla_put_u8(skb, DCB_ATTR_DCBX, dcbx);
-		if (err)
-			goto nla_put_failure;
+	if (err < 0) {
+		nlmsg_cancel(skb, nlh);
+		nlmsg_free(skb);
+	} else {
+		nlmsg_end(skb, nlh);
+		err = rtnl_unicast(skb, net, pid);
 	}
-	nlmsg_end(skb, nlh);
-	return rtnl_unicast(skb, &init_net, pid);
-
-dcb_unlock:
-	spin_unlock(&dcb_lock);
-nla_put_failure:
-	nlmsg_cancel(skb, nlh);
-nlmsg_failure:
-	nlmsg_free(skb);
 	return err;
 }
 
-- 
1.7.3.5





^ permalink raw reply related

* [net-next PATCH 1/2] dcbnl: Aggregated CEE GET operation
From: Shmulik Ravid @ 2011-07-02 16:33 UTC (permalink / raw)
  To: davem; +Cc: John Fastabend, netdev

The following couple of patches add dcbnl an unsolicited notification of
the the DCB configuration for the CEE flavor of the DCBX protocol. This
is useful when the user-mode DCB client is not responsible for
conducting and resolving the DCBX negotiation (either because the DCBX
stack is embedded in the HW or the negotiation is handled by another
agent in he host), but still needs to get the negotiated parameters.
This functionality already exists for the IEEE flavor of the DCBX
protocol and these patches add it to the older CEE flavor.

The first patch extends the CEE attribute GET operation to include not
only the peer information, but also all the pertinent local
configuration (negotiated parameters). The second patch adds and export
a CEE specific notification routine.

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
---
 include/linux/dcbnl.h |   20 ++++++-
 net/dcb/dcbnl.c       |  156 ++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 168 insertions(+), 8 deletions(-)

diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
index 66a6723..c875244 100644
--- a/include/linux/dcbnl.h
+++ b/include/linux/dcbnl.h
@@ -333,15 +333,26 @@ enum ieee_attrs_app {
 #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
 
 /**
- * enum cee_attrs - CEE DCBX get attributes
+ * enum cee_attrs - CEE DCBX get attributes. An aggregated collection of the
+ * cee std negotiated parameters
  *
  * @DCB_ATTR_CEE_UNSPEC: unspecified
+ * @DCB_ATTR_CEE_FEAT: DCBX features flags (DCB_CMD_GFEATCFG)
+ * @DCB_ATTR_CEE_RX_PG: RX PG configuration (DCB_CMD_PGRX_GCFG)
+ * @DCB_ATTR_CEE_TX_PG: TX PG configuration (DCB_CMD_PGTX_GCFG)
+ * @DCB_ATTR_CEE_PFC: PFC configuration (DCB_CMD_PFC_GCFG)
+ * @DCB_ATTR_CEE_APP_TABLE: APP configuration (multi DCB_CMD_GAPP)
  * @DCB_ATTR_CEE_PEER_PG: peer PG configuration - get only
  * @DCB_ATTR_CEE_PEER_PFC: peer PFC configuration - get only
  * @DCB_ATTR_CEE_PEER_APP: peer APP tlv - get only
  */
 enum cee_attrs {
 	DCB_ATTR_CEE_UNSPEC,
+	DCB_ATTR_CEE_TX_PG,
+	DCB_ATTR_CEE_RX_PG,
+	DCB_ATTR_CEE_PFC,
+	DCB_ATTR_CEE_APP_TABLE,
+	DCB_ATTR_CEE_FEAT,
 	DCB_ATTR_CEE_PEER_PG,
 	DCB_ATTR_CEE_PEER_PFC,
 	DCB_ATTR_CEE_PEER_APP_TABLE,
@@ -357,6 +368,13 @@ enum peer_app_attr {
 };
 #define DCB_ATTR_CEE_PEER_APP_MAX (__DCB_ATTR_CEE_PEER_APP_MAX - 1)
 
+enum cee_attrs_app {
+	DCB_ATTR_CEE_APP_UNSPEC,
+	DCB_ATTR_CEE_APP,
+	__DCB_ATTR_CEE_APP_MAX
+};
+#define DCB_ATTR_CEE_APP_MAX (__DCB_ATTR_CEE_APP_MAX - 1)
+
 /**
  * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
  *
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index fc56e85..5b75ed7 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1642,6 +1642,58 @@ err:
 	return ret;
 }
 
+static int dcbnl_cee_pg_fill(struct sk_buff *skb, struct net_device *dev,
+			     int dir)
+{
+	u8 pgid, up_map, prio, tc_pct;
+	const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops;
+	int i = dir ? DCB_ATTR_CEE_TX_PG : DCB_ATTR_CEE_RX_PG;
+	struct nlattr *pg = nla_nest_start(skb, i);
+	if (!pg)
+		goto nla_put_failure;
+
+	for (i = DCB_PG_ATTR_TC_0; i <= DCB_PG_ATTR_TC_7; i++) {
+		struct nlattr *tc_nest = nla_nest_start(skb, i);
+		if (!tc_nest)
+			goto nla_put_failure;
+
+		pgid = DCB_ATTR_VALUE_UNDEFINED;
+		prio = DCB_ATTR_VALUE_UNDEFINED;
+		tc_pct = DCB_ATTR_VALUE_UNDEFINED;
+		up_map = DCB_ATTR_VALUE_UNDEFINED;
+
+		if (!dir)
+			ops->getpgtccfgrx(dev, i - DCB_PG_ATTR_TC_0,
+					  &prio, &pgid, &tc_pct, &up_map);
+		else
+			ops->getpgtccfgtx(dev, i - DCB_PG_ATTR_TC_0,
+					  &prio, &pgid, &tc_pct, &up_map);
+
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_PGID, pgid);
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_UP_MAPPING, up_map);
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_STRICT_PRIO, prio);
+		NLA_PUT_U8(skb, DCB_TC_ATTR_PARAM_BW_PCT, tc_pct);
+		nla_nest_end(skb, tc_nest);
+	}
+
+	for (i = DCB_PG_ATTR_BW_ID_0; i <= DCB_PG_ATTR_BW_ID_7; i++) {
+		tc_pct = DCB_ATTR_VALUE_UNDEFINED;
+
+		if (!dir)
+			ops->getpgbwgcfgrx(dev, i - DCB_PG_ATTR_BW_ID_0,
+					   &tc_pct);
+		else
+			ops->getpgbwgcfgtx(dev, i - DCB_PG_ATTR_BW_ID_0,
+					   &tc_pct);
+		NLA_PUT_U8(skb, i, tc_pct);
+	}
+	nla_nest_end(skb, pg);
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
 /* Handle CEE DCBX GET commands. */
 static int dcbnl_cee_get(struct net_device *netdev, struct nlattr **tb,
 			 u32 pid, u32 seq, u16 flags)
@@ -1649,9 +1701,11 @@ static int dcbnl_cee_get(struct net_device *netdev, struct nlattr **tb,
 	struct sk_buff *skb;
 	struct nlmsghdr *nlh;
 	struct dcbmsg *dcb;
-	struct nlattr *cee;
+	struct nlattr *cee, *app;
+	struct dcb_app_type *itr;
 	const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops;
-	int err;
+	int dcbx, i, err = -EMSGSIZE;
+	u8 value;
 
 	if (!ops)
 		return -EOPNOTSUPP;
@@ -1672,7 +1726,87 @@ static int dcbnl_cee_get(struct net_device *netdev, struct nlattr **tb,
 	if (!cee)
 		goto nla_put_failure;
 
-	/* get peer info if available */
+	/* local pg */
+	if (ops->getpgtccfgtx && ops->getpgbwgcfgtx) {
+		err = dcbnl_cee_pg_fill(skb, netdev, 1);
+		if (err)
+			goto nla_put_failure;
+	}
+
+	if (ops->getpgtccfgrx && ops->getpgbwgcfgrx) {
+		err = dcbnl_cee_pg_fill(skb, netdev, 0);
+		if (err)
+			goto nla_put_failure;
+	}
+
+	/* local pfc */
+	if (ops->getpfccfg) {
+		struct nlattr *pfc_nest = nla_nest_start(skb, DCB_ATTR_CEE_PFC);
+		if (!pfc_nest)
+			goto nla_put_failure;
+
+		for (i = DCB_PFC_UP_ATTR_0; i <= DCB_PFC_UP_ATTR_7; i++) {
+			ops->getpfccfg(netdev, i - DCB_PFC_UP_ATTR_0, &value);
+			NLA_PUT_U8(skb, i, value);
+		}
+		nla_nest_end(skb, pfc_nest);
+	}
+
+	/* local app */
+	spin_lock(&dcb_lock);
+	app = nla_nest_start(skb, DCB_ATTR_CEE_APP_TABLE);
+	if (!app)
+		goto nla_put_failure;
+
+	list_for_each_entry(itr, &dcb_app_list, list) {
+		if (strncmp(itr->name, netdev->name, IFNAMSIZ) == 0) {
+			struct nlattr *app_nest = nla_nest_start(skb,
+								 DCB_ATTR_APP);
+			if (!app_nest)
+				goto dcb_unlock;
+
+			err = nla_put_u8(skb, DCB_APP_ATTR_IDTYPE,
+					 itr->app.selector);
+			if (err)
+				goto dcb_unlock;
+
+			err = nla_put_u16(skb, DCB_APP_ATTR_ID,
+					  itr->app.protocol);
+			if (err)
+				goto dcb_unlock;
+
+			err = nla_put_u8(skb, DCB_APP_ATTR_PRIORITY,
+					 itr->app.priority);
+			if (err)
+				goto dcb_unlock;
+
+			nla_nest_end(skb, app_nest);
+		}
+	}
+	nla_nest_end(skb, app);
+
+	if (netdev->dcbnl_ops->getdcbx)
+		dcbx = netdev->dcbnl_ops->getdcbx(netdev);
+	else
+		dcbx = -EOPNOTSUPP;
+
+	spin_unlock(&dcb_lock);
+
+	/* features flags */
+	if (ops->getfeatcfg) {
+		struct nlattr *feat = nla_nest_start(skb, DCB_ATTR_CEE_FEAT);
+		if (!feat)
+			goto nla_put_failure;
+
+		for (i = DCB_FEATCFG_ATTR_ALL + 1; i <= DCB_FEATCFG_ATTR_MAX;
+		     i++)
+			if (!ops->getfeatcfg(netdev, i, &value))
+				NLA_PUT_U8(skb, i, value);
+
+		nla_nest_end(skb, feat);
+	}
+
+	/* peer info if available */
 	if (ops->cee_peer_getpg) {
 		struct cee_pg pg;
 		err = ops->cee_peer_getpg(netdev, &pg);
@@ -1695,16 +1829,24 @@ static int dcbnl_cee_get(struct net_device *netdev, struct nlattr **tb,
 		if (err)
 			goto nla_put_failure;
 	}
-
 	nla_nest_end(skb, cee);
-	nlmsg_end(skb, nlh);
 
+	/* DCBX state */
+	if (dcbx >= 0) {
+		err = nla_put_u8(skb, DCB_ATTR_DCBX, dcbx);
+		if (err)
+			goto nla_put_failure;
+	}
+	nlmsg_end(skb, nlh);
 	return rtnl_unicast(skb, &init_net, pid);
+
+dcb_unlock:
+	spin_unlock(&dcb_lock);
 nla_put_failure:
 	nlmsg_cancel(skb, nlh);
 nlmsg_failure:
-	kfree_skb(skb);
-	return -1;
+	nlmsg_free(skb);
+	return err;
 }
 
 static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
-- 
1.7.3.5





^ permalink raw reply related

* Re: [PATCH] sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
From: David Miller @ 2011-07-02 11:55 UTC (permalink / raw)
  To: weiyj.lk; +Cc: netdev, linux-sctp, Michael.Tuexen, seggelmann
In-Reply-To: <4E0F6F20.5020505@gmail.com>

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Sun, 03 Jul 2011 03:18:56 +0800

> @@ -2073,10 +2073,33 @@ static int
> sctp_setsockopt_disable_fragments(struct sock *sk,

Patch corrupted by your email client.

^ permalink raw reply

* [PATCH  v2] sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
From: Wei Yongjun @ 2011-07-02 19:28 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-sctp, Michael Tüxen, Robin Seggelmann

From: Wei Yongjun <yjwei@cn.fujitsu.com>

We forgot to send up SCTP_SENDER_DRY_EVENT notification when
user app subscribes to this event, and there is no data to be
sent or retransmit.

This is required by the Socket API and used by the DTLS/SCTP
implementation.

Reported-by: Michael Tüxen <Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Tested-by: Robin Seggelmann <seggelmann@fh-muenster.de>

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 6766913..99e25de 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2073,10 +2073,33 @@ static int sctp_setsockopt_disable_fragments(struct sock *sk,
 static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
 				  unsigned int optlen)
 {
+	struct sctp_association *asoc;
+	struct sctp_ulpevent *event;
+
 	if (optlen > sizeof(struct sctp_event_subscribe))
 		return -EINVAL;
 	if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
 		return -EFAULT;
+
+	/* 
+	 * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
+	 * if there is no data to be sent or retransmit, the stack will
+	 * immediately send up this notification.
+	 */
+	if (sctp_ulpevent_type_enabled(SCTP_SENDER_DRY_EVENT,
+				       &sctp_sk(sk)->subscribe)) {
+		asoc = sctp_id2assoc(sk, 0);
+
+		if (asoc && sctp_outq_is_empty(&asoc->outqueue)) {
+			event = sctp_ulpevent_make_sender_dry_event(asoc,
+					GFP_ATOMIC);
+			if (!event)
+				return -ENOMEM;
+
+			sctp_ulpq_tail_event(&asoc->ulpq, event);
+		}
+	}
+
 	return 0;
 }
 
-- 
1.7.5.1



^ permalink raw reply related

* [PATCH] sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
From: Wei Yongjun @ 2011-07-02 19:18 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-sctp, Michael Tüxen, Robin Seggelmann

From: Wei Yongjun<yjwei@cn.fujitsu.com>

We forgot to send up SCTP_SENDER_DRY_EVENT notification when
user app subscribes to this event, and there is no data to be
sent or retransmit.

This is required by the Socket API and used by the DTLS/SCTP
implementation.

Reported-by: Michael Tüxen<Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wei Yongjun<yjwei@cn.fujitsu.com>
Tested-by: Robin Seggelmann<seggelmann@fh-muenster.de>

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 6766913..99e25de 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2073,10 +2073,33 @@ static int sctp_setsockopt_disable_fragments(struct sock *sk,
  static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
  				  unsigned int optlen)
  {
+	struct sctp_association *asoc;
+	struct sctp_ulpevent *event;
+
  	if (optlen>  sizeof(struct sctp_event_subscribe))
  		return -EINVAL;
  	if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
  		return -EFAULT;
+
+	/*
+	 * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
+	 * if there is no data to be sent or retransmit, the stack will
+	 * immediately send up this notification.
+	 */
+	if (sctp_ulpevent_type_enabled(SCTP_SENDER_DRY_EVENT,
+				&sctp_sk(sk)->subscribe)) {
+		asoc = sctp_id2assoc(sk, 0);
+
+		if (asoc&&  sctp_outq_is_empty(&asoc->outqueue)) {
+			event = sctp_ulpevent_make_sender_dry_event(asoc,
+					GFP_ATOMIC);
+			if (!event)
+				return -ENOMEM;
+
+			sctp_ulpq_tail_event(&asoc->ulpq, event);
+		}
+	}
+
  	return 0;
  }

-- 
1.7.5.1




^ permalink raw reply related

* Re: [PATCH] net: 8139too: Initial necessary vlan_features to support vlan
From: Francois Romieu @ 2011-07-02  9:51 UTC (permalink / raw)
  To: Shan Wei; +Cc: David Miller, netdev, Alexey Dobriyan, tj
In-Reply-To: <4E0ED194.2030103@cn.fujitsu.com>

Shan Wei <shanwei@cn.fujitsu.com> :
> Offload setting of vlan device requires
> vlan_features to be initialed.
[...]
> @@ -993,6 +993,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
>  	 * features
>  	 */
>  	dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
> +	dev->vlan_features = dev->features;

        /* note: the hardware is not capable of sg/csum/highdma, however
         * through the use of skb_copy_and_csum_dev we enable these
         * features
         */

The commit message is a bit misleading wrt hardware capabilities but the
patch makes sense.

Acked-by: Francois Romieu <romieu@fr.zoreil.com>

--
Ueimor

^ permalink raw reply

* Re: [PATCH] Disable router anycast address for /127 prefixes
From: Bjørn Mork @ 2011-07-02  9:38 UTC (permalink / raw)
  To: Brian Haley; +Cc: netdev
In-Reply-To: <4E0E1B85.1080906@hp.com>

Brian Haley <brian.haley@hp.com> writes:
> On 07/01/2011 02:26 PM, Bjørn Mork wrote:
>> Brian Haley <brian.haley@hp.com> writes:
>>
>>> I'm not sure you'd need this part as there shouldn't be a /127 in the list to remove.
>> 
>> I don't understand exactly what you mean here.... 
>
> If you never add an anycast address when the prefix length is 127, the address
> wouldn't be there when you went to remove it.  In other words, the call to
> __ipv6_dev_ac_dec() would return -ENOENT, which is ignored anyways.

Doh!  Of course.  Sorry for being that slow...

And thanks for taking the time to feed it to me with a small enough
spoon :-)

> It's not a common codepath so the two lines of code wouldn't hurt anything
> I guess...

Personally I prefer "symmetric" coding because it leaves fewer questions
unanswered (necessary for the slow among us, as demonstrated above).

But I think that's for those actually maintaining this code to decide.
I can post an updated patch if required, or feel free to apply only the
first hunk.


Bjørn

^ permalink raw reply

* [PATCH] net: 8139too: Initial necessary vlan_features to support vlan
From: Shan Wei @ 2011-07-02  8:06 UTC (permalink / raw)
  To: David Miller, 单卫, netdev, Alexey Dobriyan, tj

Offload setting of vlan device requires
vlan_features to be initialed.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
 drivers/net/8139too.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index ed6355c..c2672c6 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -993,6 +993,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
 	 * features
 	 */
 	dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
+	dev->vlan_features = dev->features;
 
 	dev->irq = pdev->irq;
 
-- 
1.7.4.1

^ permalink raw reply related

* Re: [RFC][NET-NEXT PATCH 2/2] net: Add GSO to vlan_features initialization
From: Shan Wei @ 2011-07-02  7:07 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: David Miller, netdev, Eric Dumazet, Michał Mirosław,
	therbert@google.com
In-Reply-To: <4E094EE7.1000203@cn.fujitsu.com>

Hi Ben:

Shan Wei wrote, at 06/28/2011 11:47 AM:
> Hi Ben:
> 
> Ben Hutchings wrote, at 06/25/2011 12:51 AM:
>> Have you verified that GSO works correctly for VLAN devices if the
>> underlying device does not support VLAN tag insertion?
> 
> OK. I will do some test in future days.
> Then report test results.

Results is coming....
GSO works correctly for VLAN devices when
underlying device is Realtek NIC with 8139too driver.

Network tracepoint shows as following:
<Begin:
       tcpclient-5915  [000]  2114.246780: net_dev_queue: dev=eth1.44 skbaddr=f3051bc0 len=74
       tcpclient-5915  [000]  2114.246790: net_dev_queue: dev=eth1 skbaddr=f3051bc0 len=74
       tcpclient-5915  [000]  2114.246798: net_dev_xmit: dev=eth1 skbaddr=f3051bc0 len=78 rc=0
       tcpclient-5915  [000]  2114.246799: net_dev_xmit: dev=eth1.44 skbaddr=f3051bc0 len=74 rc=0
          <idle>-0     [000]  2114.246905: net_dev_queue: dev=eth1.44 skbaddr=f73cc480 len=66
          <idle>-0     [000]  2114.246908: net_dev_queue: dev=eth1 skbaddr=f73cc480 len=66
          <idle>-0     [000]  2114.246911: net_dev_xmit: dev=eth1 skbaddr=f73cc480 len=70 rc=0
          <idle>-0     [000]  2114.246912: net_dev_xmit: dev=eth1.44 skbaddr=f73cc480 len=66 rc=0
       tcpclient-5915  [000]  2114.247109: net_dev_queue: dev=eth1.44 skbaddr=f3051bc0 len=2962
       tcpclient-5915  [000]  2114.247121: net_dev_queue: dev=eth1 skbaddr=f73cc380 len=1514
       tcpclient-5915  [000]  2114.247130: net_dev_xmit: dev=eth1 skbaddr=f73cc380 len=1518 rc=0
       tcpclient-5915  [000]  2114.247131: net_dev_xmit: dev=eth1.44 skbaddr=f73cc380 len=1514 rc=0
       tcpclient-5915  [000]  2114.247132: net_dev_queue: dev=eth1 skbaddr=f73cc480 len=1514
       tcpclient-5915  [000]  2114.247138: net_dev_xmit: dev=eth1 skbaddr=f73cc480 len=1518 rc=0
       tcpclient-5915  [000]  2114.247139: net_dev_xmit: dev=eth1.44 skbaddr=f73cc480 len=1514 rc=0
end:>

But, test case requires following two patches:
1. Fix broken vlan GSO setting

[PATCH 1/2] net: vlan: enable GSO by default
http://patchwork.ozlabs.org/patch/101714/

2. Fix my 8139too NIC driver that does not initial vlan_features.
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -993,6 +993,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
         * features
         */
        dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
+       dev->vlan_features = dev->features;

-- 
Best Regards
-----
Shan Wei

^ permalink raw reply

* Re: [PATCH] [v3][net][bna] Fix call trace when interrupts are disabled while sleeping function kzalloc is called
From: David Miller @ 2011-07-02  0:50 UTC (permalink / raw)
  To: rmody; +Cc: shyam.iyer.t, netdev, ddutt, huangj, shyam_iyer
In-Reply-To: <E5313AF6F2BFD14293E5FD0F94750F86A82D66F782@HQ1-EXCH01.corp.brocade.com>

From: Rasesh Mody <rmody@brocade.com>
Date: Tue, 28 Jun 2011 16:32:58 -0700

>>From: Shyam Iyer [mailto:shyam.iyer.t@gmail.com]
>>Sent: Tuesday, June 28, 2011 11:58 AM
>>
>>request_threaded irq will call kzalloc that can sleep. Initializing the
>>flags variable outside of spin_lock_irqsave/restore in
>>bnad_mbox_irq_alloc will avoid call traces like below.
 ...
> Patch looks fine.
> 
> Acked-by: Rasesh Mody <rmody@brocade.com>

Applied, thanks

^ permalink raw reply

* Re: [PATCH] gianfar: code cleanups
From: David Miller @ 2011-07-02  0:46 UTC (permalink / raw)
  To: sebastian.belden; +Cc: netdev, joe, sebastian.poehn
In-Reply-To: <1309510843.10177.10.camel@DENEC1DT0191>

From: "Sebastian Pöhn" <sebastian.belden@googlemail.com>
Date: Fri, 01 Jul 2011 11:00:43 +0200

> # moves if_vlan.h include from gianfar.c to gianfar.h

Please don't do this, keep the explicit includes as close
to the actual dependencies as possible.  With your change
all of the other source files will load in and parse if_vlan.h
even though they have no need for it.

^ permalink raw reply

* Re: [net-2.6 PATCH 3/3] qlge:Version change to v1.00.00.29
From: David Miller @ 2011-07-02  0:36 UTC (permalink / raw)
  To: ron.mercer; +Cc: netdev, jitendra.kalsaria, ameen.rahman
In-Reply-To: <1309464127-14797-3-git-send-email-ron.mercer@qlogic.com>

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Thu, 30 Jun 2011 13:02:07 -0700

> From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> 
> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

Applied.

^ permalink raw reply

* Re: [net-2.6 PATCH 2/3] qlge: Fix printk priority so chip fatal errors are always reported.
From: David Miller @ 2011-07-02  0:36 UTC (permalink / raw)
  To: ron.mercer; +Cc: netdev, jitendra.kalsaria, ameen.rahman
In-Reply-To: <1309464127-14797-2-git-send-email-ron.mercer@qlogic.com>

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Thu, 30 Jun 2011 13:02:06 -0700

> From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> 
> Precedence of the printk should be at higher level so chip fatal
> errors are always reported.
> 
> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

Applied.

^ permalink raw reply

* Re: [net-2.6 PATCH 1/3] qlge:Fix crash caused by mailbox execution on wedged chip.
From: David Miller @ 2011-07-02  0:36 UTC (permalink / raw)
  To: ron.mercer; +Cc: netdev, jitendra.kalsaria, ameen.rahman
In-Reply-To: <1309464127-14797-1-git-send-email-ron.mercer@qlogic.com>

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Thu, 30 Jun 2011 13:02:05 -0700

> From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> 
> When we are in a recover process from a chip fatal error,
> 	driver should skip over execution of mailbox commands during
> 	resetting chip.
> 
> Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

Applied.

^ permalink raw reply

* Re: [PATCH 3/3] xfrm4: Don't call icmp_send on local error
From: David Miller @ 2011-07-02  0:34 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev
In-Reply-To: <20110630092041.GD13201@secunet.com>

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 30 Jun 2011 11:20:41 +0200

> Calling icmp_send() on a local message size error leads to
> an incorrect update of the path mtu. So use ip_local_error()
> instead to notify the socket about the error.
> 
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets
From: David Miller @ 2011-07-02  0:34 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev
In-Reply-To: <20110630091932.GC13201@secunet.com>

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 30 Jun 2011 11:19:32 +0200

> We might call ip_ufo_append_data() for packets that will be IPsec
> transformed later. This function should be used just for real
> udp packets. So we check for rt->dst.header_len which is only
> nonzero on IPsec handling and call ip_ufo_append_data() just
> if rt->dst.header_len is zero.
> 
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok
From: David Miller @ 2011-07-02  0:34 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev
In-Reply-To: <20110630091820.GB13201@secunet.com>

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 30 Jun 2011 11:18:20 +0200

> The family arg is not used any more, so remove it.
> 
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

Applied.

^ permalink raw reply

* Re: [PATCH] 6pack,mkiss: fix lock inconsistency
From: David Miller @ 2011-07-02  0:30 UTC (permalink / raw)
  To: arnd; +Cc: f6bvp, ralf, linux-kernel, netdev, linux-hams
In-Reply-To: <201107012328.46256.arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 1 Jul 2011 23:28:46 +0200

> Lockdep found a locking inconsistency in the mkiss_close function:
> 
>> kernel: [ INFO: inconsistent lock state ]
>> kernel: 2.6.39.1 #3
>> kernel: ---------------------------------
>> kernel: inconsistent {IN-SOFTIRQ-R} -> {SOFTIRQ-ON-W} usage.
>> kernel: ax25ipd/2813 [HC0[0]:SC0[0]:HE1:SE1] takes:
>> kernel: (disc_data_lock){+++?.-}, at: [<ffffffffa018552b>] mkiss_close+0x1b/0x90 [mkiss]
>> kernel: {IN-SOFTIRQ-R} state was registered at:
> 
> The message hints that disc_data_lock is aquired with softirqs disabled,
> but does not itself disable softirqs, which can in rare circumstances
> lead to a deadlock. 
> The same problem is present in the 6pack driver, this patch fixes both
> by using write_lock_bh instead of write_lock.
> 
> Reported-by: Bernard F6BVP <f6bvp@free.fr>
> Tested-by: Bernard F6BVP <f6bvp@free.fr>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Ralf Baechle<ralf@linux-mips.org>
> Cc: stable@kernel.org

Applied, thanks!

^ permalink raw reply

* Re: [PATCH] net: rds: fix const array syntax
From: Greg Dietsche @ 2011-07-01 23:12 UTC (permalink / raw)
  To: Greg Dietsche; +Cc: andy.grover, davem, netdev, rds-devel, kernel-janitors
In-Reply-To: <1309560635-17514-1-git-send-email-Gregory.Dietsche@cuw.edu>

On 07/01/2011 05:50 PM, Greg Dietsche wrote:
> Correct the syntax so that both array and pointer are const.
>
> Signed-off-by: Greg Dietsche<Gregory.Dietsche@cuw.edu>
> ---
>   net/rds/tcp_stats.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/rds/tcp_stats.c b/net/rds/tcp_stats.c
> index d5898d0..f8a7954 100644
> --- a/net/rds/tcp_stats.c
> +++ b/net/rds/tcp_stats.c
> @@ -40,7 +40,7 @@
>   DEFINE_PER_CPU(struct rds_tcp_statistics, rds_tcp_stats)
>   	____cacheline_aligned;
>
> -static const char const *rds_tcp_stat_names[] = {
> +static const char * const rds_tcp_stat_names[] = {
>   	"tcp_data_ready_calls",
>   	"tcp_write_space_calls",
>   	"tcp_sndbuf_full",
>    
Andy's email is bouncing (Recipient unknown)... if someone else could 
pick this up, that'd be great!

Greg


^ permalink raw reply

* Re: [NEXT][PATCH 0/5] Updates for net-next for IEEE 802.15.4 code
From: David Miller @ 2011-07-01 23:17 UTC (permalink / raw)
  To: dbaryshkov; +Cc: netdev
In-Reply-To: <1309437468-31021-1-git-send-email-dbaryshkov@gmail.com>

From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date: Thu, 30 Jun 2011 16:37:43 +0400

> The following changes since commit 1049f6413f6e52572a768ca1590fa479ef0a48e8:
> 
>   myri10ge: Update MAINTAINERS (2011-06-29 06:02:05 -0700)
> 
> are available in the git repository at:
>   git://git2.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-next

Pulled, thanks Dmitry.

^ permalink raw reply

* Re: [PATCH] net: rds: fix const array syntax
From: David Miller @ 2011-07-01 23:16 UTC (permalink / raw)
  To: Gregory.Dietsche; +Cc: andy.grover, netdev, rds-devel, kernel-janitors
In-Reply-To: <1309560635-17514-1-git-send-email-Gregory.Dietsche@cuw.edu>

From: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date: Fri,  1 Jul 2011 17:50:35 -0500

> Correct the syntax so that both array and pointer are const.
> 
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

Applied.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox