Netdev List
 help / color / mirror / Atom feed
* [PATCH] linux-firmware: Replace the old firmware
From: Hayes Wang @ 2011-06-13  9:15 UTC (permalink / raw)
  To: dwmw2; +Cc: romieu, netdev, Hayes Wang

Replace the old firmware with the new one which is embedded more
information. The old firmware needs the old method of parsing, and
the new firmware needs the new one. They are not compatible.

rtl8168d-3.fw replace rtl8168d-1.fw.
rtl8168d-4.fw replace rtl8168d-2.fw.
rtl8168e-3.fw replace rtl8168e-1.fw.
rtl8168e-4.fw replace rtl8168e-2.fw.
rtl8105e-2.fw replace rtl8105e-1.fw.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 WHENCE                |    4 ++++
 rtl_nic/rtl8105e-2.fw |  Bin 0 -> 2144 bytes
 rtl_nic/rtl8168d-3.fw |  Bin 0 -> 1584 bytes
 rtl_nic/rtl8168d-4.fw |  Bin 0 -> 1408 bytes
 rtl_nic/rtl8168e-3.fw |  Bin 2804 -> 5568 bytes
 rtl_nic/rtl8168e-4.fw |  Bin 0 -> 3984 bytes
 6 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 rtl_nic/rtl8105e-2.fw
 create mode 100644 rtl_nic/rtl8168d-3.fw
 create mode 100644 rtl_nic/rtl8168d-4.fw
 create mode 100644 rtl_nic/rtl8168e-4.fw

diff --git a/WHENCE b/WHENCE
index d2abe41..8eba04a 100644
--- a/WHENCE
+++ b/WHENCE
@@ -1613,10 +1613,14 @@ Driver: r8169 - RealTek 8169/8168/8101 ethernet driver.
 
 File: rtl_nic/rtl8168d-1.fw
 File: rtl_nic/rtl8168d-2.fw
+File: rtl_nic/rtl8168d-3.fw
+File: rtl_nic/rtl8168d-4.fw
 File: rtl_nic/rtl8105e-1.fw
+File: rtl_nic/rtl8105e-2.fw
 File: rtl_nic/rtl8168e-1.fw
 File: rtl_nic/rtl8168e-2.fw
 File: rtl_nic/rtl8168e-3.fw
+File: rtl_nic/rtl8168e-4.fw
 
 Licence:
  * Copyright © 2011, Realtek Semiconductor Corporation
