Netdev List
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH] enic: Bug Fix: Dont reset ENIC_SET_APPLIED flag on port profile disassociate
From: Roopa Prabhu @ 2011-01-21  0:35 UTC (permalink / raw)
  To: davem; +Cc: netdev

From: Roopa Prabhu <roprabhu@cisco.com>

enic_get_vf_port returns port profile operation status only if ENIC_SET_APPLIED
flag is set. A recent rework of enic_set_port_profile added code to reset this
flag on disassociate. As a result of which a client calling enic_get_vf_port
to get the status of port profile disassociate will always get a return value
of ENODATA. This patch renames ENIC_SET_APPLIED to more appropriate
ENIC_PORT_REQUEST_APPLIED and reverts back the recent change so that the
flag is set both at associate and disassociate of a port profile.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
---
 drivers/net/enic/enic.h      |    6 +++---
 drivers/net/enic/enic_main.c |   10 ++++++----
 2 files changed, 9 insertions(+), 7 deletions(-)


diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index a937f49..ca3be4f 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -32,8 +32,8 @@
 
 #define DRV_NAME		"enic"
 #define DRV_DESCRIPTION		"Cisco VIC Ethernet NIC Driver"
-#define DRV_VERSION		"1.4.1.10"
-#define DRV_COPYRIGHT		"Copyright 2008-2010 Cisco Systems, Inc"
+#define DRV_VERSION		"2.1.1.2"
+#define DRV_COPYRIGHT		"Copyright 2008-2011 Cisco Systems, Inc"
 
 #define ENIC_BARS_MAX		6
 
@@ -49,7 +49,7 @@ struct enic_msix_entry {
 	void *devid;
 };
 
-#define ENIC_SET_APPLIED		(1 << 0)
+#define ENIC_PORT_REQUEST_APPLIED	(1 << 0)
 #define ENIC_SET_REQUEST		(1 << 1)
 #define ENIC_SET_NAME			(1 << 2)
 #define ENIC_SET_INSTANCE		(1 << 3)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index a0af48c..89664c6 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1318,18 +1318,20 @@ static int enic_set_port_profile(struct enic *enic, u8 *mac)
 		vic_provinfo_free(vp);
 		if (err)
 			return err;
-
-		enic->pp.set |= ENIC_SET_APPLIED;
 		break;
 
 	case PORT_REQUEST_DISASSOCIATE:
-		enic->pp.set &= ~ENIC_SET_APPLIED;
 		break;
 
 	default:
 		return -EINVAL;
 	}
 
+	/* Set flag to indicate that the port assoc/disassoc
+	 * request has been sent out to fw
+	 */
+	enic->pp.set |= ENIC_PORT_REQUEST_APPLIED;
+
 	return 0;
 }
 
