Netdev List
 help / color / mirror / Atom feed
* [PATCH v2] xt_helper: use ARRAY_SIZE()
From: Changli Gao @ 2010-07-23  9:24 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao

use ARRAY_SIZE() to improve the readability.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 net/netfilter/xt_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/xt_helper.c b/net/netfilter/xt_helper.c
index 9f4ab00..805c9f6 100644
--- a/net/netfilter/xt_helper.c
+++ b/net/netfilter/xt_helper.c
@@ -65,7 +65,7 @@ static int helper_mt_check(const struct xt_mtchk_param *par)
 			par->family);
 		return ret;
 	}
-	info->name[29] = '\0';
+	info->name[ARRAY_SIZE(info->name) - 1] = '\0';
 	return 0;
 }
 

^ permalink raw reply related

* [patch -next] mv643xx_eth: potential null dereference
From: Dan Carpenter @ 2010-07-23 10:15 UTC (permalink / raw)
  To: Lennert Buytenhek
  Cc: David S. Miller, Jiri Pirko, Denis Kirjanov, Saeed Bishara,
	netdev, kernel-janitors

We assume that "pd" can be null on the previous line, and throughout the
function so we should check it here as well.  This was introduced by
9b2c2ff7a1c0 "mv643xx_eth: use sw csum for big packets"

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 2fcdb1e..9166f55 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2675,7 +2675,8 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
 	 * Detect hardware parameters.
 	 */
 	msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
-	msp->tx_csum_limit = pd->tx_csum_limit ? pd->tx_csum_limit : 9 * 1024;
+	msp->tx_csum_limit = (pd && pd->tx_csum_limit) ?
+					pd->tx_csum_limit : 9 * 1024;
 	infer_hw_params(msp);
 
 	platform_set_drvdata(pdev, msp);

^ permalink raw reply related

* Re: [patch -next] mv643xx_eth: potential null dereference
From: Joe Perches @ 2010-07-23 10:32 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Lennert Buytenhek, David S. Miller, Jiri Pirko, Denis Kirjanov,
	Saeed Bishara, netdev, kernel-janitors
In-Reply-To: <20100723101528.GF26313@bicker>

On Fri, 2010-07-23 at 12:15 +0200, Dan Carpenter wrote:
> We assume that "pd" can be null on the previous line, and throughout the
> function so we should check it here as well.  This was introduced by
> 9b2c2ff7a1c0 "mv643xx_eth: use sw csum for big packets"
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
> index 2fcdb1e..9166f55 100644
> --- a/drivers/net/mv643xx_eth.c
> +++ b/drivers/net/mv643xx_eth.c
> @@ -2675,7 +2675,8 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
>  	 * Detect hardware parameters.
>  	 */
>  	msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
> -	msp->tx_csum_limit = pd->tx_csum_limit ? pd->tx_csum_limit : 9 * 1024;
> +	msp->tx_csum_limit = (pd && pd->tx_csum_limit) ?
> +					pd->tx_csum_limit : 9 * 1024;

It's odd using two different check styles for the same
test on consecutive lines.

How about using the same style:

	msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ?
					pd->tx_csum_limit : 9 * 1024;



^ permalink raw reply

* Re: [patch v2.8 1/4] netfilter: xt_ipvs (netfilter matcher for IPVS)
From: Patrick McHardy @ 2010-07-23 10:44 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, linux-kernel, netfilter, netfilter-devel,
	Malcolm Turnbull, Mark Brooks, Wensong Zhang, Julius Volz,
	David S. Miller, Hannes Eder, Jan Engelhardt
In-Reply-To: <20100722075012.385241097@vergenet.net>

Am 22.07.2010 09:35, schrieb Simon Horman:
> From:	Hannes Eder <heder@google.com>
> 
> This implements the kernel-space side of the netfilter matcher xt_ipvs.
> 
> [ minor fixes by Simon Horman <horms@verge.net.au> ]
> Signed-off-by: Hannes Eder <heder@google.com>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> 
> --- 
> 
>  include/linux/netfilter/xt_ipvs.h |   27 ++++
>  net/netfilter/Kconfig             |   10 +
>  net/netfilter/Makefile            |    1 
>  net/netfilter/ipvs/ip_vs_proto.c  |    1 
>  net/netfilter/xt_ipvs.c           |  189 +++++++++++++++++++++++++++++++++++++

I added xt_ipvs.h to Kbuild and applied the patch, thanks.

^ permalink raw reply

* Re: [patch v2.8 2/4] IPVS: make friends with nf_conntrack
From: Patrick McHardy @ 2010-07-23 10:47 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, linux-kernel, netfilter, netfilter-devel,
	Malcolm Turnbull, Mark Brooks, Wensong Zhang, Julius Volz,
	David S. Miller, Hannes Eder, Jan Engelhardt
In-Reply-To: <20100722075012.658190199@vergenet.net>

Am 22.07.2010 09:35, schrieb Simon Horman:
> Update the nf_conntrack tuple in reply direction, as we will see
> traffic from the real server (RIP) to the client (CIP).  Once this is
> done we can use netfilters SNAT in POSTROUTING, especially with
> xt_ipvs, to do source NAT, e.g.:
> 
> % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 --vport 80 \
>> > -j SNAT --to-source 192.168.10.10

Applied, thanks.

^ permalink raw reply

* Re: [patch v2.8 3/4] IPVS: make FTP work with full NAT support
From: Patrick McHardy @ 2010-07-23 10:49 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, linux-kernel, netfilter, netfilter-devel,
	Malcolm Turnbull, Mark Brooks, Wensong Zhang, Julius Volz,
	David S. Miller, Hannes Eder, Jan Engelhardt
In-Reply-To: <20100722075012.950341908@vergenet.net>

Am 22.07.2010 09:35, schrieb Simon Horman:
> From:	Hannes Eder <heder@google.com>
> 
> Use nf_conntrack/nf_nat code to do the packet mangling and the TCP
> sequence adjusting.  The function 'ip_vs_skb_replace' is now dead
> code, so it is removed.
> 
> To SNAT FTP, use something like:
> 
> % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 \
>> --vport 21 -j SNAT --to-source 192.168.10.10
> 
> and for the data connections in passive mode:
> 
> % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 \
>> --vportctl 21 -j SNAT --to-source 192.168.10.10
> 
> using '-m state --state RELATED' would also works.
> 
> Make sure the kernel modules ip_vs_ftp, nf_conntrack_ftp, and
> nf_nat_ftp are loaded.
> 