di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-${U+SI+Tm99Y$!S_+@tB53W44XN
zzLncc={IU{|9_lQSLIjO;db+M4mM^VXU%hO5xJUIti(4=Y@3K{D>5Q>_5Km^HbK6g
zM!tenO%EbxU*bH$lAi*8eqb;EY*L>)!91GWFP>Y_-P6>MduNz|^I(AWJ@#enZyGRP
zMo)jzA9L59?u+_B^H6=5%1`%E=P%7~#Xk3<d4J7(4DQ0JV)rUoJ-5U-dhelk^`7Eo
zXZ4TxOtDjW93TD6_3Oc&NP4vfRs@#_o&&7?_(}C8b8t*+w~*(b!JTKlkmzYodP|X-
zqrW~M$9n)@r-@_HA^PfT@<v>K+WZ7LiVmB<kN?JOz^9(a&^gDM<S$5lQ&fjK{L&bo
zLH8uS)3a&L&Sm(v!=r6o%%K|&%gE`q_?|?*2JV>z*Rf6KXIh8F*!JK<{>s!S`>j(>
rrzXvR0we8}^gEF4yWh}J-(C1H{$}aBCEofE5TfN?)c*iIC%-=d;3S|Q

literal 0
HcmV?d00001

diff --git a/rtl_nic/rtl8168d-3.fw b/rtl_nic/rtl8168d-3.fw
new file mode 100644
index 0000000000000000000000000000000000000000..17309e299a23991bc8ea7aa64d371ba381cda770
GIT binary patch
literal 1584
zcmb7_&ud&&6vyvOW{#;*GqpmA5fh{<p>$^2skEy>LTzo*v|=T(n-*030|ZlO;oFQG
zTMKSPagn5`AR{EGD_wMUZmm&5#gx8IlL{@&xY9|QPW+si_h@w2f$+WOo*(ynzvsN0
z*GBi}OQn~Gi~0P4-TBh)Vj=wJSH?P<3gOF;-@m7@cTb@(T-bN8R6JPP7cRfGD`dlv
z218aMSO~TEzIFTW&8!qmL0PS}OwDyuW72e&b%XtTU<956TenP;=ZWbz9Y~pG(yWbj
z&NSOg{EPp~BPPk4AaABjEV<P~rdprr<7w0Mk}3U}X`I+?^Vl`h680Rvl-D0OwLdX!
zJmCDSX?+cB!1r#9_rSX8_BqpeIBx&S^z?R9dC@fDwMR@lsWpdPb-UWN`#EcbSoe>y
zuKF6^E6!noyX-I>t8_IObA<P3jN|eCi5OpX+%z2pBQOtE&}yP!T4|dux^}DhE}4q4
zZ*s4xPED`9>j~3eZ^HX|;#N$nADJ$b<2)jG_<1X6>{y9RQ^(Moo<xs#_i}Tb4}a$y
zp`&AV%Jlin!}ysDK5DqH2VehIA35_`(*itN7fcs8ci{`uGV4T(!{qrq907eE{O-=l
zF*QNoXX(i`lYTM1GZgoP9{K#VxZAMb?GAT~_tL-8*YCS=O?r2#NDtNRVGrCknU^Qg
z@;Pchdy>As&AePeGxD5E<+f??i0PX*m=R|04%pfM)0AUB;gLa``VS9tn)vF}@}6~S
z9HsYO<Ed_q&OSBj?0au2aE?a1>p(5n$aV2P<i<eyH4h4XeI2n*H16A~G5!XB?u(e~
zN0|dZ>sH=WAUE|cnsLtRMbjm;eTjLkH0UWa(TR(>rUp$J&c9MMeI3VSJcigXj&8n3
z-6__yJ#c%b%WaW4SSp)dNAqcTF7CvhBj?Ai-NsJ7#g_9rZ8`&wbiymPJHErr3%-7O
znD+iV?|9E=#p~BjnT~U>Lrv4bvgz6lVpGfm->mzi_f4m%;cw5x8D@@mpkuGX1A7fk
z@AGEWelnGbt6b$<KaNh+7<|n1^M|HhzWqOVC%zkCuI`&2w5dnlR*t<1|CrxDaNf!{
zv%w70+jKC!fR2tgu~W?G4Q$7C&Tmq`c9s~{1J~jFJNkaW-Zs-!zmvZ~aP{}@Q|{a*
zFH7xBbWOo4fPVk$m8?z(?LmJFe**({ZaA&5+`}6_#IxO}<PG0|PiK$+0m<)QUJh0t

literal 0
HcmV?d00001

diff --git a/rtl_nic/rtl8168d-4.fw b/rtl_nic/rtl8168d-4.fw
new file mode 100644
index 0000000000000000000000000000000000000000..b35fb1b70eae2bdadad668b79462c9b94c0b008f
GIT binary patch
literal 1408
zcmb7^OGuPa6vyw3^PSAB86$`?bO>n|%}kAzD;Lts$COl<Z4xTlv<wmwj@l+oXcx55
zX(5HdM7gR(L5sGTffyx?IvNy=t;%Q9?|MH=mwlUa&*Pr+KmT*S+uTqc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fasV|U0PcgSeY#oifq
zKBtk*-;b|0WNY#3*OH*!Bc^NpS;c%D=k7RJ;OFJf(VD#v>>LjEFq5pA-B$J-^1}T9
zzn*-@lIwbt_lsWea?|Oj7mLsd_X=HzKif}&{p>qUUSH>~$A7r5Y3yqyJxsk!KT8jd
z!ZwEg66%p8MyPiTy9<$BkFQSw{>-nVhUT{ozvbi``aw3&*ENZs1b$3skiM}Rbtcg-
z!6#UVzsYgd$ko<H$k*NppN-r;zs#qi2k>X_t4tkpORm-%J(Ht**Y1=}3q{Ag%bm;_
zRpak`in<&YO`qaUe1e)Z`+I{upZ+HI>3-3L=I=?-i|F-o7KVrIY(9?8#_pK2YodF1
z5Pf^U4Yo#lo#ffEjCovu4f$lL#Z~NgkbB4vFhj;u%Q@7bm;M<r|9$9PBJK`+8E^5h
zIsO238HX&0^sJxE-r}4>Ucx<TvlzbLh-L55aF#EE{d_NRKK3qnl{4t0_wO#Ip2X^_
zr&sgz-OQ<{U!Bd_aevS2p^k?{|3Vyl$K`S{7jv%ExmdS-gGIFK4!;@sPxyn{N{xX#
z{#_b=gMHb)>&EfllBZ|~{~gChbj)Ne6&iy#I&S<66&i;(I>BT533#Imj7Pr!-smKc
z=_lch7M?^=g$lgUZVV6qal>3bDdj(OjXp?jpZ_j(j)fF|P;Y&==D!;&_~yOyJ2IE6
kbgsqrUD=&tPq|!`*}_+KFNL?fXN2;=oFWgpqnbGPKZs`*OaK4?

literal 0
HcmV?d00001

-- 
1.7.3.2


^ permalink raw reply related

* Re: [PATCH] Documentation:change all arch/i386 to arch/x86 in Documentation
From: Jiri Kosina @ 2011-06-13  9:02 UTC (permalink / raw)
  To: Wanlong Gao
  Cc: linux-doc, linux-kernel, netdev, linux-kbuild, linux-video,
	xiyoulinuxkernelgroup, linux-kernel, Dipankar Sarma,
	Paul E. McKenney, Randy Dunlap, Nick Piggin, Karsten Keil,
	Michal Marek, James Bottomley, Martin Mares, Harry Wei,
	Chuck Lever, Trond Myklebust, Thomas Weber, Mike Frysinger,
	Justin P. Mattock
In-Reply-To: <alpine.LNX.2.00.1106131055250.22872@pobox.suse.cz>

On Mon, 13 Jun 2011, Jiri Kosina wrote:

> > From: Wanlong Gao <wanlong.gao@gmail.com>
> > 
> > Change all "arch/i386" to "arch/x86" in Documentaion/,
> > since the directory has changed.
> 
> I can take it.

Actually no, I will not be taking it. Simple sed doesn't work here -- some 
of the files have either obtained a different name in the meantime, or 
don't exist any more at all.

So please, next time

- be reasonable about the recepient list of your patches
- make sure that the trivially verifiable changes are really valid (and 
  even more so if sending mail to 20+ random recepients)

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: [PATCH] Documentation:change all arch/i386 to arch/x86 in Documentation
From: Jiri Kosina @ 2011-06-13  8:56 UTC (permalink / raw)
  To: Wanlong Gao
  Cc: linux-doc, linux-kernel, netdev, linux-kbuild, linux-video,
	xiyoulinuxkernelgroup, linux-kernel, Dipankar Sarma,
	Paul E. McKenney, Randy Dunlap, Nick Piggin, Karsten Keil,
	Michal Marek, James Bottomley, Martin Mares, Harry Wei,
	Chuck Lever, Trond Myklebust, Thomas Weber, Mike Frysinger,
	Justin P. Mattock
In-Reply-To: <1307942898-3728-1-git-send-email-wanlong.gao@gmail.com>

On Mon, 13 Jun 2011, Wanlong Gao wrote:

> From: Wanlong Gao <wanlong.gao@gmail.com>
> 
> Change all "arch/i386" to "arch/x86" in Documentaion/,
> since the directory has changed.

I can take it.

But please, be really reasonable about the CC list when sending patches 
next time. CCing gazillion of random people and mailinglists because such 
a super-simple change is very likely to be considered unncessarily 
annoying.

Thanks.

> 
> Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
> ---
>  Documentation/RCU/NMI-RCU.txt             |    4 +-
>  Documentation/blockdev/README.DAC960      |    2 +-
>  Documentation/blockdev/ramdisk.txt        |    8 +++---
>  Documentation/cpu-freq/cpu-drivers.txt    |    2 +-
>  Documentation/filesystems/nfs/nfsroot.txt |    2 +-
>  Documentation/isdn/README.HiSax           |    2 +-
>  Documentation/kbuild/makefiles.txt        |   38 ++++++++++++++--------------
>  Documentation/magic-number.txt            |    2 +-
>  Documentation/mca.txt                     |    6 ++--
>  Documentation/scheduler/sched-arch.txt    |    2 +-
>  Documentation/scsi/BusLogic.txt           |    2 +-
>  Documentation/serial/computone.txt        |    2 +-
>  Documentation/svga.txt                    |    2 +-
>  Documentation/zh_CN/magic-number.txt      |    2 +-
>  14 files changed, 38 insertions(+), 38 deletions(-)
> 
> diff --git a/Documentation/RCU/NMI-RCU.txt b/Documentation/RCU/NMI-RCU.txt
> index a8536cb..bf82851 100644
> --- a/Documentation/RCU/NMI-RCU.txt
> +++ b/Documentation/RCU/NMI-RCU.txt
> @@ -5,8 +5,8 @@ Although RCU is usually used to protect read-mostly data structures,
>  it is possible to use RCU to provide dynamic non-maskable interrupt
>  handlers, as well as dynamic irq handlers.  This document describes
>  how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer
> -work in "arch/i386/oprofile/nmi_timer_int.c" and in
> -"arch/i386/kernel/traps.c".
> +work in "arch/x86/oprofile/nmi_timer_int.c" and in
> +"arch/x86/kernel/traps.c".
>  
>  The relevant pieces of code are listed below, each followed by a
>  brief explanation.
> diff --git a/Documentation/blockdev/README.DAC960 b/Documentation/blockdev/README.DAC960
> index 0e8f618..bd85fb9 100644
> --- a/Documentation/blockdev/README.DAC960
> +++ b/Documentation/blockdev/README.DAC960
> @@ -214,7 +214,7 @@ replacing "/usr/src" with wherever you keep your Linux kernel source tree:
>    make config
>    make bzImage (or zImage)
>  
> -Then install "arch/i386/boot/bzImage" or "arch/i386/boot/zImage" as your
> +Then install "arch/x86/boot/bzImage" or "arch/x86/boot/zImage" as your
>  standard kernel, run lilo if appropriate, and reboot.
>  
>  To create the necessary devices in /dev, the "make_rd" script included in
> diff --git a/Documentation/blockdev/ramdisk.txt b/Documentation/blockdev/ramdisk.txt
> index 6c820ba..fa72e97 100644
> --- a/Documentation/blockdev/ramdisk.txt
> +++ b/Documentation/blockdev/ramdisk.txt
> @@ -64,9 +64,9 @@ the RAM disk dynamically grows as data is being written into it, a size field
>  is not required. Bits 11 to 13 are not currently used and may as well be zero.
>  These numbers are no magical secrets, as seen below:
>  
> -./arch/i386/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK     0x07FF
> -./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
> -./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000
> +./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK     0x07FF
> +./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
> +./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000
>  
>  Consider a typical two floppy disk setup, where you will have the
>  kernel on disk one, and have already put a RAM disk image onto disk #2.
> @@ -85,7 +85,7 @@ The command line equivalent is: "prompt_ramdisk=1"
>  Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word.
>  So to create disk one of the set, you would do:
>  
> -	/usr/src/linux# cat arch/i386/boot/zImage > /dev/fd0
> +	/usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0
>  	/usr/src/linux# rdev /dev/fd0 /dev/fd0
>  	/usr/src/linux# rdev -r /dev/fd0 49152
>  
> diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
> index 6c30e93..ed07e4f 100644
> --- a/Documentation/cpu-freq/cpu-drivers.txt
> +++ b/Documentation/cpu-freq/cpu-drivers.txt
> @@ -168,7 +168,7 @@ in-chipset dynamic frequency switching to policy->min, the upper limit
>  to policy->max, and -if supported- select a performance-oriented
>  setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a
>  powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check
> -the reference implementation in arch/i386/kernel/cpu/cpufreq/longrun.c
> +the reference implementation in arch/x86/kernel/cpu/cpufreq/longrun.c
>  
>  
>  
> diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt
> index 90c71c6..ffdd9d8 100644
> --- a/Documentation/filesystems/nfs/nfsroot.txt
> +++ b/Documentation/filesystems/nfs/nfsroot.txt
> @@ -226,7 +226,7 @@ They depend on various facilities being available:
>       	cdrecord.
>  
>  	e.g.
> -	  cdrecord dev=ATAPI:1,0,0 arch/i386/boot/image.iso
> +	  cdrecord dev=ATAPI:1,0,0 arch/x86/boot/image.iso
>  
>       	For more information on isolinux, including how to create bootdisks
>       	for prebuilt kernels, see http://syslinux.zytor.com/
> diff --git a/Documentation/isdn/README.HiSax b/Documentation/isdn/README.HiSax
> index 99e87a6..b1a573c 100644
> --- a/Documentation/isdn/README.HiSax
> +++ b/Documentation/isdn/README.HiSax
> @@ -506,7 +506,7 @@ to e.g. the Internet:
>       <ISDN subsystem - ISDN support -- HiSax>
>       make clean; make zImage; make modules; make modules_install
>  2. Install the new kernel
> -     cp /usr/src/linux/arch/i386/boot/zImage /etc/kernel/linux.isdn
> +     cp /usr/src/linux/arch/x86/boot/zImage /etc/kernel/linux.isdn
>       vi /etc/lilo.conf
>       <add new kernel in the bootable image section>
>       lilo
> diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
> index 47435e5..f47cdef 100644
> --- a/Documentation/kbuild/makefiles.txt
> +++ b/Documentation/kbuild/makefiles.txt
> @@ -441,7 +441,7 @@ more details, with real examples.
>  	specified if first option are not supported.
>  
>  	Example:
> -		#arch/i386/kernel/Makefile
> +		#arch/x86/kernel/Makefile
>  		vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
>  
>  	In the above example, vsyscall-flags will be assigned the option
> @@ -460,7 +460,7 @@ more details, with real examples.
>  	supported to use an optional second option.
>  
>  	Example:
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  		cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
>  
>  	In the above example, cflags-y will be assigned the option
> @@ -522,7 +522,7 @@ more details, with real examples.
>  	even though the option was accepted by gcc.
>  
>  	Example:
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  		cflags-y += $(shell \
>  		if [ $(call cc-version) -ge 0300 ] ; then \
>  			echo "-mregparm=3"; fi ;)
> @@ -802,7 +802,7 @@ but in the architecture makefiles where the kbuild infrastructure
>  is not sufficient this sometimes needs to be explicit.
>  
>  	Example:
> -		#arch/i386/boot/Makefile
> +		#arch/x86/boot/Makefile
>  		subdir- := compressed/
>  
>  The above assignment instructs kbuild to descend down in the
> @@ -812,12 +812,12 @@ To support the clean infrastructure in the Makefiles that builds the
>  final bootimage there is an optional target named archclean:
>  
>  	Example:
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  		archclean:
> -			$(Q)$(MAKE) $(clean)=arch/i386/boot
> +			$(Q)$(MAKE) $(clean)=arch/x86/boot
>  
> -When "make clean" is executed, make will descend down in arch/i386/boot,
> -and clean as usual. The Makefile located in arch/i386/boot/ may use
> +When "make clean" is executed, make will descend down in arch/x86/boot,
> +and clean as usual. The Makefile located in arch/x86/boot/ may use
>  the subdir- trick to descend further down.
>  
>  Note 1: arch/$(ARCH)/Makefile cannot use "subdir-", because that file is
> @@ -882,7 +882,7 @@ When kbuild executes, the following steps are followed (roughly):
>  	LDFLAGS_vmlinux uses the LDFLAGS_$@ support.
>  
>  	Example:
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  		LDFLAGS_vmlinux := -e stext
>  
>      OBJCOPYFLAGS	objcopy flags
> @@ -920,14 +920,14 @@ When kbuild executes, the following steps are followed (roughly):
>  	Often, the KBUILD_CFLAGS variable depends on the configuration.
>  
>  	Example:
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  		cflags-$(CONFIG_M386) += -march=i386
>  		KBUILD_CFLAGS += $(cflags-y)
>  
>  	Many arch Makefiles dynamically run the target C compiler to
>  	probe supported options:
>  
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  
>  		...
>  		cflags-$(CONFIG_MPENTIUMII)     += $(call cc-option,\
> @@ -1038,8 +1038,8 @@ When kbuild executes, the following steps are followed (roughly):
>  	into the arch/$(ARCH)/boot/Makefile.
>  
>  	Example:
> -		#arch/i386/Makefile
> -		boot := arch/i386/boot
> +		#arch/x86/Makefile
> +		boot := arch/x86/boot
>  		bzImage: vmlinux
>  			$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
>  
> @@ -1051,7 +1051,7 @@ When kbuild executes, the following steps are followed (roughly):
>  	To support this, $(archhelp) must be defined.
>  
>  	Example:
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  		define archhelp
>  		  echo  '* bzImage      - Image (arch/$(ARCH)/boot/bzImage)'
>  		endif
> @@ -1065,7 +1065,7 @@ When kbuild executes, the following steps are followed (roughly):
>  	from vmlinux.
>  
>  	Example:
> -		#arch/i386/Makefile
> +		#arch/x86/Makefile
>  		all: bzImage
>  
>  	When "make" is executed without arguments, bzImage will be built.
> @@ -1083,7 +1083,7 @@ When kbuild executes, the following steps are followed (roughly):
>  	2) kbuild knows what files to delete during "make clean"
>  
>  	Example:
> -		#arch/i386/kernel/Makefile
> +		#arch/x86/kernel/Makefile
>  		extra-y := head.o init_task.o
>  
>  	In this example, extra-y is used to list object files that
> @@ -1133,7 +1133,7 @@ When kbuild executes, the following steps are followed (roughly):
>  	Compress target. Use maximum compression to compress target.
>  
>  	Example:
> -		#arch/i386/boot/Makefile
> +		#arch/x86/boot/Makefile
>  		LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
>  		LDFLAGS_setup    := -Ttext 0x0 -s --oformat binary -e begtext
>  
> @@ -1193,7 +1193,7 @@ When kbuild executes, the following steps are followed (roughly):
>  
>  	When updating the $(obj)/bzImage target, the line
>  
> -	BUILD    arch/i386/boot/bzImage
> +	BUILD    arch/x86/boot/bzImage
>  
>  	will be displayed with "make KBUILD_VERBOSE=0".
>  
> @@ -1207,7 +1207,7 @@ When kbuild executes, the following steps are followed (roughly):
>  	kbuild knows .lds files and includes a rule *lds.S -> *lds.
>  
>  	Example:
> -		#arch/i386/kernel/Makefile
> +		#arch/x86/kernel/Makefile
>  		always := vmlinux.lds
>  
>  		#Makefile
> diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
> index 4b12abc..20ec3d9 100644
> --- a/Documentation/magic-number.txt
> +++ b/Documentation/magic-number.txt
> @@ -66,7 +66,7 @@ MKISS_DRIVER_MAGIC    0x04bf      mkiss_channel     drivers/net/mkiss.h
>  RISCOM8_MAGIC         0x0907      riscom_port       drivers/char/riscom8.h
>  SPECIALIX_MAGIC       0x0907      specialix_port    drivers/char/specialix_io8.h
>  HDLC_MAGIC            0x239e      n_hdlc            drivers/char/n_hdlc.c
> -APM_BIOS_MAGIC        0x4101      apm_user          arch/i386/kernel/apm.c
> +APM_BIOS_MAGIC        0x4101      apm_user          arch/x86/kernel/apm.c
>  CYCLADES_MAGIC        0x4359      cyclades_port     include/linux/cyclades.h
>  DB_MAGIC              0x4442      fc_info           drivers/net/iph5526_novram.c
>  DL_MAGIC              0x444d      fc_info           drivers/net/iph5526_novram.c
> diff --git a/Documentation/mca.txt b/Documentation/mca.txt
> index 510375d..cf8fd39 100644
> --- a/Documentation/mca.txt
> +++ b/Documentation/mca.txt
> @@ -3,7 +3,7 @@ i386 Micro Channel Architecture Support
>  
>  MCA support is enabled using the CONFIG_MCA define.  A machine with a MCA
>  bus will have the kernel variable MCA_bus set, assuming the BIOS feature
> -bits are set properly (see arch/i386/boot/setup.S for information on
> +bits are set properly (see arch/x86/boot/setup.S for information on
>  how this detection is done).
>  
>  Adapter Detection
> @@ -11,7 +11,7 @@ Adapter Detection
>  
>  The ideal MCA adapter detection is done through the use of the
>  Programmable Option Select registers.  Generic functions for doing
> -this have been added in include/linux/mca.h and arch/i386/kernel/mca.c.
> +this have been added in include/linux/mca.h and arch/x86/kernel/mca.c.
>  Everything needed to detect adapters and read (and write) configuration
>  information is there.  A number of MCA-specific drivers already use
>  this.  The typical probe code looks like the following:
> @@ -81,7 +81,7 @@ more people use shared IRQs on PCI machines.
>  In general, an interrupt must be acknowledged not only at the ICU (which
>  is done automagically by the kernel), but at the device level.  In
>  particular, IRQ 0 must be reset after a timer interrupt (now done in
> -arch/i386/kernel/time.c) or the first timer interrupt hangs the system.
> +arch/x86/kernel/time.c) or the first timer interrupt hangs the system.
>  There were also problems with the 1.3.x floppy drivers, but that seems
>  to have been fixed.
>  
> diff --git a/Documentation/scheduler/sched-arch.txt b/Documentation/scheduler/sched-arch.txt
> index d43dbcb..28aa107 100644
> --- a/Documentation/scheduler/sched-arch.txt
> +++ b/Documentation/scheduler/sched-arch.txt
> @@ -66,7 +66,7 @@ Your cpu_idle routines need to obey the following rules:
>  	    barrier issued (followed by a test of need_resched with
>  	    interrupts disabled, as explained in 3).
>  
> -arch/i386/kernel/process.c has examples of both polling and
> +arch/x86/kernel/process.c has examples of both polling and
>  sleeping idle functions.
>  
>  
> diff --git a/Documentation/scsi/BusLogic.txt b/Documentation/scsi/BusLogic.txt
> index d7fbc94..48e982c 100644
> --- a/Documentation/scsi/BusLogic.txt
> +++ b/Documentation/scsi/BusLogic.txt
> @@ -553,7 +553,7 @@ replacing "/usr/src" with wherever you keep your Linux kernel source tree:
>    make config
>    make zImage
>  
> -Then install "arch/i386/boot/zImage" as your standard kernel, run lilo if
> +Then install "arch/x86/boot/zImage" as your standard kernel, run lilo if
>  appropriate, and reboot.
>  
>  
> diff --git a/Documentation/serial/computone.txt b/Documentation/serial/computone.txt
> index c57ea47..60a6f65 100644
> --- a/Documentation/serial/computone.txt
> +++ b/Documentation/serial/computone.txt
> @@ -87,7 +87,7 @@ c) Set address on ISA cards then:
>  	   edit /usr/src/linux/drivers/char/ip2.c  
>             (Optional - may be specified on kernel command line now)
>  d) Run "make zImage" or whatever target you prefer.
> -e) mv /usr/src/linux/arch/i386/boot/zImage to /boot.
> +e) mv /usr/src/linux/arch/x86/boot/zImage to /boot.
>  f) Add new config for this kernel into /etc/lilo.conf, run "lilo"
>  	or copy to a floppy disk and boot from that floppy disk.
>  g) Reboot using this kernel
> diff --git a/Documentation/svga.txt b/Documentation/svga.txt
> index cd66ec8..e5da082 100644
> --- a/Documentation/svga.txt
> +++ b/Documentation/svga.txt
> @@ -150,7 +150,7 @@ end of the display.
>  
>  4. Options
>  ~~~~~~~~~~
> -   Some options can be set in the source text (in arch/i386/boot/video.S).
> +   Some options can be set in the source text (in arch/x86/boot/video.S).
>  All of them are simple #define's -- change them to #undef's when you want to
>  switch them off. Currently supported:
>  
> diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
> index 4c4ce85..a9e6fdd 100644
> --- a/Documentation/zh_CN/magic-number.txt
> +++ b/Documentation/zh_CN/magic-number.txt
> @@ -66,7 +66,7 @@ MKISS_DRIVER_MAGIC    0x04bf      mkiss_channel     drivers/net/mkiss.h
>  RISCOM8_MAGIC         0x0907      riscom_port       drivers/char/riscom8.h
>  SPECIALIX_MAGIC       0x0907      specialix_port    drivers/char/specialix_io8.h
>  HDLC_MAGIC            0x239e      n_hdlc            drivers/char/n_hdlc.c
> -APM_BIOS_MAGIC        0x4101      apm_user          arch/i386/kernel/apm.c
> +APM_BIOS_MAGIC        0x4101      apm_user          arch/x86/kernel/apm.c
>  CYCLADES_MAGIC        0x4359      cyclades_port     include/linux/cyclades.h
>  DB_MAGIC              0x4442      fc_info           drivers/net/iph5526_novram.c
>  DL_MAGIC              0x444d      fc_info           drivers/net/iph5526_novram.c
> -- 
> 1.7.4.1
> 

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* [PATCH] IPVS netns exit causes crash in conntrack
From: Simon Horman @ 2011-06-13  8:47 UTC (permalink / raw)
  To: lvs-devel, netdev, netfilter-devel, netfilter
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	Pablo Neira Ayuso, Hans Schillstrom, Simon Horman
In-Reply-To: <1307954861-21592-1-git-send-email-horms@verge.net.au>

From: Hans Schillstrom <hans.schillstrom@ericsson.com>

Quote from Patric Mc Hardy
"This looks like nfnetlink.c excited and destroyed the nfnl socket, but
ip_vs was still holding a reference to a conntrack. When the conntrack
got destroyed it created a ctnetlink event, causing an oops in
netlink_has_listeners when trying to use the destroyed nfnetlink
socket."

If nf_conntrack_netlink is loaded before ip_vs this is not a problem.

This patch simply avoids calling ip_vs_conn_drop_conntrack()
when netns is dying as suggested by Julian.

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_conn.c |   10 +++++++++-
 net/netfilter/ipvs/ip_vs_core.c |    1 +
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index bf28ac2..782db27 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -776,8 +776,16 @@ static void ip_vs_conn_expire(unsigned long data)
 		if (cp->control)
 			ip_vs_control_del(cp);
 
-		if (cp->flags & IP_VS_CONN_F_NFCT)
+		if (cp->flags & IP_VS_CONN_F_NFCT) {
 			ip_vs_conn_drop_conntrack(cp);
+			/* Do not access conntracks during subsys cleanup
+			 * because nf_conntrack_find_get can not be used after
+			 * conntrack cleanup for the net.
+			 */
+			smp_rmb();
+			if (ipvs->enable)
+				ip_vs_conn_drop_conntrack(cp);
+		}
 
 		ip_vs_pe_put(cp->pe);
 		kfree(cp->pe_data);
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 55af224..24c28d2 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1945,6 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
 {
 	EnterFunction(2);
 	net_ipvs(net)->enable = 0;	/* Disable packet reception */
+	smp_wmb();
 	__ip_vs_sync_cleanup(net);
 	LeaveFunction(2);
 }
-- 
1.7.4.4


^ permalink raw reply related

* [GIT PULL nf-2.6] IPVS
From: Simon Horman @ 2011-06-13  8:47 UTC (permalink / raw)
  To: lvs-devel, netdev, netfilter-devel, netfilter
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	Pablo Neira Ayuso

Hi Pablo,

please consider pulling
git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-2.6.git master
to get the following fix from Hans.

I believe this change should be considered for -stable.

Hans Schillstrom (1):
      IPVS netns exit causes crash in conntrack


^ permalink raw reply

* [PATCH 3/3] IPVS: rename of netns init and cleanup functions.
From: Simon Horman @ 2011-06-13  8:26 UTC (permalink / raw)
  To: lvs-devel, netdev, netfilter-devel, netfilter
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	Pablo Neira Ayuso, Hans Schillstrom, Hans Schillstrom,
	Simon Horman
In-Reply-To: <1307953569-15429-1-git-send-email-horms@verge.net.au>

From: Hans Schillstrom <hans@schillstrom.com>

Make it more clear what the functions does,
on request by Julian.

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 include/net/ip_vs.h              |   26 +++++++++++++-------------
 net/netfilter/ipvs/ip_vs_app.c   |    4 ++--
 net/netfilter/ipvs/ip_vs_conn.c  |    4 ++--
 net/netfilter/ipvs/ip_vs_core.c  |   36 ++++++++++++++++++------------------
 net/netfilter/ipvs/ip_vs_ctl.c   |   20 ++++++++++----------
 net/netfilter/ipvs/ip_vs_est.c   |    4 ++--
 net/netfilter/ipvs/ip_vs_proto.c |    4 ++--
 net/netfilter/ipvs/ip_vs_sync.c  |    4 ++--
 8 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 34a6fa8..1b0985f 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1087,19 +1087,19 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp)
 /*
  * IPVS netns init & cleanup functions
  */
-extern int __ip_vs_estimator_init(struct net *net);
-extern int __ip_vs_control_init(struct net *net);
-extern int __ip_vs_protocol_init(struct net *net);
-extern int __ip_vs_app_init(struct net *net);
-extern int __ip_vs_conn_init(struct net *net);
-extern int __ip_vs_sync_init(struct net *net);
-extern void __ip_vs_conn_cleanup(struct net *net);
-extern void __ip_vs_app_cleanup(struct net *net);
-extern void __ip_vs_protocol_cleanup(struct net *net);
-extern void __ip_vs_control_cleanup(struct net *net);
-extern void __ip_vs_estimator_cleanup(struct net *net);
-extern void __ip_vs_sync_cleanup(struct net *net);
-extern void __ip_vs_service_cleanup(struct net *net);
+extern int ip_vs_estimator_net_init(struct net *net);
+extern int ip_vs_control_net_init(struct net *net);
+extern int ip_vs_protocol_net_init(struct net *net);
+extern int ip_vs_app_net_init(struct net *net);
+extern int ip_vs_conn_net_init(struct net *net);
+extern int ip_vs_sync_net_init(struct net *net);
+extern void ip_vs_conn_net_cleanup(struct net *net);
+extern void ip_vs_app_net_cleanup(struct net *net);
+extern void ip_vs_protocol_net_cleanup(struct net *net);
+extern void ip_vs_control_net_cleanup(struct net *net);
+extern void ip_vs_estimator_net_cleanup(struct net *net);
+extern void ip_vs_sync_net_cleanup(struct net *net);
+extern void ip_vs_service_net_cleanup(struct net *net);
 
 /*
  *      IPVS application functions
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c
index 059af31..e223fb7 100644
--- a/net/netfilter/ipvs/ip_vs_app.c
+++ b/net/netfilter/ipvs/ip_vs_app.c
@@ -576,7 +576,7 @@ static const struct file_operations ip_vs_app_fops = {
 };
 #endif
 
-int __net_init __ip_vs_app_init(struct net *net)
+int __net_init ip_vs_app_net_init(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
@@ -585,7 +585,7 @@ int __net_init __ip_vs_app_init(struct net *net)
 	return 0;
 }
 
-void __net_exit __ip_vs_app_cleanup(struct net *net)
+void __net_exit ip_vs_app_net_cleanup(struct net *net)
 {
 	proc_net_remove(net, "ip_vs_app");
 }
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index bf28ac2..77c61b0 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -1247,7 +1247,7 @@ flush_again:
 /*
  * per netns init and exit
  */
-int __net_init __ip_vs_conn_init(struct net *net)
+int __net_init ip_vs_conn_net_init(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
@@ -1258,7 +1258,7 @@ int __net_init __ip_vs_conn_init(struct net *net)
 	return 0;
 }
 
-void __net_exit __ip_vs_conn_cleanup(struct net *net)
+void __net_exit ip_vs_conn_net_cleanup(struct net *net)
 {
 	/* flush all the connection entries first */
 	ip_vs_conn_flush(net);
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index bfa808f..7c2c726 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1891,22 +1891,22 @@ static int __net_init __ip_vs_init(struct net *net)
 	atomic_inc(&ipvs_netns_cnt);
 	net->ipvs = ipvs;
 
-	if (__ip_vs_estimator_init(net) < 0)
+	if (ip_vs_estimator_net_init(net) < 0)
 		goto estimator_fail;
 
-	if (__ip_vs_control_init(net) < 0)
+	if (ip_vs_control_net_init(net) < 0)
 		goto control_fail;
 
-	if (__ip_vs_protocol_init(net) < 0)
+	if (ip_vs_protocol_net_init(net) < 0)
 		goto protocol_fail;
 
-	if (__ip_vs_app_init(net) < 0)
+	if (ip_vs_app_net_init(net) < 0)
 		goto app_fail;
 
-	if (__ip_vs_conn_init(net) < 0)
+	if (ip_vs_conn_net_init(net) < 0)
 		goto conn_fail;
 
-	if (__ip_vs_sync_init(net) < 0)
+	if (ip_vs_sync_net_init(net) < 0)
 		goto sync_fail;
 
 	printk(KERN_INFO "IPVS: Creating netns size=%zu id=%d\n",
@@ -1917,27 +1917,27 @@ static int __net_init __ip_vs_init(struct net *net)
  */
 
 sync_fail:
-	__ip_vs_conn_cleanup(net);
+	ip_vs_conn_net_cleanup(net);
 conn_fail:
-	__ip_vs_app_cleanup(net);
+	ip_vs_app_net_cleanup(net);
 app_fail:
-	__ip_vs_protocol_cleanup(net);
+	ip_vs_protocol_net_cleanup(net);
 protocol_fail:
-	__ip_vs_control_cleanup(net);
+	ip_vs_control_net_cleanup(net);
 control_fail:
-	__ip_vs_estimator_cleanup(net);
+	ip_vs_estimator_net_cleanup(net);
 estimator_fail:
 	return -ENOMEM;
 }
 
 static void __net_exit __ip_vs_cleanup(struct net *net)
 {
-	__ip_vs_service_cleanup(net);	/* ip_vs_flush() with locks */
-	__ip_vs_conn_cleanup(net);
-	__ip_vs_app_cleanup(net);
-	__ip_vs_protocol_cleanup(net);
-	__ip_vs_control_cleanup(net);
-	__ip_vs_estimator_cleanup(net);
+	ip_vs_service_net_cleanup(net);	/* ip_vs_flush() with locks */
+	ip_vs_conn_net_cleanup(net);
+	ip_vs_app_net_cleanup(net);
+	ip_vs_protocol_net_cleanup(net);
+	ip_vs_control_net_cleanup(net);
+	ip_vs_estimator_net_cleanup(net);
 	IP_VS_DBG(2, "ipvs netns %d released\n", net_ipvs(net)->gen);
 }
 
@@ -1945,7 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
 {
 	EnterFunction(2);
 	net_ipvs(net)->enable = 0;	/* Disable packet reception */
-	__ip_vs_sync_cleanup(net);
+	ip_vs_sync_net_cleanup(net);
 	LeaveFunction(2);
 }
 
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 699c79a..6bedea1 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1483,7 +1483,7 @@ static int ip_vs_flush(struct net *net)
  *	Delete service by {netns} in the service table.
  *	Called by __ip_vs_cleanup()
  */
-void __ip_vs_service_cleanup(struct net *net)
+void ip_vs_service_net_cleanup(struct net *net)
 {
 	EnterFunction(2);
 	/* Check for "full" addressed entries */
@@ -1662,7 +1662,7 @@ proc_do_sync_mode(ctl_table *table, int write,
 /*
  *	IPVS sysctl table (under the /proc/sys/net/ipv4/vs/)
  *	Do not change order or insert new entries without
- *	align with netns init in __ip_vs_control_init()
+ *	align with netns init in ip_vs_control_net_init()
  */
 
 static struct ctl_table vs_vars[] = {
@@ -3595,7 +3595,7 @@ static void ip_vs_genl_unregister(void)
  * per netns intit/exit func.
  */
 #ifdef CONFIG_SYSCTL
-int __net_init __ip_vs_control_init_sysctl(struct net *net)
+int __net_init ip_vs_control_net_init_sysctl(struct net *net)
 {
 	int idx;
 	struct netns_ipvs *ipvs = net_ipvs(net);
@@ -3654,7 +3654,7 @@ int __net_init __ip_vs_control_init_sysctl(struct net *net)
 	return 0;
 }
 
-void __net_init __ip_vs_control_cleanup_sysctl(struct net *net)
+void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
@@ -3665,8 +3665,8 @@ void __net_init __ip_vs_control_cleanup_sysctl(struct net *net)
 
 #else
 
-int __net_init __ip_vs_control_init_sysctl(struct net *net) { return 0; }
-void __net_init __ip_vs_control_cleanup_sysctl(struct net *net) { }
+int __net_init ip_vs_control_net_init_sysctl(struct net *net) { return 0; }
+void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net) { }
 
 #endif
 
@@ -3674,7 +3674,7 @@ static struct notifier_block ip_vs_dst_notifier = {
 	.notifier_call = ip_vs_dst_event,
 };
 
-int __net_init __ip_vs_control_init(struct net *net)
+int __net_init ip_vs_control_net_init(struct net *net)
 {
 	int idx;
 	struct netns_ipvs *ipvs = net_ipvs(net);
@@ -3702,7 +3702,7 @@ int __net_init __ip_vs_control_init(struct net *net)
 	proc_net_fops_create(net, "ip_vs_stats_percpu", 0,
 			     &ip_vs_stats_percpu_fops);
 
-	if (__ip_vs_control_init_sysctl(net))
+	if (ip_vs_control_net_init_sysctl(net))
 		goto err;
 
 	return 0;
@@ -3712,13 +3712,13 @@ err:
 	return -ENOMEM;
 }
 
-void __net_exit __ip_vs_control_cleanup(struct net *net)
+void __net_exit ip_vs_control_net_cleanup(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
 	ip_vs_trash_cleanup(net);
 	ip_vs_stop_estimator(net, &ipvs->tot_stats);
-	__ip_vs_control_cleanup_sysctl(net);
+	ip_vs_control_net_cleanup_sysctl(net);
 	proc_net_remove(net, "ip_vs_stats_percpu");
 	proc_net_remove(net, "ip_vs_stats");
 	proc_net_remove(net, "ip_vs");
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c
index 508cce9..f5d2a01 100644
--- a/net/netfilter/ipvs/ip_vs_est.c
+++ b/net/netfilter/ipvs/ip_vs_est.c
@@ -192,7 +192,7 @@ void ip_vs_read_estimator(struct ip_vs_stats_user *dst,
 	dst->outbps = (e->outbps + 0xF) >> 5;
 }
 
-int __net_init __ip_vs_estimator_init(struct net *net)
+int __net_init ip_vs_estimator_net_init(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
@@ -203,7 +203,7 @@ int __net_init __ip_vs_estimator_init(struct net *net)
 	return 0;
 }
 
-void __net_exit __ip_vs_estimator_cleanup(struct net *net)
+void __net_exit ip_vs_estimator_net_cleanup(struct net *net)
 {
 	del_timer_sync(&net_ipvs(net)->est_timer);
 }
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index eb86028..52d073c 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -316,7 +316,7 @@ ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp,
 /*
  * per network name-space init
  */
-int __net_init __ip_vs_protocol_init(struct net *net)
+int __net_init ip_vs_protocol_net_init(struct net *net)
 {
 #ifdef CONFIG_IP_VS_PROTO_TCP
 	register_ip_vs_proto_netns(net, &ip_vs_protocol_tcp);
@@ -336,7 +336,7 @@ int __net_init __ip_vs_protocol_init(struct net *net)
 	return 0;
 }
 
-void __net_exit __ip_vs_protocol_cleanup(struct net *net)
+void __net_exit ip_vs_protocol_net_cleanup(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 	struct ip_vs_proto_data *pd;
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index e292e5b..58bfabb 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1663,7 +1663,7 @@ int stop_sync_thread(struct net *net, int state)
 /*
  * Initialize data struct for each netns
  */
-int __net_init __ip_vs_sync_init(struct net *net)
+int __net_init ip_vs_sync_net_init(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
@@ -1677,7 +1677,7 @@ int __net_init __ip_vs_sync_init(struct net *net)
 	return 0;
 }
 
-void __ip_vs_sync_cleanup(struct net *net)
+void ip_vs_sync_net_cleanup(struct net *net)
 {
 	int retc;
 
-- 
1.7.4.4


^ permalink raw reply related

* [PATCH 2/3] IPVS remove unused var from migration to netns
From: Simon Horman @ 2011-06-13  8:26 UTC (permalink / raw)
  To: lvs-devel, netdev, netfilter-devel, netfilter
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	Pablo Neira Ayuso, Hans Schillstrom, Simon Horman
In-Reply-To: <1307953569-15429-1-git-send-email-horms@verge.net.au>

From: Hans Schillstrom <hans.schillstrom@ericsson.com>

Remove variable ctl_key from struct netns_ipvs,
it's a leftover from early netns work.

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 include/net/ip_vs.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 481f856..34a6fa8 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -836,8 +836,6 @@ struct netns_ipvs {
 	int			num_services;    /* no of virtual services */
 
 	rwlock_t		rs_lock;         /* real services table */
-	/* semaphore for IPVS sockopts. And, [gs]etsockopt may sleep. */
-	struct lock_class_key	ctl_key;	/* ctl_mutex debuging */
 	/* Trash for destinations */
 	struct list_head	dest_trash;
 	/* Service counters */
-- 
1.7.4.4


^ permalink raw reply related

* [PATCH 1/3] ipvs: support more FTP PASV responses
From: Simon Horman @ 2011-06-13  8:26 UTC (permalink / raw)
  To: lvs-devel, netdev, netfilter-devel, netfilter
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	Pablo Neira Ayuso, Simon Horman
In-Reply-To: <1307953569-15429-1-git-send-email-horms@verge.net.au>

From: Julian Anastasov <ja@ssi.bg>

	Change the parsing of FTP commands and responses to
support skip character. It allows to detect variations in
the 227 PASV response.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_ftp.c |   52 +++++++++++++++++++++++++++++----------
 1 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index af63553..4490a32 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -44,8 +44,8 @@
 #include <net/ip_vs.h>
 
 
-#define SERVER_STRING "227 Entering Passive Mode ("
-#define CLIENT_STRING "PORT "
+#define SERVER_STRING "227 "
+#define CLIENT_STRING "PORT"
 
 
 /*
@@ -79,14 +79,17 @@ ip_vs_ftp_done_conn(struct ip_vs_app *app, struct ip_vs_conn *cp)
 
 /*
  * Get <addr,port> from the string "xxx.xxx.xxx.xxx,ppp,ppp", started
- * with the "pattern" and terminated with the "term" character.
+ * with the "pattern", ignoring before "skip" and terminated with
+ * the "term" character.
  * <addr,port> is in network order.
  */
 static int ip_vs_ftp_get_addrport(char *data, char *data_limit,
-				  const char *pattern, size_t plen, char term,
+				  const char *pattern, size_t plen,
+				  char skip, char term,
 				  __be32 *addr, __be16 *port,
 				  char **start, char **end)
 {
+	char *s, c;
 	unsigned char p[6];
 	int i = 0;
 
@@ -101,19 +104,38 @@ static int ip_vs_ftp_get_addrport(char *data, char *data_limit,
 	if (strnicmp(data, pattern, plen) != 0) {
 		return 0;
 	}
-	*start = data + plen;
+	s = data + plen;
+	if (skip) {
+		int found = 0;
+
+		for (;; s++) {
+			if (s == data_limit)
+				return -1;
+			if (!found) {
+				if (*s == skip)
+					found = 1;
+			} else if (*s != skip) {
+				break;
+			}
+		}
+	}
 
-	for (data = *start; *data != term; data++) {
+	for (data = s; ; data++) {
 		if (data == data_limit)
 			return -1;
+		if (*data == term)
+			break;
 	}
 	*end = data;
 
 	memset(p, 0, sizeof(p));
-	for (data = *start; data != *end; data++) {
-		if (*data >= '0' && *data <= '9') {
-			p[i] = p[i]*10 + *data - '0';
-		} else if (*data == ',' && i < 5) {
+	for (data = s; ; data++) {
+		c = *data;
+		if (c == term)
+			break;
+		if (c >= '0' && c <= '9') {
+			p[i] = p[i]*10 + c - '0';
+		} else if (c == ',' && i < 5) {
 			i++;
 		} else {
 			/* unexpected character */
@@ -124,8 +146,9 @@ static int ip_vs_ftp_get_addrport(char *data, char *data_limit,
 	if (i != 5)
 		return -1;
 
-	*addr = get_unaligned((__be32 *)p);
-	*port = get_unaligned((__be16 *)(p + 4));
+	*start = s;
+	*addr = get_unaligned((__be32 *) p);
+	*port = get_unaligned((__be16 *) (p + 4));
 	return 1;
 }
 
@@ -185,7 +208,8 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
 
 		if (ip_vs_ftp_get_addrport(data, data_limit,
 					   SERVER_STRING,
-					   sizeof(SERVER_STRING)-1, ')',
+					   sizeof(SERVER_STRING)-1,
+					   '(', ')',
 					   &from.ip, &port,
 					   &start, &end) != 1)
 			return 1;
@@ -345,7 +369,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
 	 */
 	if (ip_vs_ftp_get_addrport(data_start, data_limit,
 				   CLIENT_STRING, sizeof(CLIENT_STRING)-1,
-				   '\r', &to.ip, &port,
+				   ' ', '\r', &to.ip, &port,
 				   &start, &end) != 1)
 		return 1;
 
-- 
1.7.4.4


^ permalink raw reply related

* [GIT PULL next-2.6] IPVS
From: Simon Horman @ 2011-06-13  8:26 UTC (permalink / raw)
  To: lvs-devel, netdev, netfilter-devel, netfilter
  Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy,
	Pablo Neira Ayuso

Hi Patrick, Hi Pablo,

please consider pulling
git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next-2.6.git master

It includes two clean-ups by Hans
and an enhancement of the FTP helper by Julian.

I have based the pull request on next-2.6 as
nf-next-2.6 seems to be a little old. Please let me
know if a different base would suit you better.

Hans Schillstrom (2):
      IPVS remove unused var from migration to netns
      IPVS: rename of netns init and cleanup functions.

Julian Anastasov (1):
      ipvs: support more FTP PASV responses

 include/net/ip_vs.h              |   28 +++++++++-----------
 net/netfilter/ipvs/ip_vs_app.c   |    4 +-
 net/netfilter/ipvs/ip_vs_conn.c  |    4 +-
 net/netfilter/ipvs/ip_vs_core.c  |   36 +++++++++++++-------------
 net/netfilter/ipvs/ip_vs_ctl.c   |   20 +++++++-------
 net/netfilter/ipvs/ip_vs_est.c   |    4 +-
 net/netfilter/ipvs/ip_vs_ftp.c   |   52 +++++++++++++++++++++++++++----------
 net/netfilter/ipvs/ip_vs_proto.c |    4 +-
 net/netfilter/ipvs/ip_vs_sync.c  |    4 +-
 9 files changed, 89 insertions(+), 67 deletions(-)

^ permalink raw reply

* Re: [v2 PATCH 0/6] IPVS: init and cleanup.
From: Simon Horman @ 2011-06-13  8:18 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: ja, ebiederm, lvs-devel, netdev, netfilter-devel,
	hans.schillstrom
In-Reply-To: <1304268618-18103-1-git-send-email-hans@schillstrom.com>

Hi Hans,

this series consisted of the following patches:

[v4 PATCH 1/6] IPVS: Change of socket usage to enable name space exit.
[v4 PATCH 2/6] IPVS: labels at pos 0
[v4 PATCH 3/6] IPVS: init and cleanup restructuring.
[v4 PATCH 4/6] IPVS: rename of netns init and cleanup functions.
[v4 PATCH 5/6] IPVS: remove unused init and cleanup functions.
[v4 PATCH 6/6] IPVS: add debug functions

Variants of 1/6 and 3/6 were included in 2.6.39.
I have applied 4/6 to ipvs-next-2.6 [1]
The remaining patches no longer apply cleanly,
could you send fresh versions?

[1] git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next-2.6.git

^ permalink raw reply

* [PATCH] net: sh_eth: tidyup compile warrning
From: Kuninori Morimoto @ 2011-06-13  8:17 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux-Net, shimoda

This patch tidyup below warrning

${LINUX}/drivers/net/sh_eth.c:1773: warning:
'mdp' may be used uninitialized in this function

Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
---
 drivers/net/sh_eth.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 8a72a97..96a629f 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -1770,7 +1770,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
 	int ret, devno = 0;
 	struct resource *res;
 	struct net_device *ndev = NULL;
-	struct sh_eth_private *mdp;
+	struct sh_eth_private *mdp = NULL;
 	struct sh_eth_plat_data *pd;
 
 	/* get base addr */
@@ -1888,7 +1888,7 @@ out_unregister:
 
 out_release:
 	/* net_dev free */
-	if (mdp->tsu_addr)
+	if (mdp && mdp->tsu_addr)
 		iounmap(mdp->tsu_addr);
 	if (ndev)
 		free_netdev(ndev);
-- 
1.7.4.1


^ permalink raw reply related

* Re: [PATCH 1/1] IPVS  netns exit causes crash in conntrack
From: Simon Horman @ 2011-06-13  8:08 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: ja, wensong, lvs-devel, netdev, netfilter-devel, kaber, hans
In-Reply-To: <1307948817-5367-1-git-send-email-hans.schillstrom@ericsson.com>

On Mon, Jun 13, 2011 at 09:06:57AM +0200, Hans Schillstrom wrote:
> Quote from Patric Mc Hardy
> "This looks like nfnetlink.c excited and destroyed the nfnl socket, but
> ip_vs was still holding a reference to a conntrack. When the conntrack
> got destroyed it created a ctnetlink event, causing an oops in
> netlink_has_listeners when trying to use the destroyed nfnetlink
> socket."
> 
> If nf_conntrack_netlink is loaded before ip_vs this is not a problem.
> 
> This patch simply avoids calling ip_vs_conn_drop_conntrack()
> when netns is dying as suggested by Julian.
> 
> Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
> ---
>  net/netfilter/ipvs/ip_vs_conn.c |   10 +++++++++-
>  net/netfilter/ipvs/ip_vs_core.c |    1 +
>  2 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
> index bf28ac2..d7dfccb 100644
> --- a/net/netfilter/ipvs/ip_vs_conn.c
> +++ b/net/netfilter/ipvs/ip_vs_conn.c
> @@ -776,8 +776,16 @@ static void ip_vs_conn_expire(unsigned long data)
>  		if (cp->control)
>  			ip_vs_control_del(cp);
>  
> -		if (cp->flags & IP_VS_CONN_F_NFCT)
> +		if (cp->flags & IP_VS_CONN_F_NFCT) {
>  			ip_vs_conn_drop_conntrack(cp);
> +		/* Do not access conntracks during subsys cleanup because
> +		 * nf_conntrack_find_get can not be used after conntrack
> +		 * cleanup for the net.
> +		 */

Very minor nit, the comment above should be
intended by one more tab.

> +			smp_rmb();
> +			if (ipvs->enable)
> +				ip_vs_conn_drop_conntrack(cp);
> +		}
>  
>  		ip_vs_pe_put(cp->pe);
>  		kfree(cp->pe_data);
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index bfa808f..6f8c934 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -1945,6 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
>  {
>  	EnterFunction(2);
>  	net_ipvs(net)->enable = 0;	/* Disable packet reception */
> +	smp_wmb();
>  	__ip_vs_sync_cleanup(net);
>  	LeaveFunction(2);
>  }
> -- 
> 1.6.0.2
> 

^ permalink raw reply

* Re: [PATCH 1/1] IPVS remove unused var from migration to netns
From: Simon Horman @ 2011-06-13  8:04 UTC (permalink / raw)
  To: Hans Schillstrom; +Cc: ja, wensong, lvs-devel, netdev, netfilter-devel, hans
In-Reply-To: <1307693949-22301-1-git-send-email-hans.schillstrom@ericsson.com>

On Fri, Jun 10, 2011 at 10:19:09AM +0200, Hans Schillstrom wrote:
> Remove variable ctl_key from struct netns_ipvs,
> it's a leftover from early netns work.

Thanks, applied.

^ permalink raw reply

* Question on IP_TOS options
From: Aaron Wu @ 2011-06-13  7:28 UTC (permalink / raw)
  To: netdev
In-Reply-To: <BANLkTikJKzWPU2qb2GkYGej0yE=O3Z+EWw@mail.gmail.com>

Greetings!

Recently I am looking into some network performance test, but have no
idea how the IP_TOS, to be specific the 0xa0 (means
IPTOS_PREC_CRITIC_ECP?) works. Here is the full story:
By starting two iperf sessions at the same time, followed by the third
iperf session right after 10 seconds like below:

1)iperf -c <serverip> -p 5001 -u -t 20 -S 0x00 -b 3.2M -i 2
2)iperf -c <serverip> -p 5002 -u -t 20 -S 0xa0 -b 2.8M -i 2

3)iperf -c <serverip> -p 5003 -u -t 20 -S 0x00 -b 3.2M -i 2

The total network bandwidth is about 6M, so first we fill all the
bandwidth with session 1 and sesson 2, session one is marked as low
priority by -S 0x00 and session 2 as high prioirty with -S 0xa0.
Then 10 seconds later, we start the third low priority session. The
expected result is: bandwidth for session 2 will not drop to 90% of
it's original value before the insertion of session 3, as it's the
high priority session. However, the actual test result varies from
platform to platform, on a ubuntu 10.04 X86 computer is works as
expected, on another embedded platform also running the IPV4,
bandwidth for session 2 decreased greatly due to the insertion of
session 3. We tracked the code and find -S option for iperf eventually
invokes the following code in net/ipv4/ip_sockglue.c:

  case IP_TOS:    /* This sets both TOS and Precedence */
                printk("Setting IP_TOS, val is 0x%x\n", val);
                if (sk->sk_type == SOCK_STREAM) {
                        val &= ~3;
                        val |= inet->tos & 3;
                        printk("Setting IP_TOS, is stream val is 0x%x\n", val);
                }
                if (inet->tos != val) {
                        inet->tos = val;
                        sk->sk_priority = rt_tos2priority(val);
                        sk_dst_reset(sk);
                        printk("Setting IP_TOS, set tos to val is 0x%x\n", val);
                }
                break;
We don't have idea on the 0xa0 (IPTOS_PREC_CRITIC_ECP) for IP_TOS
option and have no idea why on X86 it works well and on the embedded
platform it does not. Appreciate very much if someone could shed some
light.

Best regards,
Aaron

^ permalink raw reply

* RE: [PATCH] be2net: fix netdev_stats_update()
From: Sathya.Perla @ 2011-06-13  7:09 UTC (permalink / raw)
  To: eric.dumazet, davem; +Cc: netdev
In-Reply-To: <1307947748.2872.182.camel@edumazet-laptop>

Thanks Eric. Will do.

Dave, I would prefer to send a separate patch fixing the netdev stats issue after you apply this multiple TXQ patch. Are you OK with that?

> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Sent: Monday, June 13, 2011 12:19 PM
> To: Perla, Sathya; David Miller
> Cc: netdev@vger.kernel.org
> Subject: [PATCH] be2net: fix netdev_stats_update()
> 
> Le lundi 13 juin 2011 à 11:31 +0530, Sathya Perla a écrit :
> > This patch provides support for multiple TX queues.
> >
> > Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> > ---
> >  drivers/net/benet/be.h         |   13 ++-
> >  drivers/net/benet/be_ethtool.c |   50 +++++++---
> >  drivers/net/benet/be_main.c    |  227 ++++++++++++++++++++++--------
> ----------
> >  3 files changed, 171 insertions(+), 119 deletions(-)
> >
<snip>
> >  	memset(dev_stats, 0, sizeof(*dev_stats));
> > @@ -450,8 +451,10 @@ void netdev_stats_update(struct be_adapter
> *adapter)
> >  		}
> >  	}
> >
> > -	dev_stats->tx_packets = tx_stats(adapter)->be_tx_pkts;
> > -	dev_stats->tx_bytes = tx_stats(adapter)->be_tx_bytes;
> > +	for_all_tx_queues(adapter, txo, i) {
> > +		dev_stats->tx_packets += tx_stats(txo)->be_tx_pkts;
> > +		dev_stats->tx_bytes += tx_stats(txo)->be_tx_bytes;
> > +	}
> >
> >  	/* bad pkts received */
> >  	dev_stats->rx_errors = drvs->rx_crc_errors +
> > @@ -554,9 +557,9 @@ static u32 be_calc_rate(u64 bytes, unsigned long
> ticks)
> >  	return rate;
> >  }
> >
> 
> Hi Sathya
> 
> Browsing into this patch made me realize be2net netdev_stats_update()
> is
> wrong.
> 
> It should not reset even temporarly netdev->stats.
> 
> You should have something like the following I cooked for linux-2.6, so
> that you get the idea. Please respin your patch after applying
> following
> fix.
> 
> [PATCH] be2net: fix netdev_stats_update()
> 
> Since this driver uses the default dev_get_stats() [ as it doesnt
> provide ndo_get_stats() nor ndo_get_stats64() method ], resetting
> netdev->stats can lead some SNMP readers catching intermediate values,
> breaking the rule that counters only can increase in time.
> 
> We instead should use temporary accumulators and only set netdev->stats
> values with final results.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
>  drivers/net/benet/be_main.c |   17 +++++++++++------
>  1 files changed, 11 insertions(+), 6 deletions(-)
> diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
> index a485f7f..962509d 100644
> --- a/drivers/net/benet/be_main.c
> +++ b/drivers/net/benet/be_main.c
> @@ -427,28 +427,33 @@ void netdev_stats_update(struct be_adapter
> *adapter)
>  	struct be_drv_stats *drvs = &adapter->drv_stats;
>  	struct net_device_stats *dev_stats = &adapter->netdev->stats;
>  	struct be_rx_obj *rxo;
> +	unsigned long rx_packets = 0, rx_bytes = 0, multicast = 0;
> +	unsigned long rx_dropped = 0;
>  	int i;
> 
> -	memset(dev_stats, 0, sizeof(*dev_stats));
>  	for_all_rx_queues(adapter, rxo, i) {
> -		dev_stats->rx_packets += rx_stats(rxo)->rx_pkts;
> -		dev_stats->rx_bytes += rx_stats(rxo)->rx_bytes;
> -		dev_stats->multicast += rx_stats(rxo)->rx_mcast_pkts;
> +		rx_packets += rx_stats(rxo)->rx_pkts;
> +		rx_bytes += rx_stats(rxo)->rx_bytes;
> +		multicast += rx_stats(rxo)->rx_mcast_pkts;
>  		/*  no space in linux buffers: best possible approximation
> */
>  		if (adapter->generation == BE_GEN3) {
>  			if (!(lancer_chip(adapter))) {
>  				struct be_erx_stats_v1 *erx_stats =
>  					be_erx_stats_from_cmd(adapter);
> -				dev_stats->rx_dropped +=
> +				rx_dropped +=
>  				erx_stats->rx_drops_no_fragments[rxo->q.id];
>  			}
>  		} else {
>  			struct be_erx_stats_v0 *erx_stats =
>  					be_erx_stats_from_cmd(adapter);
> -			dev_stats->rx_dropped +=
> +			rx_dropped +=
>  				erx_stats->rx_drops_no_fragments[rxo->q.id];
>  		}
>  	}
> +	dev_stats->rx_packets = rx_packets;
> +	dev_stats->rx_bytes = rx_bytes;
> +	dev_stats->multicast = multicast;
> +	dev_stats->rx_dropped = rx_dropped;
> 
>  	dev_stats->tx_packets = tx_stats(adapter)->be_tx_pkts;
>  	dev_stats->tx_bytes = tx_stats(adapter)->be_tx_bytes;
> 


^ permalink raw reply

* [PATCH 1/1] IPVS  netns exit causes crash in conntrack
From: Hans Schillstrom @ 2011-06-13  7:06 UTC (permalink / raw)
  To: horms, ja, wensong, lvs-devel, netdev, netfilter-devel
  Cc: kaber, hans, Hans Schillstrom

Quote from Patric Mc Hardy
"This looks like nfnetlink.c excited and destroyed the nfnl socket, but
ip_vs was still holding a reference to a conntrack. When the conntrack
got destroyed it created a ctnetlink event, causing an oops in
netlink_has_listeners when trying to use the destroyed nfnetlink
socket."

If nf_conntrack_netlink is loaded before ip_vs this is not a problem.

This patch simply avoids calling ip_vs_conn_drop_conntrack()
when netns is dying as suggested by Julian.

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
---
 net/netfilter/ipvs/ip_vs_conn.c |   10 +++++++++-
 net/netfilter/ipvs/ip_vs_core.c |    1 +
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index bf28ac2..d7dfccb 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -776,8 +776,16 @@ static void ip_vs_conn_expire(unsigned long data)
 		if (cp->control)
 			ip_vs_control_del(cp);
 
-		if (cp->flags & IP_VS_CONN_F_NFCT)
+		if (cp->flags & IP_VS_CONN_F_NFCT) {
 			ip_vs_conn_drop_conntrack(cp);
+		/* Do not access conntracks during subsys cleanup because
+		 * nf_conntrack_find_get can not be used after conntrack
+		 * cleanup for the net.
+		 */
+			smp_rmb();
+			if (ipvs->enable)
+				ip_vs_conn_drop_conntrack(cp);
+		}
 
 		ip_vs_pe_put(cp->pe);
 		kfree(cp->pe_data);
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index bfa808f..6f8c934 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1945,6 +1945,7 @@ static void __net_exit __ip_vs_dev_cleanup(struct net *net)
 {
 	EnterFunction(2);
 	net_ipvs(net)->enable = 0;	/* Disable packet reception */
+	smp_wmb();
 	__ip_vs_sync_cleanup(net);
 	LeaveFunction(2);
 }
-- 
1.6.0.2


^ permalink raw reply related

* [PATCH] be2net: fix netdev_stats_update()
From: Eric Dumazet @ 2011-06-13  6:49 UTC (permalink / raw)
  To: Sathya Perla, David Miller; +Cc: netdev
In-Reply-To: <f67e2aac-b763-404d-8e45-5c5f52c56d18@exht1.ad.emulex.com>

Le lundi 13 juin 2011 à 11:31 +0530, Sathya Perla a écrit :
> This patch provides support for multiple TX queues.
> 
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> ---
>  drivers/net/benet/be.h         |   13 ++-
>  drivers/net/benet/be_ethtool.c |   50 +++++++---
>  drivers/net/benet/be_main.c    |  227 ++++++++++++++++++++++------------------
>  3 files changed, 171 insertions(+), 119 deletions(-)
> 

>  static void
> diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
> index 9ba197b..af6647a 100644
> --- a/drivers/net/benet/be_main.c
> +++ b/drivers/net/benet/be_main.c
> @@ -427,6 +427,7 @@ void netdev_stats_update(struct be_adapter *adapter)
>  	struct be_drv_stats *drvs = &adapter->drv_stats;
>  	struct net_device_stats *dev_stats = &adapter->netdev->stats;
>  	struct be_rx_obj *rxo;
> +	struct be_tx_obj *txo;
>  	int i;
>  
>  	memset(dev_stats, 0, sizeof(*dev_stats));
> @@ -450,8 +451,10 @@ void netdev_stats_update(struct be_adapter *adapter)
>  		}
>  	}
>  
> -	dev_stats->tx_packets = tx_stats(adapter)->be_tx_pkts;
> -	dev_stats->tx_bytes = tx_stats(adapter)->be_tx_bytes;
> +	for_all_tx_queues(adapter, txo, i) {
> +		dev_stats->tx_packets += tx_stats(txo)->be_tx_pkts;
> +		dev_stats->tx_bytes += tx_stats(txo)->be_tx_bytes;
> +	}
>  
>  	/* bad pkts received */
>  	dev_stats->rx_errors = drvs->rx_crc_errors +
> @@ -554,9 +557,9 @@ static u32 be_calc_rate(u64 bytes, unsigned long ticks)
>  	return rate;
>  }
>  

Hi Sathya

Browsing into this patch made me realize be2net netdev_stats_update() is
wrong.

It should not reset even temporarly netdev->stats.

You should have something like the following I cooked for linux-2.6, so
that you get the idea. Please respin your patch after applying following
fix.

[PATCH] be2net: fix netdev_stats_update()

Since this driver uses the default dev_get_stats() [ as it doesnt
provide ndo_get_stats() nor ndo_get_stats64() method ], resetting
netdev->stats can lead some SNMP readers catching intermediate values,
breaking the rule that counters only can increase in time.

We instead should use temporary accumulators and only set netdev->stats
values with final results.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 drivers/net/benet/be_main.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index a485f7f..962509d 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -427,28 +427,33 @@ void netdev_stats_update(struct be_adapter *adapter)
 	struct be_drv_stats *drvs = &adapter->drv_stats;
 	struct net_device_stats *dev_stats = &adapter->netdev->stats;
 	struct be_rx_obj *rxo;
+	unsigned long rx_packets = 0, rx_bytes = 0, multicast = 0;
+	unsigned long rx_dropped = 0;
 	int i;
 
-	memset(dev_stats, 0, sizeof(*dev_stats));
 	for_all_rx_queues(adapter, rxo, i) {
-		dev_stats->rx_packets += rx_stats(rxo)->rx_pkts;
-		dev_stats->rx_bytes += rx_stats(rxo)->rx_bytes;
-		dev_stats->multicast += rx_stats(rxo)->rx_mcast_pkts;
+		rx_packets += rx_stats(rxo)->rx_pkts;
+		rx_bytes += rx_stats(rxo)->rx_bytes;
+		multicast += rx_stats(rxo)->rx_mcast_pkts;
 		/*  no space in linux buffers: best possible approximation */
 		if (adapter->generation == BE_GEN3) {
 			if (!(lancer_chip(adapter))) {
 				struct be_erx_stats_v1 *erx_stats =
 					be_erx_stats_from_cmd(adapter);
-				dev_stats->rx_dropped +=
+				rx_dropped +=
 				erx_stats->rx_drops_no_fragments[rxo->q.id];
 			}
 		} else {
 			struct be_erx_stats_v0 *erx_stats =
 					be_erx_stats_from_cmd(adapter);
-			dev_stats->rx_dropped +=
+			rx_dropped +=
 				erx_stats->rx_drops_no_fragments[rxo->q.id];
 		}
 	}
+	dev_stats->rx_packets = rx_packets;
+	dev_stats->rx_bytes = rx_bytes;
+	dev_stats->multicast = multicast;
+	dev_stats->rx_dropped = rx_dropped;
 
 	dev_stats->tx_packets = tx_stats(adapter)->be_tx_pkts;
 	dev_stats->tx_bytes = tx_stats(adapter)->be_tx_bytes;



^ permalink raw reply related

* Re: rcu_sched_state detected stall on CPU 0, 3.0-rc2
From: Andy Isaacson @ 2011-06-13  6:04 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: Paul E. McKenney, linux-kernel, netdev, linux-pm
In-Reply-To: <1307932206.22348.677.camel@localhost>

On Sun, Jun 12, 2011 at 10:30:05PM -0400, Ben Hutchings wrote:
> > Of course now that I'm trying to debug, I am seeing many successful
> > suspend-resume cycles.  I don't see any signs of difference between the
> > cases that hung and the cases that are now succeeding.
> > 
> > CCing netdev, because I suspend by running pm-suspend, and in at least
> > one failure, an ethtool running under pm-suspend seemed to be the
> > problem:
> > 
> > root 11558 pts/8    S+ \_ /bin/sh /usr/lib/pm-utils/sleep.d/00powers
> > root 11559 pts/8    S+     \_ /bin/sh /usr/sbin/pm-powersave
> > root 11576 pts/8    S+         \_ /bin/sh /usr/lib/pm-utils/power.d/
> > root 11577 pts/8    D+             \_ ethtool -s eth0 wol g
> [...]
> 
> Wake-on-LAN configuration is entirely handled by the relevant driver;
> the ethtool core just copies the parameters in and out.  It looks like
> there is some sort of deadlock or missing unlock in the driver.  So my
> question would be which driver is running eth0?

I attached the whole gzipped dmesg, but anyways, it's e1000e:

[    1.168733] e1000e: Intel(R) PRO/1000 Network Driver - 1.3.10-k2
[    1.168879] e1000e: Copyright(c) 1999 - 2011 Intel Corporation.
[    1.169346] e1000e 0000:00:19.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[    1.169494] e1000e 0000:00:19.0: setting latency timer to 64
[    1.169603] usbcore: registered new interface driver usbfs
[    1.169675] e1000e 0000:00:19.0: irq 40 for MSI/MSI-X
[    1.169794] usbcore: registered new interface driver hub
[    1.181231] usbcore: registered new device driver usb
[    1.181879] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.190984] thermal LNXTHERM:00: registered as thermal_zone0
[    1.191129] ACPI: Thermal Zone [THM0] (48 C)
[    1.205191] SCSI subsystem initialized
[    1.207349] libata version 3.00 loaded.
[    1.352926] e1000e 0000:00:19.0: eth0: (PCI Express:2.5GT/s:Width x1) 00:26:2d:f3:14:0f
[    1.353243] e1000e 0000:00:19.0: eth0: Intel(R) PRO/1000 Network Connection
[    1.353473] e1000e 0000:00:19.0: eth0: MAC: 9, PHY: 10, PBA No: A002FF-0FF
[snip]
[ 1221.836727] PM: Entering mem sleep
[ 1221.836855] Suspending console(s) (use no_console_suspend to debug)
[ 1222.018735] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1222.063181] sd 0:0:0:0: [sda] Stopping disk
[ 1222.272665] ehci_hcd 0000:00:1d.0: PCI INT D disabled
[ 1222.272668] ehci_hcd 0000:00:1a.0: PCI INT D disabled
[ 1222.304428] i915 0000:00:02.0: power state changed by ACPI to D3
[ 1222.378384] e1000e 0000:00:19.0: PCI INT A disabled
[ 1222.378393] e1000e 0000:00:19.0: PME# enabled
[ 1222.378400] e1000e 0000:00:19.0: wake-up capability enabled by ACPI

ethtool does show up in the failure dmesg:

[56520.872462] INFO: task ethtool:18105 blocked for more than 120 seconds.
[56520.872465] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[56520.872468] ethtool         D 7fffffffffffffff     0 18105  18104 0x00000000
[56520.872473]  ffff880105d99ad8 0000000000000082 ffffffff810d0c05 ffff880137d15730
[56520.872479]  ffff880130fd3780 ffff880105d99fd8 ffff880105d99fd8 0000000000012500
[56520.872485]  ffff8801333794d0 ffff880130fd3780 ffff880105d99fd8 ffff880137ffbe00
[56520.872490] Call Trace:
[56520.872499]  [<ffffffff810d0c05>] ? zone_statistics+0x7c/0x83
[56520.872504]  [<ffffffff8131c13e>] schedule_timeout+0x34/0xde
[56520.872509]  [<ffffffff8131bef8>] wait_for_common+0xa3/0x11a
[56520.872514]  [<ffffffff8103c393>] ? try_to_wake_up+0x1ac/0x1ac
[56520.872519]  [<ffffffff8131c023>] wait_for_completion+0x1d/0x1f
[56520.872524]  [<ffffffff8109557d>] synchronize_sched+0x5a/0x5c
[56520.872528]  [<ffffffff8105beac>] ? find_ge_pid+0x41/0x41
[56520.872536]  [<ffffffff8122f67a>] wakeup_source_remove+0x60/0x64
[56520.872541]  [<ffffffff8122f785>] wakeup_source_unregister+0x13/0x1f
[56520.872546]  [<ffffffff8122f7f1>] device_wakeup_disable+0x60/0x6b
[56520.872550]  [<ffffffff8122f942>] device_set_wakeup_enable+0x2d/0x2f
[56520.872573]  [<ffffffffa003a56a>] e1000_set_wol+0x9b/0x9f [e1000e]
[56520.872580]  [<ffffffff81261c8e>] dev_ethtool+0x338/0x1c06
[56520.872585]  [<ffffffff810d4be4>] ? __do_fault+0x313/0x34a
[56520.872591]  [<ffffffff810329ef>] ? should_resched+0xe/0x2d
[56520.872595]  [<ffffffff8131be41>] ? _cond_resched+0xe/0x22
[56520.872600]  [<ffffffff8126019d>] dev_ioctl+0x503/0x688
[56520.872605]  [<ffffffff81319009>] ? __slab_alloc+0x330/0x342
[56520.872610]  [<ffffffff8124ac72>] ? sock_alloc_inode+0x24/0xb7
[56520.872615]  [<ffffffff8124b0c2>] sock_do_ioctl+0x3b/0x46
[56520.872619]  [<ffffffff8124b4f1>] sock_ioctl+0x20d/0x21b
[56520.872625]  [<ffffffff810feb02>] ? get_empty_filp+0x93/0x11b
[56520.872630]  [<ffffffff8110b218>] do_vfs_ioctl+0x460/0x4a1
[56520.872635]  [<ffffffff8124ca82>] ? sock_alloc_file+0xb3/0x114
[56520.872640]  [<ffffffff8131d13e>] ? _raw_spin_lock+0xe/0x10
[56520.872646]  [<ffffffff810fc23d>] ? fd_install+0x31/0x5d
[56520.872650]  [<ffffffff8110b2a0>] sys_ioctl+0x47/0x6b
[56520.872655]  [<ffffffff8131ddc2>] system_call_fastpath+0x16/0x1b

-andy

^ permalink raw reply

* [PATCH net-next-2.6] be2net: support multiple TX queues
From: Sathya Perla @ 2011-06-13  6:01 UTC (permalink / raw)
  To: netdev; +Cc: Sathya Perla

This patch provides support for multiple TX queues.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
 drivers/net/benet/be.h         |   13 ++-
 drivers/net/benet/be_ethtool.c |   50 +++++++---
 drivers/net/benet/be_main.c    |  227 ++++++++++++++++++++++------------------
 3 files changed, 171 insertions(+), 119 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index a7db870..a36f5a6 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -87,6 +87,7 @@ static inline char *nic_name(struct pci_dev *pdev)
 
 #define MAX_RSS_QS		4	/* BE limit is 4 queues/port */
 #define MAX_RX_QS		(MAX_RSS_QS + 1) /* RSS qs + 1 def Rx */
+#define MAX_TX_QS		8
 #define BE_MAX_MSIX_VECTORS	(MAX_RX_QS + 1)/* RX + TX */
 #define BE_NAPI_WEIGHT		64
 #define MAX_RX_POST 		BE_NAPI_WEIGHT /* Frags posted at a time */
@@ -170,7 +171,6 @@ struct be_tx_stats {
 	u32 be_tx_reqs;		/* number of TX requests initiated */
 	u32 be_tx_stops;	/* number of times TX Q was stopped */
 	u32 be_tx_wrbs;		/* number of tx WRBs used */
-	u32 be_tx_events;	/* number of tx completion events  */
 	u32 be_tx_compl;	/* number of tx completion entries processed */
 	ulong be_tx_jiffies;
 	u64 be_tx_bytes;
@@ -184,6 +184,7 @@ struct be_tx_obj {
 	struct be_queue_info cq;
 	/* Remember the skbs that were transmitted */
 	struct sk_buff *sent_skb_list[TX_Q_LEN];
+	struct be_tx_stats stats;
 };
 
 /* Struct to remember the pages posted for rx frags */
@@ -319,8 +320,8 @@ struct be_adapter {
 
 	/* TX Rings */
 	struct be_eq_obj tx_eq;
-	struct be_tx_obj tx_obj;
-	struct be_tx_stats tx_stats;
+	struct be_tx_obj tx_obj[MAX_TX_QS];
+	u8 num_tx_qs;
 
 	u32 cache_line_break[8];
 
@@ -391,7 +392,7 @@ struct be_adapter {
 extern const struct ethtool_ops be_ethtool_ops;
 
 #define msix_enabled(adapter)		(adapter->num_msix_vec > 0)
-#define tx_stats(adapter)		(&adapter->tx_stats)
+#define tx_stats(txo)			(&txo->stats)
 #define rx_stats(rxo)			(&rxo->stats)
 
 #define BE_SET_NETDEV_OPS(netdev, ops)	(netdev->netdev_ops = ops)
@@ -405,6 +406,10 @@ extern const struct ethtool_ops be_ethtool_ops;
 	for (i = 0, rxo = &adapter->rx_obj[i+1]; i < (adapter->num_rx_qs - 1);\
 		i++, rxo++)
 
+#define for_all_tx_queues(adapter, txo, i)				\
+	for (i = 0, txo = &adapter->tx_obj[i]; i < adapter->num_tx_qs;	\
+		i++, txo++)
+
 #define PAGE_SHIFT_4K		12
 #define PAGE_SIZE_4K		(1 << PAGE_SHIFT_4K)
 
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index facfe3c..84e03a7 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -52,12 +52,7 @@ static const struct be_ethtool_stat et_stats[] = {
 	{NETSTAT_INFO(tx_errors)},
 	{NETSTAT_INFO(rx_dropped)},
 	{NETSTAT_INFO(tx_dropped)},
-	{DRVSTAT_TX_INFO(be_tx_rate)},
-	{DRVSTAT_TX_INFO(be_tx_reqs)},
-	{DRVSTAT_TX_INFO(be_tx_wrbs)},
-	{DRVSTAT_TX_INFO(be_tx_stops)},
-	{DRVSTAT_TX_INFO(be_tx_events)},
-	{DRVSTAT_TX_INFO(be_tx_compl)},
+	{DRVSTAT_INFO(be_tx_events)},
 	{DRVSTAT_INFO(rx_crc_errors)},
 	{DRVSTAT_INFO(rx_alignment_symbol_errors)},
 	{DRVSTAT_INFO(rx_pause_frames)},
@@ -111,6 +106,16 @@ static const struct be_ethtool_stat et_rx_stats[] = {
 };
 #define ETHTOOL_RXSTATS_NUM (ARRAY_SIZE(et_rx_stats))
 
+/* Stats related to multi TX queues */
+static const struct be_ethtool_stat et_tx_stats[] = {
+	{DRVSTAT_TX_INFO(be_tx_rate)},
+	{DRVSTAT_TX_INFO(be_tx_reqs)},
+	{DRVSTAT_TX_INFO(be_tx_wrbs)},
+	{DRVSTAT_TX_INFO(be_tx_stops)},
+	{DRVSTAT_TX_INFO(be_tx_compl)}
+};
+#define ETHTOOL_TXSTATS_NUM (ARRAY_SIZE(et_tx_stats))
+
 static const char et_self_tests[][ETH_GSTRING_LEN] = {
 	"MAC Loopback test",
 	"PHY Loopback test",
@@ -253,17 +258,15 @@ be_get_ethtool_stats(struct net_device *netdev,
 {
 	struct be_adapter *adapter = netdev_priv(netdev);
 	struct be_rx_obj *rxo;
+	struct be_tx_obj *txo;
 	void *p = NULL;
-	int i, j;
+	int i, j, base;
 
 	for (i = 0; i < ETHTOOL_STATS_NUM; i++) {
 		switch (et_stats[i].type) {
 		case NETSTAT:
 			p = &netdev->stats;
 			break;
-		case DRVSTAT_TX:
-			p = &adapter->tx_stats;
-			break;
 		case DRVSTAT:
 			p = &adapter->drv_stats;
 			break;
@@ -274,6 +277,7 @@ be_get_ethtool_stats(struct net_device *netdev,
 				*(u64 *)p: *(u32 *)p;
 	}
 
+	base = ETHTOOL_STATS_NUM;
 	for_all_rx_queues(adapter, rxo, j) {
 		for (i = 0; i < ETHTOOL_RXSTATS_NUM; i++) {
 			switch (et_rx_stats[i].type) {
@@ -285,11 +289,21 @@ be_get_ethtool_stats(struct net_device *netdev,
 								rxo->q.id;
 				break;
 			}
-			data[ETHTOOL_STATS_NUM + j * ETHTOOL_RXSTATS_NUM + i] =
+			data[base + j * ETHTOOL_RXSTATS_NUM + i] =
 				(et_rx_stats[i].size == sizeof(u64)) ?
 					*(u64 *)p: *(u32 *)p;
 		}
 	}
+
+	base = ETHTOOL_STATS_NUM + adapter->num_rx_qs * ETHTOOL_RXSTATS_NUM;
+	for_all_tx_queues(adapter, txo, j) {
+		for (i = 0; i < ETHTOOL_TXSTATS_NUM; i++) {
+			p = (u8 *)&txo->stats + et_tx_stats[i].offset;
+			data[base + j * ETHTOOL_TXSTATS_NUM + i] =
+				(et_tx_stats[i].size == sizeof(u64)) ?
+					*(u64 *)p: *(u32 *)p;
+		}
+	}
 }
 
 static void
@@ -312,6 +326,13 @@ be_get_stat_strings(struct net_device *netdev, uint32_t stringset,
 				data += ETH_GSTRING_LEN;
 			}
 		}
+		for (i = 0; i < adapter->num_tx_qs; i++) {
+			for (j = 0; j < ETHTOOL_TXSTATS_NUM; j++) {
+				sprintf(data, "txq%d: %s", i,
+					et_tx_stats[j].desc);
+				data += ETH_GSTRING_LEN;
+			}
+		}
 		break;
 	case ETH_SS_TEST:
 		for (i = 0; i < ETHTOOL_TESTS_NUM; i++) {
@@ -331,7 +352,8 @@ static int be_get_sset_count(struct net_device *netdev, int stringset)
 		return ETHTOOL_TESTS_NUM;
 	case ETH_SS_STATS:
 		return ETHTOOL_STATS_NUM +
-			adapter->num_rx_qs * ETHTOOL_RXSTATS_NUM;
+			adapter->num_rx_qs * ETHTOOL_RXSTATS_NUM +
+			adapter->num_tx_qs * ETHTOOL_TXSTATS_NUM;
 	default:
 		return -EINVAL;
 	}
@@ -457,10 +479,10 @@ be_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
 	struct be_adapter *adapter = netdev_priv(netdev);
 
 	ring->rx_max_pending = adapter->rx_obj[0].q.len;
-	ring->tx_max_pending = adapter->tx_obj.q.len;
+	ring->tx_max_pending = adapter->tx_obj[0].q.len;
 
 	ring->rx_pending = atomic_read(&adapter->rx_obj[0].q.used);
-	ring->tx_pending = atomic_read(&adapter->tx_obj.q.used);
+	ring->tx_pending = atomic_read(&adapter->tx_obj[0].q.used);
 }
 
 static void
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 9ba197b..af6647a 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -427,6 +427,7 @@ void netdev_stats_update(struct be_adapter *adapter)
 	struct be_drv_stats *drvs = &adapter->drv_stats;
 	struct net_device_stats *dev_stats = &adapter->netdev->stats;
 	struct be_rx_obj *rxo;
+	struct be_tx_obj *txo;
 	int i;
 
 	memset(dev_stats, 0, sizeof(*dev_stats));
@@ -450,8 +451,10 @@ void netdev_stats_update(struct be_adapter *adapter)
 		}
 	}
 
-	dev_stats->tx_packets = tx_stats(adapter)->be_tx_pkts;
-	dev_stats->tx_bytes = tx_stats(adapter)->be_tx_bytes;
+	for_all_tx_queues(adapter, txo, i) {
+		dev_stats->tx_packets += tx_stats(txo)->be_tx_pkts;
+		dev_stats->tx_bytes += tx_stats(txo)->be_tx_bytes;
+	}
 
 	/* bad pkts received */
 	dev_stats->rx_errors = drvs->rx_crc_errors +
@@ -554,9 +557,9 @@ static u32 be_calc_rate(u64 bytes, unsigned long ticks)
 	return rate;
 }
 
-static void be_tx_rate_update(struct be_adapter *adapter)
+static void be_tx_rate_update(struct be_tx_obj *txo)
 {
-	struct be_tx_stats *stats = tx_stats(adapter);
+	struct be_tx_stats *stats = tx_stats(txo);
 	ulong now = jiffies;
 
 	/* Wrapped around? */
@@ -575,10 +578,11 @@ static void be_tx_rate_update(struct be_adapter *adapter)
 	}
 }
 
-static void be_tx_stats_update(struct be_adapter *adapter,
+static void be_tx_stats_update(struct be_tx_obj *txo,
 			u32 wrb_cnt, u32 copied, u32 gso_segs, bool stopped)
 {
-	struct be_tx_stats *stats = tx_stats(adapter);
+	struct be_tx_stats *stats = tx_stats(txo);
+
 	stats->be_tx_reqs++;
 	stats->be_tx_wrbs += wrb_cnt;
 	stats->be_tx_bytes += copied;
@@ -682,14 +686,13 @@ static void unmap_tx_frag(struct device *dev, struct be_eth_wrb *wrb,
 	}
 }
 
-static int make_tx_wrbs(struct be_adapter *adapter,
+static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq,
 		struct sk_buff *skb, u32 wrb_cnt, bool dummy_wrb)
 {
 	dma_addr_t busaddr;
 	int i, copied = 0;
 	struct device *dev = &adapter->pdev->dev;
 	struct sk_buff *first_skb = skb;
-	struct be_queue_info *txq = &adapter->tx_obj.q;
 	struct be_eth_wrb *wrb;
 	struct be_eth_hdr_wrb *hdr;
 	bool map_single = false;
@@ -753,19 +756,19 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
 			struct net_device *netdev)
 {
 	struct be_adapter *adapter = netdev_priv(netdev);
-	struct be_tx_obj *tx_obj = &adapter->tx_obj;
-	struct be_queue_info *txq = &tx_obj->q;
+	struct be_tx_obj *txo = &adapter->tx_obj[skb_get_queue_mapping(skb)];
+	struct be_queue_info *txq = &txo->q;
 	u32 wrb_cnt = 0, copied = 0;
 	u32 start = txq->head;
 	bool dummy_wrb, stopped = false;
 
 	wrb_cnt = wrb_cnt_for_skb(adapter, skb, &dummy_wrb);
 
-	copied = make_tx_wrbs(adapter, skb, wrb_cnt, dummy_wrb);
+	copied = make_tx_wrbs(adapter, txq, skb, wrb_cnt, dummy_wrb);
 	if (copied) {
 		/* record the sent skb in the sent_skb table */
-		BUG_ON(tx_obj->sent_skb_list[start]);
-		tx_obj->sent_skb_list[start] = skb;
+		BUG_ON(txo->sent_skb_list[start]);
+		txo->sent_skb_list[start] = skb;
 
 		/* Ensure txq has space for the next skb; Else stop the queue
 		 * *BEFORE* ringing the tx doorbell, so that we serialze the
@@ -774,13 +777,13 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
 		atomic_add(wrb_cnt, &txq->used);
 		if ((BE_MAX_TX_FRAG_COUNT + atomic_read(&txq->used)) >=
 								txq->len) {
-			netif_stop_queue(netdev);
+			netif_stop_subqueue(netdev, skb_get_queue_mapping(skb));
 			stopped = true;
 		}
 
 		be_txq_notify(adapter, txq->id, wrb_cnt);
 
-		be_tx_stats_update(adapter, wrb_cnt, copied,
+		be_tx_stats_update(txo, wrb_cnt, copied,
 				skb_shinfo(skb)->gso_segs, stopped);
 	} else {
 		txq->head = start;
@@ -1459,11 +1462,12 @@ static struct be_eth_tx_compl *be_tx_compl_get(struct be_queue_info *tx_cq)
 	return txcp;
 }
 
-static u16 be_tx_compl_process(struct be_adapter *adapter, u16 last_index)
+static u16 be_tx_compl_process(struct be_adapter *adapter,
+		struct be_tx_obj *txo, u16 last_index)
 {
-	struct be_queue_info *txq = &adapter->tx_obj.q;
+	struct be_queue_info *txq = &txo->q;
 	struct be_eth_wrb *wrb;
-	struct sk_buff **sent_skbs = adapter->tx_obj.sent_skb_list;
+	struct sk_buff **sent_skbs = txo->sent_skb_list;
 	struct sk_buff *sent_skb;
 	u16 cur_index, num_wrbs = 1; /* account for hdr wrb */
 	bool unmap_skb_hdr = true;
@@ -1504,7 +1508,8 @@ static inline struct be_eq_entry *event_get(struct be_eq_obj *eq_obj)
 }
 
 static int event_handle(struct be_adapter *adapter,
-			struct be_eq_obj *eq_obj)
+			struct be_eq_obj *eq_obj,
+			bool rearm)
 {
 	struct be_eq_entry *eqe;
 	u16 num = 0;
@@ -1517,7 +1522,10 @@ static int event_handle(struct be_adapter *adapter,
 	/* Deal with any spurious interrupts that come
 	 * without events
 	 */
-	be_eq_notify(adapter, eq_obj->q.id, true, true, num);
+	if (!num)
+		rearm = true;
+
+	be_eq_notify(adapter, eq_obj->q.id, rearm, true, num);
 	if (num)
 		napi_schedule(&eq_obj->napi);
 
@@ -1565,13 +1573,14 @@ static void be_rx_q_clean(struct be_adapter *adapter, struct be_rx_obj *rxo)
 	BUG_ON(atomic_read(&rxq->used));
 }
 
-static void be_tx_compl_clean(struct be_adapter *adapter)
+static void be_tx_compl_clean(struct be_adapter *adapter,
+				struct be_tx_obj *txo)
 {
-	struct be_queue_info *tx_cq = &adapter->tx_obj.cq;
-	struct be_queue_info *txq = &adapter->tx_obj.q;
+	struct be_queue_info *tx_cq = &txo->cq;
+	struct be_queue_info *txq = &txo->q;
 	struct be_eth_tx_compl *txcp;
 	u16 end_idx, cmpl = 0, timeo = 0, num_wrbs = 0;
-	struct sk_buff **sent_skbs = adapter->tx_obj.sent_skb_list;
+	struct sk_buff **sent_skbs = txo->sent_skb_list;
 	struct sk_buff *sent_skb;
 	bool dummy_wrb;
 
@@ -1580,7 +1589,7 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
 		while ((txcp = be_tx_compl_get(tx_cq))) {
 			end_idx = AMAP_GET_BITS(struct amap_eth_tx_compl,
 					wrb_index, txcp);
-			num_wrbs += be_tx_compl_process(adapter, end_idx);
+			num_wrbs += be_tx_compl_process(adapter, txo, end_idx);
 			cmpl++;
 		}
 		if (cmpl) {
@@ -1607,7 +1616,7 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
 		index_adv(&end_idx,
 			wrb_cnt_for_skb(adapter, sent_skb, &dummy_wrb) - 1,
 			txq->len);
-		num_wrbs = be_tx_compl_process(adapter, end_idx);
+		num_wrbs = be_tx_compl_process(adapter, txo, end_idx);
 		atomic_sub(num_wrbs, &txq->used);
 	}
 }
@@ -1666,16 +1675,20 @@ err:
 static void be_tx_queues_destroy(struct be_adapter *adapter)
 {
 	struct be_queue_info *q;
+	struct be_tx_obj *txo;
+	u8 i;
 
-	q = &adapter->tx_obj.q;
-	if (q->created)
-		be_cmd_q_destroy(adapter, q, QTYPE_TXQ);
-	be_queue_free(adapter, q);
+	for_all_tx_queues(adapter, txo, i) {
+		q = &txo->q;
+		if (q->created)
+			be_cmd_q_destroy(adapter, q, QTYPE_TXQ);
+		be_queue_free(adapter, q);
 
-	q = &adapter->tx_obj.cq;
-	if (q->created)
-		be_cmd_q_destroy(adapter, q, QTYPE_CQ);
-	be_queue_free(adapter, q);
+		q = &txo->cq;
+		if (q->created)
+			be_cmd_q_destroy(adapter, q, QTYPE_CQ);
+		be_queue_free(adapter, q);
+	}
 
 	/* Clear any residual events */
 	be_eq_clean(adapter, &adapter->tx_eq);
@@ -1686,56 +1699,48 @@ static void be_tx_queues_destroy(struct be_adapter *adapter)
 	be_queue_free(adapter, q);
 }
 
+/* One TX event queue is shared by all TX compl qs */
 static int be_tx_queues_create(struct be_adapter *adapter)
 {
 	struct be_queue_info *eq, *q, *cq;
+	struct be_tx_obj *txo;
+	u8 i;
 
 	adapter->tx_eq.max_eqd = 0;
 	adapter->tx_eq.min_eqd = 0;
 	adapter->tx_eq.cur_eqd = 96;
 	adapter->tx_eq.enable_aic = false;
-	/* Alloc Tx Event queue */
+
 	eq = &adapter->tx_eq.q;
-	if (be_queue_alloc(adapter, eq, EVNT_Q_LEN, sizeof(struct be_eq_entry)))
+	if (be_queue_alloc(adapter, eq, EVNT_Q_LEN,
+		sizeof(struct be_eq_entry)))
 		return -1;
 
-	/* Ask BE to create Tx Event queue */
 	if (be_cmd_eq_create(adapter, eq, adapter->tx_eq.cur_eqd))
-		goto tx_eq_free;
-
+		goto err;
 	adapter->tx_eq.eq_idx = adapter->eq_next_idx++;
 
-
-	/* Alloc TX eth compl queue */
-	cq = &adapter->tx_obj.cq;
-	if (be_queue_alloc(adapter, cq, TX_CQ_LEN,
+	for_all_tx_queues(adapter, txo, i) {
+		cq = &txo->cq;
+		if (be_queue_alloc(adapter, cq, TX_CQ_LEN,
 			sizeof(struct be_eth_tx_compl)))
-		goto tx_eq_destroy;
+			goto err;
 
-	/* Ask BE to create Tx eth compl queue */
-	if (be_cmd_cq_create(adapter, cq, eq, false, false, 3))
-		goto tx_cq_free;
+		if (be_cmd_cq_create(adapter, cq, eq, false, false, 3))
+			goto err;
 
-	/* Alloc TX eth queue */
-	q = &adapter->tx_obj.q;
-	if (be_queue_alloc(adapter, q, TX_Q_LEN, sizeof(struct be_eth_wrb)))
-		goto tx_cq_destroy;
+		q = &txo->q;
+		if (be_queue_alloc(adapter, q, TX_Q_LEN,
+			sizeof(struct be_eth_wrb)))
+			goto err;
 
-	/* Ask BE to create Tx eth queue */
-	if (be_cmd_txq_create(adapter, q, cq))
-		goto tx_q_free;
+		if (be_cmd_txq_create(adapter, q, cq))
+			goto err;
+	}
 	return 0;
 
-tx_q_free:
-	be_queue_free(adapter, q);
-tx_cq_destroy:
-	be_cmd_q_destroy(adapter, cq, QTYPE_CQ);
-tx_cq_free:
-	be_queue_free(adapter, cq);
-tx_eq_destroy:
-	be_cmd_q_destroy(adapter, eq, QTYPE_EQ);
-tx_eq_free:
-	be_queue_free(adapter, eq);
+err:
+	be_tx_queues_destroy(adapter);
 	return -1;
 }
 
@@ -1876,10 +1881,10 @@ static irqreturn_t be_intx(int irq, void *dev)
 
 	if (lancer_chip(adapter)) {
 		if (event_peek(&adapter->tx_eq))
-			tx = event_handle(adapter, &adapter->tx_eq);
+			tx = event_handle(adapter, &adapter->tx_eq, false);
 		for_all_rx_queues(adapter, rxo, i) {
 			if (event_peek(&rxo->rx_eq))
-				rx |= event_handle(adapter, &rxo->rx_eq);
+				rx |= event_handle(adapter, &rxo->rx_eq, true);
 		}
 
 		if (!(tx || rx))
@@ -1892,11 +1897,11 @@ static irqreturn_t be_intx(int irq, void *dev)
 			return IRQ_NONE;
 
 		if ((1 << adapter->tx_eq.eq_idx & isr))
-			event_handle(adapter, &adapter->tx_eq);
+			event_handle(adapter, &adapter->tx_eq, false);
 
 		for_all_rx_queues(adapter, rxo, i) {
 			if ((1 << rxo->rx_eq.eq_idx & isr))
-				event_handle(adapter, &rxo->rx_eq);
+				event_handle(adapter, &rxo->rx_eq, true);
 		}
 	}
 
@@ -1908,7 +1913,7 @@ static irqreturn_t be_msix_rx(int irq, void *dev)
 	struct be_rx_obj *rxo = dev;
 	struct be_adapter *adapter = rxo->adapter;
 
-	event_handle(adapter, &rxo->rx_eq);
+	event_handle(adapter, &rxo->rx_eq, true);
 
 	return IRQ_HANDLED;
 }
@@ -1917,7 +1922,7 @@ static irqreturn_t be_msix_tx_mcc(int irq, void *dev)
 {
 	struct be_adapter *adapter = dev;
 
-	event_handle(adapter, &adapter->tx_eq);
+	event_handle(adapter, &adapter->tx_eq, false);
 
 	return IRQ_HANDLED;
 }
@@ -1978,45 +1983,48 @@ static int be_poll_tx_mcc(struct napi_struct *napi, int budget)
 	struct be_eq_obj *tx_eq = container_of(napi, struct be_eq_obj, napi);
 	struct be_adapter *adapter =
 		container_of(tx_eq, struct be_adapter, tx_eq);
-	struct be_queue_info *txq = &adapter->tx_obj.q;
-	struct be_queue_info *tx_cq = &adapter->tx_obj.cq;
+	struct be_tx_obj *txo;
 	struct be_eth_tx_compl *txcp;
-	int tx_compl = 0, mcc_compl, status = 0;
-	u16 end_idx, num_wrbs = 0;
+	int tx_compl, mcc_compl, status = 0;
+	u8 i;
+	u16 num_wrbs;
+
+	for_all_tx_queues(adapter, txo, i) {
+		tx_compl = 0;
+		num_wrbs = 0;
+		while ((txcp = be_tx_compl_get(&txo->cq))) {
+			num_wrbs += be_tx_compl_process(adapter, txo,
+				AMAP_GET_BITS(struct amap_eth_tx_compl,
+					wrb_index, txcp));
+			tx_compl++;
+		}
+		if (tx_compl) {
+			be_cq_notify(adapter, txo->cq.id, true, tx_compl);
+
+			atomic_sub(num_wrbs, &txo->q.used);
 
-	while ((txcp = be_tx_compl_get(tx_cq))) {
-		end_idx = AMAP_GET_BITS(struct amap_eth_tx_compl,
-				wrb_index, txcp);
-		num_wrbs += be_tx_compl_process(adapter, end_idx);
-		tx_compl++;
+			/* As Tx wrbs have been freed up, wake up netdev queue
+			 * if it was stopped due to lack of tx wrbs.  */
+			if (__netif_subqueue_stopped(adapter->netdev, i) &&
+				atomic_read(&txo->q.used) < txo->q.len / 2) {
+				netif_wake_subqueue(adapter->netdev, i);
+			}
+
+			adapter->drv_stats.be_tx_events++;
+			txo->stats.be_tx_compl += tx_compl;
+		}
 	}
 
 	mcc_compl = be_process_mcc(adapter, &status);
 
-	napi_complete(napi);
-
 	if (mcc_compl) {
 		struct be_mcc_obj *mcc_obj = &adapter->mcc_obj;
 		be_cq_notify(adapter, mcc_obj->cq.id, true, mcc_compl);
 	}
 
-	if (tx_compl) {
-		be_cq_notify(adapter, adapter->tx_obj.cq.id, true, tx_compl);
-
-		atomic_sub(num_wrbs, &txq->used);
-
-		/* As Tx wrbs have been freed up, wake up netdev queue if
-		 * it was stopped due to lack of tx wrbs.
-		 */
-		if (netif_queue_stopped(adapter->netdev) &&
-			atomic_read(&txq->used) < txq->len / 2) {
-			netif_wake_queue(adapter->netdev);
-		}
-
-		tx_stats(adapter)->be_tx_events++;
-		tx_stats(adapter)->be_tx_compl += tx_compl;
-	}
+	napi_complete(napi);
 
+	be_eq_notify(adapter, tx_eq->q.id, true, false, 0);
 	return 1;
 }
 
@@ -2065,6 +2073,7 @@ static void be_worker(struct work_struct *work)
 	struct be_adapter *adapter =
 		container_of(work, struct be_adapter, work.work);
 	struct be_rx_obj *rxo;
+	struct be_tx_obj *txo;
 	int i;
 
 	if (!adapter->ue_detected && !lancer_chip(adapter))
@@ -2092,7 +2101,9 @@ static void be_worker(struct work_struct *work)
 		else
 			be_cmd_get_stats(adapter, &adapter->stats_cmd);
 	}
-	be_tx_rate_update(adapter);
+
+	for_all_tx_queues(adapter, txo, i)
+		be_tx_rate_update(txo);
 
 	for_all_rx_queues(adapter, rxo, i) {
 		be_rx_rate_update(rxo);
@@ -2294,6 +2305,7 @@ static int be_close(struct net_device *netdev)
 {
 	struct be_adapter *adapter = netdev_priv(netdev);
 	struct be_rx_obj *rxo;
+	struct be_tx_obj *txo;
 	struct be_eq_obj *tx_eq = &adapter->tx_eq;
 	int vec, i;
 
@@ -2311,10 +2323,11 @@ static int be_close(struct net_device *netdev)
 	napi_disable(&tx_eq->napi);
 
 	if (lancer_chip(adapter)) {
-		be_cq_notify(adapter, adapter->tx_obj.cq.id, false, 0);
 		be_cq_notify(adapter, adapter->mcc_obj.cq.id, false, 0);
 		for_all_rx_queues(adapter, rxo, i)
 			 be_cq_notify(adapter, rxo->cq.id, false, 0);
+		for_all_tx_queues(adapter, txo, i)
+			 be_cq_notify(adapter, txo->cq.id, false, 0);
 	}
 
 	if (msix_enabled(adapter)) {
@@ -2333,7 +2346,8 @@ static int be_close(struct net_device *netdev)
 	/* Wait for all pending tx completions to arrive so that
 	 * all tx skbs are freed.
 	 */
-	be_tx_compl_clean(adapter);
+	for_all_tx_queues(adapter, txo, i)
+		be_tx_compl_clean(adapter, txo);
 
 	return 0;
 }
@@ -3186,6 +3200,17 @@ static int be_get_config(struct be_adapter *adapter)
 		return status;
 
 	be_cmd_check_native_mode(adapter);
+
+	if ((num_vfs && adapter->sriov_enabled) ||
+		(adapter->function_mode & 0x400) ||
+		lancer_chip(adapter) || !be_physfn(adapter)) {
+		adapter->num_tx_qs = 1;
+		netif_set_real_num_tx_queues(adapter->netdev,
+			adapter->num_tx_qs);
+	} else {
+		adapter->num_tx_qs = MAX_TX_QS;
+	}
+
 	return 0;
 }
 
@@ -3288,7 +3313,7 @@ static int __devinit be_probe(struct pci_dev *pdev,
 		goto disable_dev;
 	pci_set_master(pdev);
 
-	netdev = alloc_etherdev(sizeof(struct be_adapter));
+	netdev = alloc_etherdev_mq(sizeof(struct be_adapter), MAX_TX_QS);
 	if (netdev == NULL) {
 		status = -ENOMEM;
 		goto rel_reg;
-- 
1.7.4


^ permalink raw reply related

* [PATCH] Documentation:change all arch/i386 to arch/x86 in Documentation
From: Wanlong Gao @ 2011-06-13  5:28 UTC (permalink / raw)
  To: linux-doc, linux-kernel, netdev, linux-kbuild, linux-video,
	xiyoulinuxkernelgroup
  Cc: Dipankar Sarma, Paul E. McKenney, Randy Dunlap, Nick Piggin,
	Karsten Keil, Michal Marek, James Bottomley, Martin Mares,
	Harry Wei, Chuck Lever, Trond Myklebust, Thomas Weber,
	Mike Frysinger, Jiri Kosina, Justin P. Mattock, Wanlong Gao

From: Wanlong Gao <wanlong.gao@gmail.com>

Change all "arch/i386" to "arch/x86" in Documentaion/,
since the directory has changed.

Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com>
---
 Documentation/RCU/NMI-RCU.txt             |    4 +-
 Documentation/blockdev/README.DAC960      |    2 +-
 Documentation/blockdev/ramdisk.txt        |    8 +++---
 Documentation/cpu-freq/cpu-drivers.txt    |    2 +-
 Documentation/filesystems/nfs/nfsroot.txt |    2 +-
 Documentation/isdn/README.HiSax           |    2 +-
 Documentation/kbuild/makefiles.txt        |   38 ++++++++++++++--------------
 Documentation/magic-number.txt            |    2 +-
 Documentation/mca.txt                     |    6 ++--
 Documentation/scheduler/sched-arch.txt    |    2 +-
 Documentation/scsi/BusLogic.txt           |    2 +-
 Documentation/serial/computone.txt        |    2 +-
 Documentation/svga.txt                    |    2 +-
 Documentation/zh_CN/magic-number.txt      |    2 +-
 14 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/Documentation/RCU/NMI-RCU.txt b/Documentation/RCU/NMI-RCU.txt
index a8536cb..bf82851 100644
--- a/Documentation/RCU/NMI-RCU.txt
+++ b/Documentation/RCU/NMI-RCU.txt
@@ -5,8 +5,8 @@ Although RCU is usually used to protect read-mostly data structures,
 it is possible to use RCU to provide dynamic non-maskable interrupt
 handlers, as well as dynamic irq handlers.  This document describes
 how to do this, drawing loosely from Zwane Mwaikambo's NMI-timer
-work in "arch/i386/oprofile/nmi_timer_int.c" and in
-"arch/i386/kernel/traps.c".
+work in "arch/x86/oprofile/nmi_timer_int.c" and in
+"arch/x86/kernel/traps.c".
 
 The relevant pieces of code are listed below, each followed by a
 brief explanation.
diff --git a/Documentation/blockdev/README.DAC960 b/Documentation/blockdev/README.DAC960
index 0e8f618..bd85fb9 100644
--- a/Documentation/blockdev/README.DAC960
+++ b/Documentation/blockdev/README.DAC960
@@ -214,7 +214,7 @@ replacing "/usr/src" with wherever you keep your Linux kernel source tree:
   make config
   make bzImage (or zImage)
 
-Then install "arch/i386/boot/bzImage" or "arch/i386/boot/zImage" as your
+Then install "arch/x86/boot/bzImage" or "arch/x86/boot/zImage" as your
 standard kernel, run lilo if appropriate, and reboot.
 
 To create the necessary devices in /dev, the "make_rd" script included in
diff --git a/Documentation/blockdev/ramdisk.txt b/Documentation/blockdev/ramdisk.txt
index 6c820ba..fa72e97 100644
--- a/Documentation/blockdev/ramdisk.txt
+++ b/Documentation/blockdev/ramdisk.txt
@@ -64,9 +64,9 @@ the RAM disk dynamically grows as data is being written into it, a size field
 is not required. Bits 11 to 13 are not currently used and may as well be zero.
 These numbers are no magical secrets, as seen below:
 
-./arch/i386/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK     0x07FF
-./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
-./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000
+./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK     0x07FF
+./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
+./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000
 
 Consider a typical two floppy disk setup, where you will have the
 kernel on disk one, and have already put a RAM disk image onto disk #2.
@@ -85,7 +85,7 @@ The command line equivalent is: "prompt_ramdisk=1"
 Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word.
 So to create disk one of the set, you would do:
 
-	/usr/src/linux# cat arch/i386/boot/zImage > /dev/fd0
+	/usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0
 	/usr/src/linux# rdev /dev/fd0 /dev/fd0
 	/usr/src/linux# rdev -r /dev/fd0 49152
 
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index 6c30e93..ed07e4f 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -168,7 +168,7 @@ in-chipset dynamic frequency switching to policy->min, the upper limit
 to policy->max, and -if supported- select a performance-oriented
 setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a
 powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check
-the reference implementation in arch/i386/kernel/cpu/cpufreq/longrun.c
+the reference implementation in arch/x86/kernel/cpu/cpufreq/longrun.c
 
 
 
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt
index 90c71c6..ffdd9d8 100644
--- a/Documentation/filesystems/nfs/nfsroot.txt
+++ b/Documentation/filesystems/nfs/nfsroot.txt
@@ -226,7 +226,7 @@ They depend on various facilities being available:
      	cdrecord.
 
 	e.g.
-	  cdrecord dev=ATAPI:1,0,0 arch/i386/boot/image.iso
+	  cdrecord dev=ATAPI:1,0,0 arch/x86/boot/image.iso
 
      	For more information on isolinux, including how to create bootdisks
      	for prebuilt kernels, see http://syslinux.zytor.com/
diff --git a/Documentation/isdn/README.HiSax b/Documentation/isdn/README.HiSax
index 99e87a6..b1a573c 100644
--- a/Documentation/isdn/README.HiSax
+++ b/Documentation/isdn/README.HiSax
@@ -506,7 +506,7 @@ to e.g. the Internet:
      <ISDN subsystem - ISDN support -- HiSax>
      make clean; make zImage; make modules; make modules_install
 2. Install the new kernel
-     cp /usr/src/linux/arch/i386/boot/zImage /etc/kernel/linux.isdn
+     cp /usr/src/linux/arch/x86/boot/zImage /etc/kernel/linux.isdn
      vi /etc/lilo.conf
      <add new kernel in the bootable image section>
      lilo
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 47435e5..f47cdef 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -441,7 +441,7 @@ more details, with real examples.
 	specified if first option are not supported.
 
 	Example:
-		#arch/i386/kernel/Makefile
+		#arch/x86/kernel/Makefile
 		vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
 	In the above example, vsyscall-flags will be assigned the option
@@ -460,7 +460,7 @@ more details, with real examples.
 	supported to use an optional second option.
 
 	Example:
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 		cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
 
 	In the above example, cflags-y will be assigned the option
@@ -522,7 +522,7 @@ more details, with real examples.
 	even though the option was accepted by gcc.
 
 	Example:
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 		cflags-y += $(shell \
 		if [ $(call cc-version) -ge 0300 ] ; then \
 			echo "-mregparm=3"; fi ;)
@@ -802,7 +802,7 @@ but in the architecture makefiles where the kbuild infrastructure
 is not sufficient this sometimes needs to be explicit.
 
 	Example:
-		#arch/i386/boot/Makefile
+		#arch/x86/boot/Makefile
 		subdir- := compressed/
 
 The above assignment instructs kbuild to descend down in the
@@ -812,12 +812,12 @@ To support the clean infrastructure in the Makefiles that builds the
 final bootimage there is an optional target named archclean:
 
 	Example:
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 		archclean:
-			$(Q)$(MAKE) $(clean)=arch/i386/boot
+			$(Q)$(MAKE) $(clean)=arch/x86/boot
 
-When "make clean" is executed, make will descend down in arch/i386/boot,
-and clean as usual. The Makefile located in arch/i386/boot/ may use
+When "make clean" is executed, make will descend down in arch/x86/boot,
+and clean as usual. The Makefile located in arch/x86/boot/ may use
 the subdir- trick to descend further down.
 
 Note 1: arch/$(ARCH)/Makefile cannot use "subdir-", because that file is
@@ -882,7 +882,7 @@ When kbuild executes, the following steps are followed (roughly):
 	LDFLAGS_vmlinux uses the LDFLAGS_$@ support.
 
 	Example:
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 		LDFLAGS_vmlinux := -e stext
 
     OBJCOPYFLAGS	objcopy flags
@@ -920,14 +920,14 @@ When kbuild executes, the following steps are followed (roughly):
 	Often, the KBUILD_CFLAGS variable depends on the configuration.
 
 	Example:
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 		cflags-$(CONFIG_M386) += -march=i386
 		KBUILD_CFLAGS += $(cflags-y)
 
 	Many arch Makefiles dynamically run the target C compiler to
 	probe supported options:
 
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 
 		...
 		cflags-$(CONFIG_MPENTIUMII)     += $(call cc-option,\
@@ -1038,8 +1038,8 @@ When kbuild executes, the following steps are followed (roughly):
 	into the arch/$(ARCH)/boot/Makefile.
 
 	Example:
-		#arch/i386/Makefile
-		boot := arch/i386/boot
+		#arch/x86/Makefile
+		boot := arch/x86/boot
 		bzImage: vmlinux
 			$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
@@ -1051,7 +1051,7 @@ When kbuild executes, the following steps are followed (roughly):
 	To support this, $(archhelp) must be defined.
 
 	Example:
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 		define archhelp
 		  echo  '* bzImage      - Image (arch/$(ARCH)/boot/bzImage)'
 		endif
@@ -1065,7 +1065,7 @@ When kbuild executes, the following steps are followed (roughly):
 	from vmlinux.
 
 	Example:
-		#arch/i386/Makefile
+		#arch/x86/Makefile
 		all: bzImage
 
 	When "make" is executed without arguments, bzImage will be built.
@@ -1083,7 +1083,7 @@ When kbuild executes, the following steps are followed (roughly):
 	2) kbuild knows what files to delete during "make clean"
 
 	Example:
-		#arch/i386/kernel/Makefile
+		#arch/x86/kernel/Makefile
 		extra-y := head.o init_task.o
 
 	In this example, extra-y is used to list object files that
@@ -1133,7 +1133,7 @@ When kbuild executes, the following steps are followed (roughly):
 	Compress target. Use maximum compression to compress target.
 
 	Example:
-		#arch/i386/boot/Makefile
+		#arch/x86/boot/Makefile
 		LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
 		LDFLAGS_setup    := -Ttext 0x0 -s --oformat binary -e begtext
 
@@ -1193,7 +1193,7 @@ When kbuild executes, the following steps are followed (roughly):
 
 	When updating the $(obj)/bzImage target, the line
 
-	BUILD    arch/i386/boot/bzImage
+	BUILD    arch/x86/boot/bzImage
 
 	will be displayed with "make KBUILD_VERBOSE=0".
 
@@ -1207,7 +1207,7 @@ When kbuild executes, the following steps are followed (roughly):
 	kbuild knows .lds files and includes a rule *lds.S -> *lds.
 
 	Example:
-		#arch/i386/kernel/Makefile
+		#arch/x86/kernel/Makefile
 		always := vmlinux.lds
 
 		#Makefile
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 4b12abc..20ec3d9 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -66,7 +66,7 @@ MKISS_DRIVER_MAGIC    0x04bf      mkiss_channel     drivers/net/mkiss.h
 RISCOM8_MAGIC         0x0907      riscom_port       drivers/char/riscom8.h
 SPECIALIX_MAGIC       0x0907      specialix_port    drivers/char/specialix_io8.h
 HDLC_MAGIC            0x239e      n_hdlc            drivers/char/n_hdlc.c
-APM_BIOS_MAGIC        0x4101      apm_user          arch/i386/kernel/apm.c
+APM_BIOS_MAGIC        0x4101      apm_user          arch/x86/kernel/apm.c
 CYCLADES_MAGIC        0x4359      cyclades_port     include/linux/cyclades.h
 DB_MAGIC              0x4442      fc_info           drivers/net/iph5526_novram.c
 DL_MAGIC              0x444d      fc_info           drivers/net/iph5526_novram.c
diff --git a/Documentation/mca.txt b/Documentation/mca.txt
index 510375d..cf8fd39 100644
--- a/Documentation/mca.txt
+++ b/Documentation/mca.txt
@@ -3,7 +3,7 @@ i386 Micro Channel Architecture Support
 
 MCA support is enabled using the CONFIG_MCA define.  A machine with a MCA
 bus will have the kernel variable MCA_bus set, assuming the BIOS feature
-bits are set properly (see arch/i386/boot/setup.S for information on
+bits are set properly (see arch/x86/boot/setup.S for information on
 how this detection is done).
 
 Adapter Detection
@@ -11,7 +11,7 @@ Adapter Detection
 
 The ideal MCA adapter detection is done through the use of the
 Programmable Option Select registers.  Generic functions for doing
-this have been added in include/linux/mca.h and arch/i386/kernel/mca.c.
+this have been added in include/linux/mca.h and arch/x86/kernel/mca.c.
 Everything needed to detect adapters and read (and write) configuration
 information is there.  A number of MCA-specific drivers already use
 this.  The typical probe code looks like the following:
@@ -81,7 +81,7 @@ more people use shared IRQs on PCI machines.
 In general, an interrupt must be acknowledged not only at the ICU (which
 is done automagically by the kernel), but at the device level.  In
 particular, IRQ 0 must be reset after a timer interrupt (now done in
-arch/i386/kernel/time.c) or the first timer interrupt hangs the system.
+arch/x86/kernel/time.c) or the first timer interrupt hangs the system.
 There were also problems with the 1.3.x floppy drivers, but that seems
 to have been fixed.
 
diff --git a/Documentation/scheduler/sched-arch.txt b/Documentation/scheduler/sched-arch.txt
index d43dbcb..28aa107 100644
--- a/Documentation/scheduler/sched-arch.txt
+++ b/Documentation/scheduler/sched-arch.txt
@@ -66,7 +66,7 @@ Your cpu_idle routines need to obey the following rules:
 	    barrier issued (followed by a test of need_resched with
 	    interrupts disabled, as explained in 3).
 
-arch/i386/kernel/process.c has examples of both polling and
+arch/x86/kernel/process.c has examples of both polling and
 sleeping idle functions.
 
 
diff --git a/Documentation/scsi/BusLogic.txt b/Documentation/scsi/BusLogic.txt
index d7fbc94..48e982c 100644
--- a/Documentation/scsi/BusLogic.txt
+++ b/Documentation/scsi/BusLogic.txt
@@ -553,7 +553,7 @@ replacing "/usr/src" with wherever you keep your Linux kernel source tree:
   make config
   make zImage
 
-Then install "arch/i386/boot/zImage" as your standard kernel, run lilo if
+Then install "arch/x86/boot/zImage" as your standard kernel, run lilo if
 appropriate, and reboot.
 
 
diff --git a/Documentation/serial/computone.txt b/Documentation/serial/computone.txt
index c57ea47..60a6f65 100644
--- a/Documentation/serial/computone.txt
+++ b/Documentation/serial/computone.txt
@@ -87,7 +87,7 @@ c) Set address on ISA cards then:
 	   edit /usr/src/linux/drivers/char/ip2.c  
            (Optional - may be specified on kernel command line now)
 d) Run "make zImage" or whatever target you prefer.
-e) mv /usr/src/linux/arch/i386/boot/zImage to /boot.
+e) mv /usr/src/linux/arch/x86/boot/zImage to /boot.
 f) Add new config for this kernel into /etc/lilo.conf, run "lilo"
 	or copy to a floppy disk and boot from that floppy disk.
 g) Reboot using this kernel
diff --git a/Documentation/svga.txt b/Documentation/svga.txt
index cd66ec8..e5da082 100644
--- a/Documentation/svga.txt
+++ b/Documentation/svga.txt
@@ -150,7 +150,7 @@ end of the display.
 
 4. Options
 ~~~~~~~~~~
-   Some options can be set in the source text (in arch/i386/boot/video.S).
+   Some options can be set in the source text (in arch/x86/boot/video.S).
 All of them are simple #define's -- change them to #undef's when you want to
 switch them off. Currently supported:
 
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
index 4c4ce85..a9e6fdd 100644
--- a/Documentation/zh_CN/magic-number.txt
+++ b/Documentation/zh_CN/magic-number.txt
@@ -66,7 +66,7 @@ MKISS_DRIVER_MAGIC    0x04bf      mkiss_channel     drivers/net/mkiss.h
 RISCOM8_MAGIC         0x0907      riscom_port       drivers/char/riscom8.h
 SPECIALIX_MAGIC       0x0907      specialix_port    drivers/char/specialix_io8.h
 HDLC_MAGIC            0x239e      n_hdlc            drivers/char/n_hdlc.c
-APM_BIOS_MAGIC        0x4101      apm_user          arch/i386/kernel/apm.c
+APM_BIOS_MAGIC        0x4101      apm_user          arch/x86/kernel/apm.c
 CYCLADES_MAGIC        0x4359      cyclades_port     include/linux/cyclades.h
 DB_MAGIC              0x4442      fc_info           drivers/net/iph5526_novram.c
 DL_MAGIC              0x444d      fc_info           drivers/net/iph5526_novram.c
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 2/2] IGMP snooping: set mrouters_only flag for IPv6 traffic properly
From: Fernando Luis Vazquez Cao @ 2011-06-13  3:21 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Stephen Hemminger, netdev, Hideaki YOSHIFUJI
In-Reply-To: <1307933995.2704.11.camel@nausicaa>

Upon reception of a MGM report packet the kernel sets the mrouters_only flag
in a skb that is a clone of the original skb, which means that the bridge
loses track of MGM packets (cb buffers are tied to a specifici skb and not
shared) and it ends up forwading join requests to the bridge interface.

This can cause unexpected membership timeouts and intermitent/permanent loss
of connectivity as described in RFC 4541 [2.1.1. IGMP Forwarding Rules]:

    A snooping switch should forward IGMP Membership Reports only to
    those ports where multicast routers are attached.
    [...]
    Sending membership reports to other hosts can result, for IGMPv1
    and IGMPv2, in unintentionally preventing a host from joining a
    specific multicast group.


Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
---

diff -urNp linux-3.0-rc2-orig/net/bridge/br_multicast.c linux-3.0-rc2/net/bridge/br_multicast.c
--- linux-3.0-rc2-orig/net/bridge/br_multicast.c	2011-06-13 12:10:27.805554187 +0900
+++ linux-3.0-rc2/net/bridge/br_multicast.c	2011-06-13 12:12:27.591626915 +0900
@@ -1543,7 +1543,7 @@ static int br_multicast_ipv6_rcv(struct
 			goto out;
 		}
 		mld = (struct mld_msg *)skb_transport_header(skb2);
-		BR_INPUT_SKB_CB(skb2)->mrouters_only = 1;
+		BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
 		err = br_ip6_multicast_add_group(br, port, &mld->mld_mca);
 		break;
 	    }



^ permalink raw reply

* [PATCH] macvtap: remove wrong sock_put() in macvtap_put_queue()
From: Jason Wang @ 2011-06-13  3:15 UTC (permalink / raw)
  To: davem, arnd, netdev, linux-kernel; +Cc: Jason Wang

The calling of sock_put() should be delayed after synchronize_rcu(),
otherwise inconsist data may be seen during packets transmitting.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/net/macvtap.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 6696e56..ecdb775 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -148,7 +148,6 @@ static void macvtap_put_queue(struct macvtap_queue *q)
 
 		rcu_assign_pointer(vlan->taps[index], NULL);
 		rcu_assign_pointer(q->vlan, NULL);
-		sock_put(&q->sk);
 		--vlan->numvtaps;
 	}
 
-- 
1.7.1


^ permalink raw reply related

* IGMP snooping: set mrouters_only flag for IPv4 traffic properly
From: Fernando Luis Vazquez Cao @ 2011-06-13  3:02 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Stephen Hemminger, netdev, Hayato Kakuta
In-Reply-To: <1307933995.2704.11.camel@nausicaa>

Upon reception of a IGMP/IGMPv2 membership report the kernel sets the
mrouters_only flag in a skb that may be a clone of the original skb, which
means that sometimes the bridge loses track of membership report packets (cb
buffers are tied to a specifici skb and not shared) and it ends up forwading
join requests to the bridge interface.

This can cause unexpected membership timeouts and intermitent/permanent loss of connectivity as described in RFC 4541 [2.1.1. IGMP Forwarding Rules]:

    A snooping switch should forward IGMP Membership Reports only to
    those ports where multicast routers are attached.
    [...]
    Sending membership reports to other hosts can result, for IGMPv1
    and IGMPv2, in unintentionally preventing a host from joining a
    specific multicast group.


Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Tested-by: Hayato Kakuta <kakuta.hayato@oss.ntt.co.jp>
---

diff -urNp linux-3.0-rc2-orig/net/bridge/br_multicast.c linux-3.0-rc2/net/bridge/br_multicast.c
--- linux-3.0-rc2-orig/net/bridge/br_multicast.c	2011-06-09 13:34:04.164261031 +0900
+++ linux-3.0-rc2/net/bridge/br_multicast.c	2011-06-09 20:04:23.473930447 +0900
@@ -1424,7 +1424,7 @@ static int br_multicast_ipv4_rcv(struct
 	switch (ih->type) {
 	case IGMP_HOST_MEMBERSHIP_REPORT:
 	case IGMPV2_HOST_MEMBERSHIP_REPORT:
-		BR_INPUT_SKB_CB(skb2)->mrouters_only = 1;
+		BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
 		err = br_ip4_multicast_add_group(br, port, ih->group);
 		break;
 	case IGMPV3_HOST_MEMBERSHIP_REPORT:



^ permalink raw reply

* [PATCH 0/2] IGMP snooping: set mrouters_only flag properly
From: Fernando Luis Vazquez Cao @ 2011-06-13  2:59 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Stephen Hemminger, netdev

Hi Herbert,

I am sending you a fix for a IGMP snooping bug that bit us when we tried
to deploy it in production. This bug has been present since day one in
the IGMP code and I think the fix deserves a backport to -stable
(>=2.6.34).

The reason I am sending you separate patches for IPv4 and IPv6 is that I
wanted to acknowledge Hayato Kakuta for his extensive testing of IPv4's
IGMP code.

Thanks,
Fernando


^ permalink raw reply

* Re: rcu_sched_state detected stall on CPU 0, 3.0-rc2
From: Ben Hutchings @ 2011-06-13  2:30 UTC (permalink / raw)
  To: Andy Isaacson; +Cc: Paul E. McKenney, linux-kernel, netdev, linux-pm
In-Reply-To: <20110612235555.GD11580@hexapodia.org>

On Sun, 2011-06-12 at 16:55 -0700, Andy Isaacson wrote:
> Let's CC netdev and linux-pm since this is obviously a suspend issue,
> and may have something to do with ethtool.
> 
> On Sun, Jun 12, 2011 at 04:11:43PM -0700, Andy Isaacson wrote:
> > On Sun, Jun 12, 2011 at 12:58:56PM -0700, Andy Isaacson wrote:
> > > My Thinkpad x201s threw some errors (?) a few minutes after resuming
> > > from suspend-to-ram this morning.
> > > 
> > > [56415.672140] INFO: rcu_sched_state detected stall on CPU 0 (t=15000 jiffies)
> > > 
> > > Nothing jumps out of the backtraces at me.  Full dmesg and config
> > > attached.  This was my first StR since upgrading from 2.6.39, let's see
> > > if it fails again when I suspend after sending this email. :)
> > 
> > I haven't had a fully successful StR cycle yet (in 5 tries), although I
> > can't pin them all on RCU.  On try 2 it hung completely about 10 seconds
> > after I unlocked the screensaver, on try 3 it came back to a black
> > console, and on try 4 it didn't suspend at all (blinking moon LED but
> > battery LED and CPU fan still on).
> 
> Of course now that I'm trying to debug, I am seeing many successful
> suspend-resume cycles.  I don't see any signs of difference between the
> cases that hung and the cases that are now succeeding.
> 
> CCing netdev, because I suspend by running pm-suspend, and in at least
> one failure, an ethtool running under pm-suspend seemed to be the
> problem:
> 
> root 11558 pts/8    S+ \_ /bin/sh /usr/lib/pm-utils/sleep.d/00powers
> root 11559 pts/8    S+     \_ /bin/sh /usr/sbin/pm-powersave
> root 11576 pts/8    S+         \_ /bin/sh /usr/lib/pm-utils/power.d/
> root 11577 pts/8    D+             \_ ethtool -s eth0 wol g
[...]

Wake-on-LAN configuration is entirely handled by the relevant driver;
the ethtool core just copies the parameters in and out.  It looks like
there is some sort of deadlock or missing unlock in the driver.  So my
question would be which driver is running eth0?

Ben.

-- 
Ben Hutchings, Senior Software 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


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