@@ -1411,7 +1413,7 @@ static int enic_get_vf_port(struct net_device *netdev, int vf,
 	int err, error, done;
 	u16 response = PORT_PROFILE_RESPONSE_SUCCESS;
 
-	if (!(enic->pp.set & ENIC_SET_APPLIED))
+	if (!(enic->pp.set & ENIC_PORT_REQUEST_APPLIED))
 		return -ENODATA;
 
 	err = enic_dev_init_done(enic, &done, &error);


^ permalink raw reply related

* Re: [PATCH 0/7] netfilter: netfilter fixes for net-next
From: David Miller @ 2011-01-21  0:38 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <1295554966-5263-1-git-send-email-kaber@trash.net>

From: kaber@trash.net
Date: Thu, 20 Jan 2011 21:22:39 +0100

> Please apply or pull from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git master

Pulled, thanks Patrick.

^ permalink raw reply

* Re: [GIT] Networking
From: Davide Libenzi @ 2011-01-21  0:40 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Colin Walters, Eric Dumazet, David Miller, Andrew Morton, netdev,
	Linux Kernel Mailing List
In-Reply-To: <AANLkTik8dk1o2u+JxzsijYFxJ7Y3ZV16DUNkc-+SYPnu@mail.gmail.com>

On Thu, 20 Jan 2011, Linus Torvalds wrote:

> On Thu, Jan 20, 2011 at 4:02 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > So far I only did a revert, I didn't see exactly _which_ of the wakeup
> > cases it was. But it's definitely that commit.
> 
> This patch - that adds all the appropriate POLLxxx flags - seems to
> fix it for me. Will commit. Anybody wants to review/ack?

I believe you can drop the POLLERR, otherwise looks good to me.


- Davide



^ permalink raw reply

* Re: [PATCH] Ensure that we unshare skbs prior to calling pskb_may_pull in bonding driver
From: David Miller @ 2011-01-21  0:47 UTC (permalink / raw)
  To: nhorman; +Cc: netdev, andy, fubar
In-Reply-To: <1295550151-25913-1-git-send-email-nhorman@tuxdriver.com>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Thu, 20 Jan 2011 14:02:31 -0500

> Recently reported oops:

Applied, but please compose reasonable Subject lines with your patches,
always begin the line with a subsystem tag followed by a colon.

This way we get

	bonding: Foo bar baz

instead of

	Foo bar baz in the bonding driver

Thanks.

^ permalink raw reply

* Re: [PATCH] atl1c: remove private #define.
From: David Miller @ 2011-01-21  0:50 UTC (permalink / raw)
  To: romieu; +Cc: netdev, jcliburn, chris.snook, jie.yang
In-Reply-To: <20110120145906.GA7291@electric-eye.fr.zoreil.com>

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 20 Jan 2011 15:59:06 +0100

> Either unused or duplicates from mii.h.
> 
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Applied.

^ permalink raw reply

* Re: [PATCH] atl1e: remove private #define.
From: David Miller @ 2011-01-21  0:50 UTC (permalink / raw)
  To: romieu; +Cc: netdev, jcliburn, chris.snook, jie.yang
In-Reply-To: <20110120145922.GB7291@electric-eye.fr.zoreil.com>

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 20 Jan 2011 15:59:23 +0100

> Either unused or duplicates from mii.h.
> 
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net: dev_close_many() is static
From: David Miller @ 2011-01-21  0:55 UTC (permalink / raw)
  To: opurdila; +Cc: eric.dumazet, netdev
In-Reply-To: <201101201116.29031.opurdila@ixiacom.com>

From: Octavian Purdila <opurdila@ixiacom.com>
Date: Thu, 20 Jan 2011 11:16:28 +0200

> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thursday 20 January 2011, 09:23:22
> 
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> CC: Octavian Purdila <opurdila@ixiacom.com>
> Oops, missed that. Thanks Eric !
> 
> Reviewed-by: Octavian Purdila <opurdila@ixiacom.com>

Applied.

^ permalink raw reply

* Re: [PATCH] neigh: __rcu annotations
From: David Miller @ 2011-01-21  0:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1295510567.2653.487.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 20 Jan 2011 09:02:47 +0100

> fix some minor issues and sparse (__rcu) warnings
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net_sched: sfq: allow divisor to be a parameter
From: David Miller @ 2011-01-21  0:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, kaber, hawk, jarkao2, hadi, shemminger
In-Reply-To: <1295518498.2825.2.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 20 Jan 2011 11:14:58 +0100

> SFQ currently uses a 1024 slots hash table, and its internal structure
> (sfq_sched_data) allocation needs order-1 page on x86_64
> 
> Allow tc command to specify a divisor value (hash table size), between 1
> and 65536.
> If no value is provided, assume the 1024 default size.
> 
> This allows admins to setup smaller (or bigger) SFQ for specific needs.
> 
> This also brings back sfq_sched_data allocations to order-0 ones, saving
> 3KB per SFQ qdisc.
> 
> Jesper uses ~55.000 SFQ in one machine, this patch should free 165 MB of
> memory.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net_sched: RCU conversion of stab
From: David Miller @ 2011-01-21  0:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, kaber, hawk, jarkao2, hadi
In-Reply-To: <1295531299.2825.175.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 20 Jan 2011 14:48:19 +0100

> This patch converts stab qdisc management to RCU, so that we can perform
> the qdisc_calculate_pkt_len() call before getting qdisc lock.
> 
> This shortens the lock's held time in __dev_xmit_skb().
> 
> This permits more qdiscs to get TCQ_F_CAN_BYPASS status, avoiding lot of
> cache misses and so reducing latencies.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] via-velocity: fix the WOL bug on 1000M full duplex forced mode.
From: David Miller @ 2011-01-21  0:56 UTC (permalink / raw)
  To: romieu; +Cc: netdev, DavidLv