Applied, thanks.

^ permalink raw reply

* Re: [patch v2.8 4/4] [patch v2.2 4/4] [PATCH v2.1 4/4] libxt_ipvs: user-space lib for netfilter matcher xt_ipvs
From: Patrick McHardy @ 2010-07-23 10:52 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, linux-kernel, netfilter, netfilter-devel,
	Malcolm Turnbull, Mark Brooks, Wensong Zhang, Julius Volz,
	David S. Miller, Hannes Eder, Jan Engelhardt
In-Reply-To: <20100722075013.237266048@vergenet.net>

Am 22.07.2010 09:35, schrieb Simon Horman:
> From:	Hannes Eder <heder@google.com>
> 
> The user-space library for the netfilter matcher xt_ipvs.
> 

Applied to the iptables-next branch, thanks.

^ permalink raw reply

* Re: Fwd: LVS on local node
From: Patrick McHardy @ 2010-07-23 10:54 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Changli Gao, Jan Engelhardt, Franchoze Eric, wensong, lvs-devel,
	netdev, netfilter-devel
In-Reply-To: <1279791964.2467.12.camel@edumazet-laptop>

Am 22.07.2010 11:46, schrieb Eric Dumazet:
> [PATCH] extensions: REDIRECT: add random help
> 

Applied, thanks Eric.

^ permalink raw reply

* Re: [PATCH nf-next-2.6] netfilter: add xt_cpu match
From: Patrick McHardy @ 2010-07-23 11:00 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Jan Engelhardt, Netfilter Development Mailinglist, netdev
In-Reply-To: <1279811939.2467.79.camel@edumazet-laptop>

Am 22.07.2010 17:18, schrieb Eric Dumazet:
> [PATCH nf-next-2.6] netfilter: add xt_cpu match
> 
> In some situations a CPU match permits a better spreading of
> connections, or select targets only for a given cpu.
> 
> With Remote Packet Steering or multiqueue NIC and appropriate IRQ
> affinities, we can distribute trafic on available cpus, per session.
> (all RX packets for a given flow is handled by a given cpu)
> 
> Some legacy applications being not SMP friendly, one way to scale a
> server is to run multiple copies of them.
> 
> Instead of randomly choosing an instance, we can use the cpu number as a
> key so that softirq handler for a whole instance is running on a single
> cpu, maximizing cache effects in TCP/UDP stacks.
> 
> Using NAT for example, a four ways machine might run four copies of
> server application, using a separate listening port for each instance,
> but still presenting an unique external port :
> 
> iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 0 \
>         -j REDIRECT --to-port 8080
> 
> iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 1 \
>         -j REDIRECT --to-port 8081
> 
> iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 2 \
>         -j REDIRECT --to-port 8082
> 
> iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 3 \
>         -j REDIRECT --to-port 8083
> 

Applied, thanks Eric.

^ permalink raw reply

* [patch -next v2] mv643xx_eth: potential null dereference
From: Dan Carpenter @ 2010-07-23 11:05 UTC (permalink / raw)
  To: Joe Perches
  Cc: Lennert Buytenhek, David S. Miller, Jiri Pirko, Denis Kirjanov,
	Saeed Bishara, netdev, kernel-janitors
In-Reply-To: <1279881177.24768.1623.camel@Joe-Laptop.home>

We assume that "pd" can be null on the previous line, and throughout the
function so we should check it here as well.  This was introduced by
9b2c2ff7a1c0 "mv643xx_eth: use sw csum for big packets"

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
v2: style change

diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 73bb8ea..f5e72fe 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2670,7 +2670,8 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
 	 * Detect hardware parameters.
 	 */
 	msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
-	msp->tx_csum_limit = pd->tx_csum_limit ? pd->tx_csum_limit : 9 * 1024;
+	msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ?
+					pd->tx_csum_limit : 9 * 1024;
 	infer_hw_params(msp);
 
 	platform_set_drvdata(pdev, msp);

^ permalink raw reply related

* Re: [patch -next v2] mv643xx_eth: potential null dereference
From: Lennert Buytenhek @ 2010-07-23 11:18 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Joe Perches, David S. Miller, Jiri Pirko, Denis Kirjanov,
	Saeed Bishara, netdev, kernel-janitors
In-Reply-To: <20100723110504.GG26313@bicker>

On Fri, Jul 23, 2010 at 01:05:05PM +0200, Dan Carpenter wrote:

> We assume that "pd" can be null on the previous line, and throughout the
> function so we should check it here as well.  This was introduced by
> 9b2c2ff7a1c0 "mv643xx_eth: use sw csum for big packets"
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

^ permalink raw reply

* Re: [PATCH] nf_nat_core: merge the same lines
From: Patrick McHardy @ 2010-07-23 11:28 UTC (permalink / raw)
  To: Changli Gao; +Cc: David S. Miller, netfilter-devel, netdev
In-Reply-To: <1279792140-10445-1-git-send-email-xiaosuo@gmail.com>

On 22.07.2010 11:49, Changli Gao wrote:
> nf_nat_core: merge the same lines

Please prefix your subjects with "netfilter: " so I don't have to
edit them every time.

> proto->unique_tuple() will be called finally, if the previous calls fail. This
> patch checks the false condition of (range->flags & IP_NAT_RANGE_PROTO_RANDOM)
> instead to avoid duplicate line of code: proto->unique_tuple().

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] arptables: use arp_hdr_len()
From: Patrick McHardy @ 2010-07-23 11:41 UTC (permalink / raw)
  To: Changli Gao; +Cc: David S. Miller, netfilter-devel, netdev
In-Reply-To: <1279855273-8889-1-git-send-email-xiaosuo@gmail.com>

On 23.07.2010 05:21, Changli Gao wrote:
> arptables: use arp_hdr_len()
> 
> use arp_hdr_len()

Applied, thanks.

^ permalink raw reply

* 2.6.35-rc6: Reported regressions from 2.6.34
From: Rafael J. Wysocki @ 2010-07-23 11:42 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Maciej Rutecki, Andrew Morton, Linus Torvalds,
	Kernel Testers List, Network Development, Linux ACPI,
	Linux PM List, Linux SCSI List, Linux Wireless List, DRI

This message contains a list of some regressions from 2.6.34,
for which there are no fixes in the mainline known to the tracking team.
If any of them have been fixed already, please let us know.