In-Reply-To: <20110120145933.GC7291@electric-eye.fr.zoreil.com>

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 20 Jan 2011 15:59:33 +0100

> The VIA velocity card can't be waken up by WOL tool on 1000M full
> duplex forced mode. This patch fixes the bug.
> 
> Signed-off-by: David Lv <DavidLv@viatech.com.cn>
> Acked-by: Francois Romieu <romieu@fr.zoreil.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net_sched: move TCQ_F_THROTTLED flag
From: David Miller @ 2011-01-21  0:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, kaber, hawk, jarkao2, hadi
In-Reply-To: <1295537236.2825.286.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 20 Jan 2011 16:27:16 +0100

> In commit 371121057607e (net: QDISC_STATE_RUNNING dont need atomic bit
> ops) I moved QDISC_STATE_RUNNING flag to __state container, located in
> the cache line containing qdisc lock and often dirtied fields.
> 
> I now move TCQ_F_THROTTLED bit too, so that we let first cache line read
> mostly, and shared by all cpus. This should speedup HTB/CBQ for example.
> 
> Not using test_bit()/__clear_bit()/__test_and_set_bit allows to use an
> "unsigned int" for __state container, reducing by 8 bytes Qdisc size.
> 
> Introduce helpers to hide implementation details.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net: ipv6: sit: fix rcu annotations
From: David Miller @ 2011-01-21  0:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1295543784.2825.409.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 20 Jan 2011 18:16:24 +0100

> Fix minor __rcu annotations and remove sparse warnings
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] ipv6: raw: rcu annotations
From: David Miller @ 2011-01-21  0:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1295545073.2825.436.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 20 Jan 2011 18:37:53 +0100

> Remove sparse warnings, using a function typedef to be able to use __rcu
> annotation on mh_filter pointer.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [net-next-2.6 PATCH] enic: Bug Fix: Dont reset ENIC_SET_APPLIED flag on port profile disassociate
From: David Miller @ 2011-01-21  0:57 UTC (permalink / raw)
  To: roprabhu; +Cc: netdev
In-Reply-To: <20110121003554.25697.15096.stgit@savbu-pc100.cisco.com>

From: Roopa Prabhu <roprabhu@cisco.com>
Date: Thu, 20 Jan 2011 16:35:54 -0800

> From: Roopa Prabhu <roprabhu@cisco.com>
> 
> enic_get_vf_port returns port profile operation status only if ENIC_SET_APPLIED
> flag is set. A recent rework of enic_set_port_profile added code to reset this
> flag on disassociate. As a result of which a client calling enic_get_vf_port
> to get the status of port profile disassociate will always get a return value
> of ENODATA. This patch renames ENIC_SET_APPLIED to more appropriate
> ENIC_PORT_REQUEST_APPLIED and reverts back the recent change so that the
> flag is set both at associate and disassociate of a port profile.
> 
> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
> Signed-off-by: David Wang <dwang2@cisco.com>
> Signed-off-by: Christian Benvenuti <benve@cisco.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-2.6] cxgb4: fix reported state of interfaces without link
From: David Miller @ 2011-01-21  1:00 UTC (permalink / raw)
  To: dm; +Cc: netdev
In-Reply-To: <1295486945-22015-1-git-send-email-dm@chelsio.com>

From: Dimitris Michailidis <dm@chelsio.com>
Date: Wed, 19 Jan 2011 17:29:05 -0800

> Currently tools like ip and ifconfig report incorrect state for cxgb4
> interfaces that are up but do not have link and do so until first link
> establishment.  This is because the initial netif_carrier_off call is
> before register_netdev and it needs to be after to be fully effective.
> Fix this by moving netif_carrier_off into .ndo_open.
> 
> Signed-off-by: Dimitris Michailidis <dm@chelsio.com>

Applied.

^ permalink raw reply