If you know of any other unresolved regressions from 2.6.34, please let us
know either and we'll add them to the list.  Also, please let us know
if any of the entries below are invalid.

Each entry from the list will be sent additionally in an automatic reply
to this message with CCs to the people involved in reporting and handling
the issue.


Listed regressions statistics:

  Date          Total  Pending  Unresolved
  ----------------------------------------
  2010-07-23       94       33          25
  2010-07-09       79       45          37
  2010-06-21       46       37          26
  2010-06-09       15       13          10


Unresolved regressions
----------------------

Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16423
Subject		: netfilter/iptables stopped logging 2.6.35-rc
Submitter	: auto401300-revL73yDgGBWk0Htik3J/w@public.gmane.org
Date		: 2010-07-17 10:20 (7 days old)
Message-ID	: <20100717072036.1BBE52804B-hP6SDYDcl0Dn1WiER8SD9wC/G2K4zDHf@public.gmane.org>
References	: http://lkml.indiana.edu/hypermail/linux/kernel/1007.2/00440.html


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16406
Subject		: Badness with the kernel version 2.6.35-rc1-git1 running on P6 box
Submitter	: divya <dipraksh-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date		: 2010-07-16 8:50 (8 days old)
Message-ID	: <4C401D56.3070108-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127927024906085&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16405
Subject		: Brightness Adjustment on Toshiba nb305 Netbooks is non-functional.
Submitter	: John Mesmon <jmesmon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-07-15 23:40 (9 days old)
First-Bad-Commit: http://git.kernel.org/linus/74a365b3f354fafc537efa5867deb7a9fadbfe27
Handled-By	: Matthew Garrett <mjg59-kernel-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16400
Subject		: 2.6.35-rc5 inconsistent lock state
Submitter	: Martin Pirker <lkml.collector-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-07-14 20:33 (10 days old)
Message-ID	: <AANLkTikDF0TL6OyPVCzPlUTwxFehcrETn3ysgSSeTq92-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References	: http://marc.info/?l=linux-kernel&m=127913961025267&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16399
Subject		: perf failed with kernel 2.6.35-rc
Submitter	: Zhang, Yanmin <yanmin_zhang-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Date		: 2010-07-13 8:14 (11 days old)
First-Bad-Commit: http://git.kernel.org/linus/1ac62cfff252fb668405ef3398a1fa7f4a0d6d15
Message-ID	: <1279008849.2096.913.camel-sz7BYL/Y5Hu/P+R7jlPCFVaTQe2KTcn/@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127900880212470&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16393
Subject		: kernel BUG at fs/block_dev.c:765!
Submitter	: Markus Trippelsdorf <markus-xp2qqqlHh3xzoYq+O6RWwA@public.gmane.org>
Date		: 2010-07-14 13:52 (10 days old)
Message-ID	: <20100714135217.GA1797-joY5NpejW+Hx3b7vapvTcQ@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127911564213748&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16392
Subject		: BUG at arch/x86/mm/physaddr.c:5
Submitter	: Ortwin Glück <odi-L693kI9kcNY@public.gmane.org>
Date		: 2010-07-14 6:54 (10 days old)
Message-ID	: <4C3D5F3F.7070901-L693kI9kcNY@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127909052705341&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16383
Subject		: Regression with e1000e from 2.6.34.1 to 2.6.35-rc5
Submitter	: Stefan Behte <craig-Iv0PAbYRtitM7kwft8N7nw@public.gmane.org>
Date		: 2010-07-14 00:44 (10 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16380
Subject		: Loop devices act strangely in 2.6.35
Submitter	: Artem S. Tashkinov <t.artem-VInPYn6yXxRWk0Htik3J/w@public.gmane.org>
Date		: 2010-07-13 23:21 (11 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16372
Subject		: Regression 2.6.34->2.6.35-rc4: radeaon KMS an RS690 broken
Submitter	: Torsten Kaiser <just.for.lkml-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Date		: 2010-07-11 19:56 (13 days old)
Message-ID	: <AANLkTimkNg81yzxSHTcAa1QlTE9SYmvzL4eOTVHApWq3-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References	: http://marc.info/?l=linux-kernel&m=127887822407672&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16369
Subject		: Yet another 2.6.35 regression (AGP)?
Submitter	: Woody Suwalski <terraluna977-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-07-09 14:21 (15 days old)
Message-ID	: <4C373084.8000503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127868797119254&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16365
Subject		: kernel BUG at fs/btrfs/extent-tree.c:1353
Submitter	: Johannes Hirte <johannes.hirte-3kN+8DYepx7zMJDuovMtMLNAH6kLmebB@public.gmane.org>
Date		: 2010-07-08 14:27 (16 days old)
Message-ID	: <201007081627.24654.johannes.hirte-3kN+8DYepx7zMJDuovMtMLNAH6kLmebB@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127859960725931&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16337
Subject		: general protection fault: 0000 [#1] SMP
Submitter	: Justin P. Mattock <justinmattock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-07-03 22:59 (21 days old)
Message-ID	: <4C2FC0E3.6050101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127819798215589&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16332
Subject		: Kernel crashes in tty code (tty_open)
Submitter	: werner-K1X7VnsBORrsrOwW+9ziJQ@public.gmane.org
Date		: 2010-07-02 3:34 (22 days old)
Message-ID	: <1278041650.12788-K1X7VnsBORrsrOwW+9ziJQ@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127804167511930&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16322
Subject		: WARNING: at /arch/x86/include/asm/processor.h:1005 read_measured_perf_ctrs+0x5a/0x70()
Submitter	: boris64 <bugzilla.kernel.org-ro/BP3KN3ujR7s880joybQ@public.gmane.org>
Date		: 2010-07-01 13:54 (23 days old)
Handled-By	: H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16312
Subject		: WARNING: at fs/fs-writeback.c:1127 __mark_inode_dirty
Submitter	: Zdenek Kabelac <zdenek.kabelac-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-06-28 9:40 (26 days old)
Message-ID	: <AANLkTin24fr5O4_q5Xbo9Y_NKkEmtcp6Hgmr9_4qXaFz-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References	: http://marc.info/?l=linux-kernel&m=127771804806465&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16311
Subject		: [REGRESSION][SUSPEND] 2.6.35-rcX won't suspend Lenovo W500 laptop
Submitter	: Shawn Starr <shawn.starr-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org>
Date		: 2010-06-28 0:45 (26 days old)
Message-ID	: <<201006272045.17004.shawn.starr-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org>>
References	: http://marc.info/?l=linux-kernel&m=127768633705286&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16307
Subject		: i915 in kernel 2.6.35-rc3, high number of wakeups
Submitter	: Enrico Bandiello <enban-c0jvKHQHzSzx4jp4WZvp5g@public.gmane.org>
Date		: 2010-06-26 16:57 (28 days old)
Message-ID	: <4C26317A.5070309-c0jvKHQHzSzx4jp4WZvp5g@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127757403404259&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16265
Subject		: Why is kslowd accumulating so much CPU time?
Submitter	: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>
Date		: 2010-06-09 18:36 (45 days old)
First-Bad-Commit: http://git.kernel.org/linus/fbf81762e385d3d45acad057b654d56972acf58c
Message-ID	: <E1OMQ88-0002a1-Gb-UK71uKi2zisAobODsErMgNi2O/JbrIOy@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127610857819033&w=4


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16257
Subject		: sysfs changes break hwsim and bnep drivers
Submitter	: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Date		: 2010-06-20 11:23 (34 days old)
References	: http://thread.gmane.org/gmane.linux.network/162754
Handled-By	: Eric W. Biederman <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
		  Kay Sievers <kay.sievers-tD+1rO4QERM@public.gmane.org>


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16228
Subject		: BUG/boot failure on Dell Precision T3500 (pci/ahci_stop_engine)
Submitter	: Brian Bloniarz <phunge0-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>
Date		: 2010-06-16 17:57 (38 days old)
Handled-By	: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16221
Subject		: 2.6.35-rc2-git5 -- [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
Submitter	: Miles Lane <miles.lane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-06-11 20:31 (43 days old)
Message-ID	: <AANLkTim0jVRyqkwlGOcrg_XTvUQwcBYfWJX-aRzkkrLG-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
References	: http://marc.info/?l=linux-kernel&m=127628828119623&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16201
Subject		: SIOCGIWFREQ ioctl fails to get frequency info
Submitter	: nuh <nuh-hRtevi7K+EWJQ7yn63+t2w@public.gmane.org>
Date		: 2010-06-14 10:45 (40 days old)


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16184
Subject		: Container, X86-64, i386, iptables rule
Submitter	: Jean-Marc Pigeon <jmp-4qkeo2rQ0gg@public.gmane.org>
Date		: 2010-06-12 04:17 (42 days old)
Handled-By	: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16173
Subject		: After uncompressing the kernel, at boot time, the server hangs.
Submitter	: David Hill <hilld-HTiBYHdybX7UkGsOFmftXw@public.gmane.org>
Date		: 2010-06-09 23:25 (45 days old)
First-Bad-Commit: http://git.kernel.org/linus/cf7500c0ea133d66f8449d86392d83f840102632
Handled-By	: Eric W. Biederman <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>


Regressions with patches
------------------------

Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16396
Subject		: [bisected] resume from suspend freezes system
Submitter	: tomas m <tmezzadra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-07-15 02:32 (9 days old)
Handled-By	: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org>
Patch		: https://patchwork.kernel.org/patch/113108/


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16353
Subject		: 2.6.35 regression
Submitter	: Zeev Tarantov <zeev.tarantov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-07-05 13:04 (19 days old)
Message-ID	: <loom.20100705T144459-919-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127836002702522&w=2
Handled-By	: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
Patch		: https://patchwork.kernel.org/patch/110988/


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16310
Subject		: arm omap invalid module format
Submitter	: Robert Nelson <robertcnelson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date		: 2010-06-28 17:30 (26 days old)
First-Bad-Commit: http://git.kernel.org/linus/d0679c730395d0bde9a46939e7ba255b4ba7dd7c
Handled-By	: Michal Marek <mmarek-AlSwsSmVLrQ@public.gmane.org>
Patch		: https://bugzilla.kernel.org/attachment.cgi?id=26999


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16294
Subject		: [Q35 bisected] hang at init of i915 driver
Submitter	: Kees Cook <kees-oSa+0FWJbaXR7s880joybQ@public.gmane.org>
Date		: 2010-06-25 18:20 (29 days old)
First-Bad-Commit: http://git.kernel.org/linus/f1befe71fa7a79ab733011b045639d8d809924ad
Handled-By	: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Patch		: https://patchwork.kernel.org/patch/111130/


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16278
Subject		: lvm snapshot causes deadlock in 2.6.35
Submitter	: Phillip Susi <psusi-3tLf1voIkJTQT0dZR+AlfA@public.gmane.org>
Date		: 2010-06-23 16:55 (31 days old)
Handled-By	: Eric Sandeen <sandeen-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Patch		: https://bugzilla.kernel.org/attachment.cgi?id=26933


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16271
Subject		: 2.6.35-rc3 regression: IBM Maia system is unbootable [ACPI related?]
Submitter	: James Bottomley <James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
Date		: 2010-06-21 16:03 (33 days old)
Message-ID	: <1277136189.10998.63.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
References	: http://marc.info/?l=linux-kernel&m=127713622821166&w=2
Handled-By	: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Patch		: https://patchwork.kernel.org/patch/108497/


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16256
Subject		: tpm_tis breaks suspend/hibernate on kernels > 2.6.34
Submitter	: Helmut Schaa <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Date		: 2010-06-20 11:15 (34 days old)
First-Bad-Commit: http://git.kernel.org/linus/225a9be24d799aa16d543c31fb09f0c9ed1d9caa
Handled-By	: Helmut Schaa <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Patch		: http://marc.info/?l=tpmdd-devel&m=127609160616162&w=2


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=16215
Subject		: sysfs: cannot create duplicate filename '/class/net/bnep0'
Submitter	: Janusz Krzysztofik <jkrzyszt-NCk8gXQAEuFz6jiHbVrK7g@public.gmane.org>
Date		: 2010-06-15 14:55 (39 days old)
Handled-By	: Eric W. Biederman <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Patch		: https://bugzilla.kernel.org/show_bug.cgi?id=16215#c10


For details, please visit the bug entries and follow the links given in
references.

As you can see, there is a Bugzilla entry for each of the listed regressions.
There also is a Bugzilla entry used for tracking the regressions from 2.6.34,
unresolved as well as resolved, at:

http://bugzilla.kernel.org/show_bug.cgi?id=16055

Please let the tracking team know if there are any Bugzilla entries that
should be added to the list in there.

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] ip6tables: use skb->len for accounting
From: Patrick McHardy @ 2010-07-23 11:48 UTC (permalink / raw)
  To: Changli Gao
  Cc: Jan Engelhardt, David S. Miller, Alexey Kuznetsov,
	Pekka Savola (ipv6), James Morris, Hideaki YOSHIFUJI,
	netfilter-devel, netdev
In-Reply-To: <AANLkTik_2HMl3OaGvZiJPCO09Bu4lj6S0PNWFbw1BGXe@mail.gmail.com>

On 23.07.2010 08:38, Changli Gao wrote:
> On Fri, Jul 23, 2010 at 2:16 PM, Jan Engelhardt <jengelh@medozas.de> wrote:
>>
>>
>> I wonder how this fares with trailing padding or data, like, when
>> you have a standard v4/v6 packet created in a raw socket, and append
>> a bunch of \0s to it.
>>
>>
> 
> For the packets received, ip_rcv, ipv6_rcv and bridge all call
> pskb_trim_rcsum before feeding them to netfilter. The raw packets are
> sent via dev_queue_xmit(), and they don't pass through the output path
> of netfilter.

That's not true, raw packets also pass through netfilter. However
I agree that this patch makes sense to properly deal with jumbo
frames, but you should also update xt_length for consistency.

^ permalink raw reply

* [PATCH net-next 1/7] be2net: change to call pmac_del only if necessary
From: Ajit Khaparde @ 2010-07-23 11:49 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

If a mac address has not been configured for a VF,
there is no need to call be_cmd_pmac_del.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be.h      |    1 +
 drivers/net/benet/be_main.c |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index f17428c..c730bd6 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -221,6 +221,7 @@ struct be_rx_obj {
 };
 
 #define BE_NUM_MSIX_VECTORS		2	/* 1 each for Tx and Rx */
+#define BE_INVALID_PMAC_ID		0xffffffff
 struct be_adapter {
 	struct pci_dev *pdev;
 	struct net_device *netdev;
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index e6ca923..899881b 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -656,8 +656,9 @@ static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
 	if (!is_valid_ether_addr(mac) || (vf >= num_vfs))
 		return -EINVAL;
 
-	status = be_cmd_pmac_del(adapter, adapter->vf_if_handle[vf],
-				adapter->vf_pmac_id[vf]);
+	if (adapter->vf_pmac_id[vf] != BE_INVALID_PMAC_ID)
+		status = be_cmd_pmac_del(adapter, adapter->vf_if_handle[vf],
+					adapter->vf_pmac_id[vf]);
 
 	status = be_cmd_pmac_add(adapter, mac, adapter->vf_if_handle[vf],
 				&adapter->vf_pmac_id[vf]);
@@ -1910,6 +1911,7 @@ static int be_setup(struct be_adapter *adapter)
 				"Interface Create failed for VF %d\n", vf);
 				goto if_destroy;
 			}
+			adapter->vf_pmac_id[vf] = BE_INVALID_PMAC_ID;
 			vf++;
 		}
 	} else if (!be_physfn(adapter)) {
-- 
1.7.0.4


^ permalink raw reply related

* Re: [PATCH] iptables: use skb->len for accounting
From: Patrick McHardy @ 2010-07-23 11:49 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Changli Gao, David S. Miller, netfilter-devel, netdev
In-Reply-To: <1279868302.2482.113.camel@edumazet-laptop>

On 23.07.2010 08:58, Eric Dumazet wrote:
> Le vendredi 23 juillet 2010 à 14:47 +0800, Changli Gao a écrit :
>> On Fri, Jul 23, 2010 at 2:29 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>> Le vendredi 23 juillet 2010 à 11:34 +0800, Changli Gao a écrit :
>>>> iptables: use skb->len for accounting
>>>>
>>>> use skb->len for accounting as xt_quota does.
>>>>
>>>
>>> Why ?
>>>
>>> This is a gratuitous change, unless you have very strong arguments.
>>>
>>> xt_quota is an exception, dont change all others because of it !
>>
>> exception ? Why ?
> 
> Because it handles all protocols...
> 
> So skb->len is a shortcut, an approximation if you want.
> 
> At IPV4 level, ip->tot_len is an exact value.

Actually skb->len is also exact at the IPv4 level. I'm inclined
to apply this patch for consistency with ip6_tables, where using
skb->len fixes jumbo frame accounting.


^ permalink raw reply

* [PATCH net-next 2/7] be2net: add support to get vf config
From: Ajit Khaparde @ 2010-07-23 11:50 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be.h      |    9 ++++++-
 drivers/net/benet/be_main.c |   51 +++++++++++++++++++++++++++++++++---------
 2 files changed, 47 insertions(+), 13 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index c730bd6..a8e95da 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -220,6 +220,12 @@ struct be_rx_obj {
 	struct be_rx_page_info page_info_tbl[RX_Q_LEN];
 };
 
+struct be_vf_cfg {
+	unsigned char vf_mac_addr[ETH_ALEN];
+	u32 vf_if_handle;
+	u32 vf_pmac_id;
+};
+
 #define BE_NUM_MSIX_VECTORS		2	/* 1 each for Tx and Rx */
 #define BE_INVALID_PMAC_ID		0xffffffff
 struct be_adapter {
@@ -289,8 +295,7 @@ struct be_adapter {
 	struct completion flash_compl;
 
 	bool sriov_enabled;
-	u32 vf_if_handle[BE_MAX_VF];
-	u32 vf_pmac_id[BE_MAX_VF];
+	struct be_vf_cfg vf_cfg[BE_MAX_VF];
 	u8 base_eq_id;
 	u8 is_virtfn;
 };
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 899881b..a8c4548 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -656,18 +656,44 @@ static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
 	if (!is_valid_ether_addr(mac) || (vf >= num_vfs))
 		return -EINVAL;
 
-	if (adapter->vf_pmac_id[vf] != BE_INVALID_PMAC_ID)
-		status = be_cmd_pmac_del(adapter, adapter->vf_if_handle[vf],
-					adapter->vf_pmac_id[vf]);
+	if (adapter->vf_cfg[vf].vf_pmac_id != BE_INVALID_PMAC_ID)
+		status = be_cmd_pmac_del(adapter,
+					adapter->vf_cfg[vf].vf_if_handle,
+					adapter->vf_cfg[vf].vf_pmac_id);
 
-	status = be_cmd_pmac_add(adapter, mac, adapter->vf_if_handle[vf],
-				&adapter->vf_pmac_id[vf]);
-	if (!status)
+	status = be_cmd_pmac_add(adapter, mac,
+				adapter->vf_cfg[vf].vf_if_handle,
+				&adapter->vf_cfg[vf].vf_pmac_id);
+
+	if (status)
 		dev_err(&adapter->pdev->dev, "MAC %pM set on VF %d Failed\n",
 				mac, vf);
+	else
+		memcpy(adapter->vf_cfg[vf].vf_mac_addr, mac, ETH_ALEN);
+
 	return status;
 }
 
+static int be_get_vf_config(struct net_device *netdev, int vf,
+			struct ifla_vf_info *vi)
+{
+	struct be_adapter *adapter = netdev_priv(netdev);
+
+	if (!adapter->sriov_enabled)
+		return -EPERM;
+
+	if (vf >= num_vfs)
+		return -EINVAL;
+
+	vi->vf = vf;
+	vi->tx_rate = 0;
+	vi->vlan = 0;
+	vi->qos = 0;
+	memcpy(&vi->mac, adapter->vf_cfg[vf].vf_mac_addr, ETH_ALEN);
+
+	return 0;
+}
+
 static void be_rx_rate_update(struct be_adapter *adapter)
 {
 	struct be_drvr_stats *stats = drvr_stats(adapter);
@@ -1904,14 +1930,15 @@ static int be_setup(struct be_adapter *adapter)
 			cap_flags = en_flags = BE_IF_FLAGS_UNTAGGED
 					| BE_IF_FLAGS_BROADCAST;
 			status = be_cmd_if_create(adapter, cap_flags, en_flags,
-					mac, true, &adapter->vf_if_handle[vf],
+					mac, true,
+					&adapter->vf_cfg[vf].vf_if_handle,
 					NULL, vf+1);
 			if (status) {
 				dev_err(&adapter->pdev->dev,
 				"Interface Create failed for VF %d\n", vf);
 				goto if_destroy;
 			}
-			adapter->vf_pmac_id[vf] = BE_INVALID_PMAC_ID;
+			adapter->vf_cfg[vf].vf_pmac_id = BE_INVALID_PMAC_ID;
 			vf++;
 		}
 	} else if (!be_physfn(adapter)) {
@@ -1945,8 +1972,9 @@ tx_qs_destroy:
 	be_tx_queues_destroy(adapter);
 if_destroy:
 	for (vf = 0; vf < num_vfs; vf++)
-		if (adapter->vf_if_handle[vf])
-			be_cmd_if_destroy(adapter, adapter->vf_if_handle[vf]);
+		if (adapter->vf_cfg[vf].vf_if_handle)
+			be_cmd_if_destroy(adapter,
+					adapter->vf_cfg[vf].vf_if_handle);
 	be_cmd_if_destroy(adapter, adapter->if_handle);
 do_none:
 	return status;
@@ -2189,7 +2217,8 @@ static struct net_device_ops be_netdev_ops = {
 	.ndo_vlan_rx_register	= be_vlan_register,
 	.ndo_vlan_rx_add_vid	= be_vlan_add_vid,
 	.ndo_vlan_rx_kill_vid	= be_vlan_rem_vid,
-	.ndo_set_vf_mac		= be_set_vf_mac
+	.ndo_set_vf_mac		= be_set_vf_mac,
+	.ndo_get_vf_config	= be_get_vf_config
 };
 
 static void be_netdev_init(struct net_device *netdev)
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH net-next 3/7] be2net: add vlan support for sriov virtual functions
From: Ajit Khaparde @ 2010-07-23 11:51 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be.h      |    1 +
 drivers/net/benet/be_main.c |   54 ++++++++++++++++++++++++++++++++++++------
 2 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index a8e95da..f693b9e 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -224,6 +224,7 @@ struct be_vf_cfg {
 	unsigned char vf_mac_addr[ETH_ALEN];
 	u32 vf_if_handle;
 	u32 vf_pmac_id;
+	u16 vf_vlan_tag;
 };
 
 #define BE_NUM_MSIX_VECTORS		2	/* 1 each for Tx and Rx */
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index a8c4548..46f087e 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -552,11 +552,18 @@ static int be_change_mtu(struct net_device *netdev, int new_mtu)
  * A max of 64 (BE_NUM_VLANS_SUPPORTED) vlans can be configured in BE.
  * If the user configures more, place BE in vlan promiscuous mode.
  */
-static int be_vid_config(struct be_adapter *adapter)
+static int be_vid_config(struct be_adapter *adapter, bool vf, u32 vf_num)
 {
 	u16 vtag[BE_NUM_VLANS_SUPPORTED];
 	u16 ntags = 0, i;
 	int status = 0;
+	u32 if_handle;
+
+	if (vf) {
+		if_handle = adapter->vf_cfg[vf_num].vf_if_handle;
+		vtag[0] = cpu_to_le16(adapter->vf_cfg[vf_num].vf_vlan_tag);
+		status = be_cmd_vlan_config(adapter, if_handle, vtag, 1, 1, 0);
+	}
 
 	if (adapter->vlans_added <= adapter->max_vlans)  {
 		/* Construct VLAN Table to give to HW */
@@ -572,6 +579,7 @@ static int be_vid_config(struct be_adapter *adapter)
 		status = be_cmd_vlan_config(adapter, adapter->if_handle,
 					NULL, 0, 1, 1);
 	}
+
 	return status;
 }
 
@@ -592,27 +600,28 @@ static void be_vlan_add_vid(struct net_device *netdev, u16 vid)
 {
 	struct be_adapter *adapter = netdev_priv(netdev);
 
+	adapter->vlans_added++;
 	if (!be_physfn(adapter))
 		return;
 
 	adapter->vlan_tag[vid] = 1;
-	adapter->vlans_added++;
 	if (adapter->vlans_added <= (adapter->max_vlans + 1))
-		be_vid_config(adapter);
+		be_vid_config(adapter, false, 0);
 }
 
 static void be_vlan_rem_vid(struct net_device *netdev, u16 vid)
 {
 	struct be_adapter *adapter = netdev_priv(netdev);
 
+	adapter->vlans_added--;
+	vlan_group_set_device(adapter->vlan_grp, vid, NULL);
+
 	if (!be_physfn(adapter))
 		return;
 
 	adapter->vlan_tag[vid] = 0;
-	vlan_group_set_device(adapter->vlan_grp, vid, NULL);
-	adapter->vlans_added--;
 	if (adapter->vlans_added <= adapter->max_vlans)
-		be_vid_config(adapter);
+		be_vid_config(adapter, false, 0);
 }
 
 static void be_set_multicast_list(struct net_device *netdev)