* Re: [PATCH clean-up] dccp: clean up unused DCCP_STATE_MASK definition
From: David Miller @ 2011-01-21  1:00 UTC (permalink / raw)
  To: gerrit; +Cc: shanwei, acme, dccp, netdev
In-Reply-To: <58207.148.187.160.35.1295523521.squirrel@148.187.160.35>

From: gerrit@erg.abdn.ac.uk
Date: Thu, 20 Jan 2011 11:38:41 -0000 (GMT)

>> Remove unused DCCP_STATE_MASK macro.
>>
>>
>> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>

Applied.

^ permalink raw reply

* linux-next: build failure after merge of the net tree
From: Stephen Rothwell @ 2011-01-21  1:05 UTC (permalink / raw)
  To: David Miller, netdev
  Cc: linux-next, linux-kernel, Pablo Neira Ayuso, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

Hi all,

After merging the net tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ERROR: ".nf_conntrack_tstamp_fini" [net/netfilter/nf_conntrack.ko] undefined!
ERROR: ".nf_conntrack_tstamp_init" [net/netfilter/nf_conntrack.ko] undefined!

Presumably caused by commit a992ca2a0498edd22a88ac8c41570f536de29c9e
("netfilter: nf_conntrack_tstamp: add flow-based timestamp extension").

I have used the net tree from next-20110120 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: linux-next: build failure after merge of the net tree
From: David Miller @ 2011-01-21  1:10 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, pablo, kaber
In-Reply-To: <20110121120553.5e827247.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 21 Jan 2011 12:05:53 +1100

> Hi all,
> 
> After merging the net tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> ERROR: ".nf_conntrack_tstamp_fini" [net/netfilter/nf_conntrack.ko] undefined!
> ERROR: ".nf_conntrack_tstamp_init" [net/netfilter/nf_conntrack.ko] undefined!
> 
> Presumably caused by commit a992ca2a0498edd22a88ac8c41570f536de29c9e
> ("netfilter: nf_conntrack_tstamp: add flow-based timestamp extension").
> 
> I have used the net tree from next-20110120 for today.

I just pushed a fix into net-next-2.6 to cure this a few minutes ago.

^ permalink raw reply

* Re: Flow Control and Port Mirroring Revisited
From: Simon Horman @ 2011-01-20  8:38 UTC (permalink / raw)
  To: Rick Jones
  Cc: Michael S. Tsirkin, Jesse Gross, Rusty Russell, virtualization,
	dev, virtualization, netdev, kvm
In-Reply-To: <4D35ECE2.4040901@hp.com>

[ Trimmed Eric from CC list as vger was complaining that it is too long ]

On Tue, Jan 18, 2011 at 11:41:22AM -0800, Rick Jones wrote:
> >So it won't be all that simple to implement well, and before we try,
> >I'd like to know whether there are applications that are helped
> >by it. For example, we could try to measure latency at various
> >pps and see whether the backpressure helps. netperf has -b, -w
> >flags which might help these measurements.
> 
> Those options are enabled when one adds --enable-burst to the
> pre-compilation ./configure  of netperf (one doesn't have to
> recompile netserver).  However, if one is also looking at latency
> statistics via the -j option in the top-of-trunk, or simply at the
> histogram with --enable-histogram on the ./configure and a verbosity
> level of 2 (global -v 2) then one wants the very top of trunk
> netperf from:

Hi,

I have constructed a test where I run an un-paced  UDP_STREAM test in
one guest and a paced omni rr test in another guest at the same time.
Breifly I get the following results from the omni test..

1. Omni test only:		MEAN_LATENCY=272.00
2. Omni and stream test:	MEAN_LATENCY=3423.00
3. cpu and net_cls group:	MEAN_LATENCY=493.00
   As per 2 plus cgoups are created for each guest
   and guest tasks added to the groups
4. 100Mbit/s class:		MEAN_LATENCY=273.00
   As per 3 plus the net_cls groups each have a 100MBit/s HTB class
5. cpu.shares=128:		MEAN_LATENCY=652.00
   As per 4 plus the cpu groups have cpu.shares set to 128