@@ -687,13 +696,41 @@ static int be_get_vf_config(struct net_device *netdev, int vf,
 
 	vi->vf = vf;
 	vi->tx_rate = 0;
-	vi->vlan = 0;
+	vi->vlan = adapter->vf_cfg[vf].vf_vlan_tag;
 	vi->qos = 0;
 	memcpy(&vi->mac, adapter->vf_cfg[vf].vf_mac_addr, ETH_ALEN);
 
 	return 0;
 }
 
+static int be_set_vf_vlan(struct net_device *netdev,
+			int vf, u16 vlan, u8 qos)
+{
+	struct be_adapter *adapter = netdev_priv(netdev);
+	int status = 0;
+
+	if (!adapter->sriov_enabled)
+		return -EPERM;
+
+	if ((vf >= num_vfs) || (vlan > 4095))
+		return -EINVAL;
+
+	if (vlan) {
+		adapter->vf_cfg[vf].vf_vlan_tag = vlan;
+		adapter->vlans_added++;
+	} else {
+		adapter->vf_cfg[vf].vf_vlan_tag = 0;
+		adapter->vlans_added--;
+	}
+
+	status = be_vid_config(adapter, true, vf);
+
+	if (status)
+		dev_info(&adapter->pdev->dev,
+				"VLAN %d config on VF %d failed\n", vlan, vf);
+	return status;
+}
+
 static void be_rx_rate_update(struct be_adapter *adapter)
 {
 	struct be_drvr_stats *stats = drvr_stats(adapter);
@@ -1849,7 +1886,7 @@ static int be_open(struct net_device *netdev)
 	be_link_status_update(adapter, link_up);
 
 	if (be_physfn(adapter)) {
-		status = be_vid_config(adapter);
+		status = be_vid_config(adapter, false, 0);
 		if (status)
 			goto err;
 
@@ -2218,6 +2255,7 @@ static struct net_device_ops be_netdev_ops = {
 	.ndo_vlan_rx_add_vid	= be_vlan_add_vid,
 	.ndo_vlan_rx_kill_vid	= be_vlan_rem_vid,
 	.ndo_set_vf_mac		= be_set_vf_mac,
+	.ndo_set_vf_vlan	= be_set_vf_vlan,
 	.ndo_get_vf_config	= be_get_vf_config
 };
 
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH net-next 4/7] be2net: code to support tx rate configuration on virtual functions
From: Ajit Khaparde @ 2010-07-23 11:52 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be.h      |    1 +
 drivers/net/benet/be_cmds.c |   34 ++++++++++++++++++++++++++++++++++
 drivers/net/benet/be_cmds.h |   18 ++++++++++++++++++
 drivers/net/benet/be_main.c |   27 ++++++++++++++++++++++++++-
 4 files changed, 79 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index f693b9e..8cfe3c4 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -225,6 +225,7 @@ struct be_vf_cfg {
 	u32 vf_if_handle;
 	u32 vf_pmac_id;
 	u16 vf_vlan_tag;
+	u32 vf_tx_rate;
 };
 
 #define BE_NUM_MSIX_VECTORS		2	/* 1 each for Tx and Rx */
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 344e062..32ae324 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1730,3 +1730,37 @@ err:
 	spin_unlock_bh(&adapter->mcc_lock);
 	return status;
 }
+
+int be_cmd_set_qos(struct be_adapter *adapter, u32 bps, u32 domain)
+{
+	struct be_mcc_wrb *wrb;
+	struct be_cmd_req_set_qos *req;
+	int status;
+
+	spin_lock_bh(&adapter->mcc_lock);
+
+	wrb = wrb_from_mccq(adapter);
+	if (!wrb) {
+		status = -EBUSY;
+		goto err;
+	}
+
+	req = embedded_payload(wrb);
+
+	be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0,
+				OPCODE_COMMON_SET_QOS);
+
+	be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
+			OPCODE_COMMON_SET_QOS, sizeof(*req));
+
+	req->hdr.domain = domain;
+	req->valid_bits = BE_QOS_BITS_NIC;
+	req->max_bps_nic = bps;
+
+	status = be_mcc_notify_wait(adapter);
+
+err:
+	spin_unlock_bh(&adapter->mcc_lock);
+	return status;
+}
+
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index 912a058..3b69e71 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -124,6 +124,7 @@ struct be_mcc_mailbox {
 #define OPCODE_COMMON_CQ_CREATE				12
 #define OPCODE_COMMON_EQ_CREATE				13
 #define OPCODE_COMMON_MCC_CREATE        		21
+#define OPCODE_COMMON_SET_QOS				28
 #define OPCODE_COMMON_SEEPROM_READ			30
 #define OPCODE_COMMON_NTWK_RX_FILTER    		34
 #define OPCODE_COMMON_GET_FW_VERSION			35
@@ -894,6 +895,22 @@ struct be_cmd_resp_get_phy_info {
 	u32 future_use[4];
 };
 
+/*********************** Set QOS ***********************/
+
+#define BE_QOS_BITS_NIC				1
+
+struct be_cmd_req_set_qos {
+	struct be_cmd_req_hdr hdr;
+	u32 valid_bits;
+	u32 max_bps_nic;
+	u32 rsvd[7];
+};
+
+struct be_cmd_resp_set_qos {
+	struct be_cmd_resp_hdr hdr;
+	u32 rsvd;
+};
+
 extern int be_pci_fnum_get(struct be_adapter *adapter);
 extern int be_cmd_POST(struct be_adapter *adapter);
 extern int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
@@ -974,4 +991,5 @@ extern int be_cmd_set_loopback(struct be_adapter *adapter, u8 port_num,
 				u8 loopback_type, u8 enable);
 extern int be_cmd_get_phy_info(struct be_adapter *adapter,
 		struct be_dma_mem *cmd);
+extern int be_cmd_set_qos(struct be_adapter *adapter, u32 bps, u32 domain);
 
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 46f087e..79adcdd 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -695,7 +695,7 @@ static int be_get_vf_config(struct net_device *netdev, int vf,
 		return -EINVAL;
 
 	vi->vf = vf;
-	vi->tx_rate = 0;
+	vi->tx_rate = adapter->vf_cfg[vf].vf_tx_rate;
 	vi->vlan = adapter->vf_cfg[vf].vf_vlan_tag;
 	vi->qos = 0;
 	memcpy(&vi->mac, adapter->vf_cfg[vf].vf_mac_addr, ETH_ALEN);
@@ -731,6 +731,30 @@ static int be_set_vf_vlan(struct net_device *netdev,
 	return status;
 }
 
+static int be_set_vf_tx_rate(struct net_device *netdev,
+			int vf, int rate)
+{
+	struct be_adapter *adapter = netdev_priv(netdev);
+	int status = 0;
+
+	if (!adapter->sriov_enabled)
+		return -EPERM;
+
+	if ((vf >= num_vfs) || (rate < 0))
+		return -EINVAL;
+
+	if (rate > 10000)
+		rate = 10000;
+
+	adapter->vf_cfg[vf].vf_tx_rate = rate;
+	status = be_cmd_set_qos(adapter, rate / 10, vf);
+
+	if (status)
+		dev_info(&adapter->pdev->dev,
+				"tx rate %d on VF %d failed\n", rate, vf);
+	return status;
+}
+
 static void be_rx_rate_update(struct be_adapter *adapter)
 {
 	struct be_drvr_stats *stats = drvr_stats(adapter);
@@ -2256,6 +2280,7 @@ static struct net_device_ops be_netdev_ops = {
 	.ndo_vlan_rx_kill_vid	= be_vlan_rem_vid,
 	.ndo_set_vf_mac		= be_set_vf_mac,
 	.ndo_set_vf_vlan	= be_set_vf_vlan,
+	.ndo_set_vf_tx_rate	= be_set_vf_tx_rate,
 	.ndo_get_vf_config	= be_get_vf_config
 };
 
-- 
1.7.0.4


^ permalink raw reply related

* Re: [PATCH] xt_helper: use sizeof()
From: Patrick McHardy @ 2010-07-23 11:53 UTC (permalink / raw)
  To: Changli Gao; +Cc: David S. Miller, netfilter-devel, netdev
In-Reply-To: <1279873323-15544-1-git-send-email-xiaosuo@gmail.com>

On 23.07.2010 10:22, Changli Gao wrote:
> use sizeof() to improve the readability.
> 

Applied, thanks.

One more request about your changelogs though: please use capital
letters at the beginning of new sentences in the patch description.

^ permalink raw reply

* Re: [PATCH] xt_helper: use sizeof()
From: Patrick McHardy @ 2010-07-23 11:56 UTC (permalink / raw)
  To: Changli Gao; +Cc: David S. Miller, netfilter-devel, netdev
In-Reply-To: <4C4982AF.7020001@trash.net>

On 23.07.2010 13:53, Patrick McHardy wrote:
> On 23.07.2010 10:22, Changli Gao wrote:
>> use sizeof() to improve the readability.
>>
> 
> Applied, thanks.

I see that you sent another patch for this using a different
subject. Please state it clearly when you wish to withdraw
a patch. I've backed it out again.

^ permalink raw reply

* [PATCH net-next 5/7] be2net: supress printing error when mac query fails for VF
From: Ajit Khaparde @ 2010-07-23 12:00 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

When a virtual function driver in initialized, the network mac
query command can fail. Skip display of error message in that case.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be_cmds.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 32ae324..cf3af05 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -76,7 +76,8 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
 						sizeof(resp->hw_stats));
 			netdev_stats_update(adapter);
 		}
-	} else if (compl_status != MCC_STATUS_NOT_SUPPORTED) {
+	} else if ((compl_status != MCC_STATUS_NOT_SUPPORTED) &&
+			(compl->tag0 != OPCODE_COMMON_NTWK_MAC_QUERY)) {
 		extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) &
 				CQE_STATUS_EXTD_MASK;
 		dev_warn(&adapter->pdev->dev,
-- 
1.7.0.4


^ permalink raw reply related

* Re: [PATCH] xt_quota: don't copy quota back to userspace
From: Patrick McHardy @ 2010-07-23 12:03 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Jan Engelhardt, Changli Gao, David S. Miller, netfilter-devel,
	netdev
In-Reply-To: <1279866523.2482.78.camel@edumazet-laptop>

On 23.07.2010 08:28, Eric Dumazet wrote:
> Le vendredi 23 juillet 2010 à 08:20 +0200, Jan Engelhardt a écrit :
>> On Friday 2010-07-23 06:54, Changli Gao wrote:
>>
>>> This patch should be applied after my another patch:
>>> http://patchwork.ozlabs.org/patch/59729/
>>>
>>> xt_quota: don't copy quota back to userspace
>>>
>>> In nowadays, table entries are per-cpu variables, so it don't make any 
>>> sense to copy quota back to one of the variable instances. To keep 
>>> things simple, this patch undo the copy.
>>
>> I object. This line is on purpose, to give at least a chance of 
>> reporting back a more-or-less believable value. Without copying
>> the value back, users have moaned about the counter not decreasing
>> _at all_.
> 
> Maybe, but current situation is buggy.

Indeed, besides not being able to properly "iptables-save" a rule,
its not possible to delete a specific quota rule since they can't
be distinguished based on the specified quota value:

# iptables -A INPUT -m quota --quota 1000
# iptables -A INPUT -m quota --quota 2000
# iptables -D INPUT -m quota --quota 2000
# iptables -vxnL INPUT
Chain INPUT (policy ACCEPT 2 packets, 96 bytes)
    pkts      bytes target     prot opt in     out     source
    destination
       6      356            all  --  *      *       0.0.0.0/0
  0.0.0.0/0           quota: 1644 bytes

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] xt_quota: use per-rule spin lock
From: Patrick McHardy @ 2010-07-23 12:04 UTC (permalink / raw)
  To: Changli Gao; +Cc: David S. Miller, netfilter-devel, netdev
In-Reply-To: <1279858053-14732-1-git-send-email-xiaosuo@gmail.com>

On 23.07.2010 06:07, Changli Gao wrote:
> xt_quota: use per-rule spin lock
> 
> use per-rule spin lock to improve the scalability.

Applied, thanks.

^ 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