6. Busy CPUS:			MEAN_LATENCY=15126.00
   As per 5 but the CPUs are made busy using a simple shell while loop

There is a bit of noise in the results as the two netperf invocations
aren't started at exactly the same moment

For reference, my netperf invocations are:
netperf -c -C -t UDP_STREAM -H 172.17.60.216 -l 12
netperf.omni -p 12866 -D -c -C -H 172.17.60.216 -t omni -j -v 2 -- -r 1 -d rr -k foo -b 1 -w 200 -m 200

foo contains
PROTOCOL
THROUGHPUT,THROUGHPUT_UNITS
LOCAL_SEND_THROUGHPUT
LOCAL_RECV_THROUGHPUT
REMOTE_SEND_THROUGHPUT
REMOTE_RECV_THROUGHPUT
RT_LATENCY,MIN_LATENCY,MEAN_LATENCY,MAX_LATENCY
P50_LATENCY,P90_LATENCY,P99_LATENCY,STDDEV_LATENCY
LOCAL_CPU_UTIL,REMOTE_CPU_UTIL


^ permalink raw reply

* Re: Flow Control and Port Mirroring Revisited
From: Rick Jones @ 2011-01-21  2:30 UTC (permalink / raw)
  To: Simon Horman
  Cc: Michael S. Tsirkin, Jesse Gross, Rusty Russell, virtualization,
	dev, virtualization, netdev, kvm
In-Reply-To: <20110120083727.GA1807@verge.net.au>

Simon Horman wrote:
> [ Trimmed Eric from CC list as vger was complaining that it is too long ]
>...
> I have constructed a test where I run an un-paced  UDP_STREAM test in
> one guest and a paced omni rr test in another guest at the same time.
> Breifly I get the following results from the omni test..
> 
>...
 >
> There is a bit of noise in the results as the two netperf invocations
> aren't started at exactly the same moment
> 
> For reference, my netperf invocations are:
> netperf -c -C -t UDP_STREAM -H 172.17.60.216 -l 12
> netperf.omni -p 12866 -D -c -C -H 172.17.60.216 -t omni -j -v 2 -- -r 1 -d rr -k foo -b 1 -w 200 -m 200

Since the -b and -w are in the test-specific portion, this test was not actually 
  paced. The -w will have been ignored entirely (IIRC) and the -b will have 
attempted to set the "burst" size of a --enable-burst ./configured netperf.  If 
netperf was ./configured that way, it will have had two rr transactions in 
flight at one time - the "regular" one and then the one additional from the -b 
option.  If netperf was not ./configured with --enable-burst then a warning 
message should have been emitted.

Also, I am guessing you wanted TCP_NODELAY set, and that is -D but not a global 
-D.  I'm reasonably confident the -m 200 will have been ignored, but it would be 
best to drop it. So, I think your second line needs to be:

netperf.omni -p 12866 -c -C -H  172.17.60.216 -t omni -j -v 2 -b 1 -w 200 -- -r 
1 -d rr -k foo -D

If you want the request and response sizes to be 200 bytes, use -r 200 
(test-specific).

Also, if you ./configure with --enable-omni first, that netserver will 
understand both omni and non-omni tests at the same time and you don't have to 
have a second netserver on a different control port.  You can also go-in to 
config.h after the ./configure and unset WANT_MIGRATION and then UDP_STREAM in 
netperf will be the "true" classic UDP_STREAM code rather than the migrated to 
omni path.

> foo contains
> PROTOCOL
> THROUGHPUT,THROUGHPUT_UNITS
> LOCAL_SEND_THROUGHPUT
> LOCAL_RECV_THROUGHPUT
> REMOTE_SEND_THROUGHPUT
> REMOTE_RECV_THROUGHPUT
> RT_LATENCY,MIN_LATENCY,MEAN_LATENCY,MAX_LATENCY
> P50_LATENCY,P90_LATENCY,P99_LATENCY,STDDEV_LATENCY
> LOCAL_CPU_UTIL,REMOTE_CPU_UTIL

As the -k file parsing option didn't care until recently (within the hour or 
so), I think it didn't matter that you had more than four lines (assuming that 
is a verbatim cat of foo).  However, if you pull the *current* top of trunk, it 
will probably start to care - I'm in the midst of adding support for "direct 
output selection" in the -k, -o and -O options and also cleaning-up the omni 
printing code to the point where there is only the one routing parsing the 
output selection file.  Currently that is the one for "human" output, which has 
a four line restriction.  I will try to make it smarter as I go.

happy benchmarking,

rick jones

^ permalink raw reply

* Re: [PATCH v3] net: add Faraday FTMAC100 10/100 Ethernet driver
From: Po-Yu Chuang @ 2011-01-21  3:35 UTC (permalink / raw)
  To: Joe Perches
  Cc: netdev, linux-kernel, bhutchings, eric.dumazet, dilinger,
	Po-Yu Chuang
In-Reply-To: <1295546179.28001.4.camel@Joe-Laptop>

Dear Joe,

On Fri, Jan 21, 2011 at 1:56 AM, Joe Perches <joe@perches.com> wrote:
> On Thu, 2011-01-20 at 23:30 +0800, Po-Yu Chuang wrote:
>> From: Po-Yu Chuang <ratbert@faraday-tech.com>
> []
>> +     /* map io memory */
>> +     priv->res = request_mem_region(res->start, res->end - res->start,
>> +                                    dev_name(&pdev->dev));
>
> Off by one?
>
>        priv->res = request_mem_region(res->start, resource_size(res),
>                                       dev_name(&pdev->dev));

Fixed.

best regards,
Po-Yu Chuang

^ permalink raw reply

* Re: [PATCH v3] net: add Faraday FTMAC100 10/100 Ethernet driver
From: Po-Yu Chuang @ 2011-01-21  3:37 UTC (permalink / raw)
  To: Michał Mirosław
  Cc: netdev, linux-kernel, bhutchings, eric.dumazet, joe, dilinger,
	Po-Yu Chuang
In-Reply-To: <AANLkTimFcEC0oXJGnJ7HQKLB9thfuWHeWSYSMCGR=hWJ@mail.gmail.com>

Dear Michał ,

2011/1/21 Michał Mirosław <mirqus@gmail.com>:
> 2011/1/20 Po-Yu Chuang <ratbert.chuang@gmail.com>:
> [...]
>> +/******************************************************************************
>> + * internal functions (receive descriptor)
>> + *****************************************************************************/
>> +static bool ftmac100_rxdes_first_segment(struct ftmac100_rxdes *rxdes)
>> +{
>> +       return le32_to_cpu(rxdes->rxdes0) & FTMAC100_RXDES0_FRS;
>> +}
>> +
>> +static bool ftmac100_rxdes_last_segment(struct ftmac100_rxdes *rxdes)
>> +{
>> +       return le32_to_cpu(rxdes->rxdes0) & FTMAC100_RXDES0_LRS;
>> +}
>> +
> [...]
>
> You can change these and similar functions to use:
>
> rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_LRS)
>
> This will be subject to constant folding by compiler and produce
> better code for big-endian arches.

Fixed. It looks much better now.
Thanks a lot.

best regards,
Po-Yu Chuang

^ permalink raw reply

* Re: [PATCH v3] net: add Faraday FTMAC100 10/100 Ethernet driver
From: Po-Yu Chuang @ 2011-01-21  5:03 UTC (permalink / raw)
  To: Joe Perches
  Cc: netdev, linux-kernel, bhutchings, eric.dumazet, dilinger,
	Po-Yu Chuang
In-Reply-To: <1295550009.28001.59.camel@Joe-Laptop>

Dear Joe,

On Fri, Jan 21, 2011 at 3:00 AM, Joe Perches <joe@perches.com> wrote:
> On Thu, 2011-01-20 at 23:30 +0800, Po-Yu Chuang wrote:
>>  drivers/net/ftmac100.c | 1243 ++++++++++++++++++++++++++++++++++++++++++++++++
>
> []
>
>> +/******************************************************************************
>> + * struct napi_struct functions
>> + *****************************************************************************/
>> +static int ftmac100_poll(struct napi_struct *napi, int budget)
>> +{
>> +     struct ftmac100 *priv = container_of(napi, struct ftmac100, napi);
>> +     struct net_device *netdev = priv->netdev;
>> +     unsigned int status;
>> +     bool completed = true;
>> +     int rx = 0;
>> +
>> +     status = ioread32(priv->base + FTMAC100_OFFSET_ISR);
>> +
>> +     if (status & (FTMAC100_INT_RPKT_FINISH | FTMAC100_INT_NORXBUF)) {
>> +             /*
>> +              * FTMAC100_INT_RPKT_FINISH:
>> +              *      RX DMA has received packets into RX buffer successfully
>> +              *
>> +              * FTMAC100_INT_NORXBUF:
>> +              *      RX buffer unavailable
>> +              */
>> +             bool retry;
>> +
>> +             do {
>> +                     retry = ftmac100_rx_packet(priv, &rx);
>> +             } while (retry && rx < budget);
>> +
>> +             if (retry && rx == budget)
>> +                     completed = false;
>
> Is it useful to retry the NORXBUF case?

The idea is that if I miss packet finished interrupts (then rx buffers used up),
I should retrieve the received packets ASAP to free buffers to HW.
Maybe this is really unnecessary.
I am not quite sure, but I'll do your advice now.

>> +     }
>> +
>> +     if (status & FTMAC100_INT_NORXBUF) {
>> +             /* RX buffer unavailable */
>> +             if (net_ratelimit())
>> +                     netdev_info(netdev, "INT_NORXBUF\n");
>> +
>> +             netdev->stats.rx_over_errors++;
>> +     }
>
> Perhaps this "if (status & FTMAC100_INT_NORXBUF)" block should be
> moved into the test block above it before the retry?

Since status is not changed in the function, it does not matter where
the test is.
But I agree that it is better to handle error cases earlier.

> It's possible to miss multiple states because of the ratelimit.
>
> If multiple ISR status bits are possible, it might be better to
> combine all netdev_info uses into a single call.
>
> Something like:
>
>        if ((status & (FTMAC100_INT_NORXBUF | FTMAC100_INT_RPKT_LOST |
>                       FTMAC100_INT_AHB_ERR | FTMAC100_INT_PHYSTS_CHG)) &&
>            net_ratelimit())
>                netdev_info(netdev, "ISR status: %x%s%s%s%s\n",
>                            status & FTMAC100_INT_NORXBUF ? ": INT_NORXBUF" : "",
>                            status & FTMAC100_INT_RPKT_LOST ? ": INT_RPKT_LOST" : "",
>                            status & FTMAC100_INT_AHB_ERR ? ": INT_AHB_ERR" : "",
>                            status & FTMAC100_INT_PHYSTS_CHG ? " : INT_PHYSTS_CHG" : "");

Agree. Thanks.

best regards,
Po-Yu Chuang

^ permalink raw reply

* [PATCH net-next-2.6] net: netif_setup_tc() is static
From: Eric Dumazet @ 2011-01-21  5:18 UTC (permalink / raw)
  To: David Miller, John Fastabend
  Cc: bhutchings, jarkao2, hadi, shemminger, tgraf, nhorman, netdev
In-Reply-To: <20110119.234132.176672734.davem@davemloft.net>

Le mercredi 19 janvier 2011 à 23:41 -0800, David Miller a écrit :
> From: John Fastabend <john.r.fastabend@intel.com>
> Date: Mon, 17 Jan 2011 10:06:04 -0800
> 
> > This patch provides a mechanism for lower layer devices to
> > steer traffic using skb->priority to tx queues.
>  ...
> > Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> 
> Applied.

Hi John

Should netif_setup_tc() be static, or is it meant to be exported
somehow ?

[PATCH net-next-2.6] net: netif_setup_tc() is static

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index 2730352..47d3d78 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1605,7 +1605,7 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
  * expected that drivers will fix this mapping if they can before
  * calling netif_set_real_num_tx_queues.
  */
-void netif_setup_tc(struct net_device *dev, unsigned int txq)
+static void netif_setup_tc(struct net_device *dev, unsigned int txq)
 {
 	int i;
 	struct netdev_tc_txq *tc = &dev->tc_to_txq[0];



^ permalink raw reply related


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