Netdev List
 help / color / mirror / Atom feed
* Re: 10GBE performance drop with net.ipv4.tcp_timestamps=0
From: Eric Dumazet @ 2012-06-20  8:41 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: Linux Netdev List
In-Reply-To: <4FE1881B.7030800@profihost.ag>

On Wed, 2012-06-20 at 10:21 +0200, Stefan Priebe - Profihost AG wrote:
> Am 20.06.2012 09:22, schrieb Eric Dumazet:
> > On Wed, 2012-06-20 at 09:00 +0200, Stefan Priebe - Profihost AG wrote:
> >> Am 19.06.2012 23:31, schrieb Eric Dumazet:
> >> Before:
> >> http://pastebin.com/raw.php?i=1gVraWVc
> >>
> >> After:
> >> http://pastebin.com/raw.php?i=NSh8Y29s
> >
> > You have a lot of packet losses
> But this ONLY happens with tcp_timestamps=0.
> 

Yes, you already told that in subject line.

single tcp flow ?

You seem to have a switch or something that drops packets in this case.

You could try to rate limit to 9Gb/s and see if it is better.

Here, I roughly have same bandwidth with tcp_timestamps on or off, with
ixgbe cards and net-next kernels.

^ permalink raw reply

* Re: linux-next: build failure after merge of the net-next tree
From: Marc Kleine-Budde @ 2012-06-20  8:31 UTC (permalink / raw)
  To: Bhupesh SHARMA
  Cc: David Miller, sfr@canb.auug.org.au, netdev@vger.kernel.org,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	federico.vaga@gmail.com, Giancarlo ASNAGHI, wg@grandegger.com
In-Reply-To: <D5ECB3C7A6F99444980976A8C6D896384FAA275CBE@EAPEX1MAIL1.st.com>

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

On 06/20/2012 06:45 AM, Bhupesh SHARMA wrote:
> Hi David,
> 
>> -----Original Message-----
>> From: David Miller [mailto:davem@davemloft.net]
>> Sent: Wednesday, June 20, 2012 10:07 AM
>> To: Bhupesh SHARMA
>> Cc: sfr@canb.auug.org.au; netdev@vger.kernel.org; linux-
>> next@vger.kernel.org; linux-kernel@vger.kernel.org;
>> federico.vaga@gmail.com; Giancarlo ASNAGHI; wg@grandegger.com;
>> mkl@pengutronix.de
>> Subject: Re: linux-next: build failure after merge of the net-next tree
>>
>> From: Bhupesh SHARMA <bhupesh.sharma@st.com>
>> Date: Wed, 20 Jun 2012 12:27:11 +0800
>>
>>> clk_get/clk_put* variants are usually used by ARM platforms.
>>> Protecting their calls under macro 'CONFIG_HAVE_CLK' should solve the
>> problem.
>>
>> No, we don't pepper foo.c files with crappy ifdefs.
> 
> So, whether adding a check in Kconfig for HAVE_CLK be a proper solution ?
> But that will limit the compilation of this driver for only platforms which are ARM based.
> 
> One may need to support this driver on x86 like platforms also..

I think the driver is currently used/tested only on ARM only, so what
about adding a HAVE_CLK dependency, until Viresh Kumar's patches are
available in net-next. Later we can remove it.

regards, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply

* Re: 10GBE performance drop with net.ipv4.tcp_timestamps=0
From: Stefan Priebe - Profihost AG @ 2012-06-20  8:21 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Linux Netdev List
In-Reply-To: <1340176940.4604.801.camel@edumazet-glaptop>

Am 20.06.2012 09:22, schrieb Eric Dumazet:
> On Wed, 2012-06-20 at 09:00 +0200, Stefan Priebe - Profihost AG wrote:
>> Am 19.06.2012 23:31, schrieb Eric Dumazet:
>> Before:
>> http://pastebin.com/raw.php?i=1gVraWVc
>>
>> After:
>> http://pastebin.com/raw.php?i=NSh8Y29s
>
> You have a lot of packet losses
But this ONLY happens with tcp_timestamps=0.


> add "tc -s -d qdisc" , "ifconfig -a " and "ethtool -S ethX" outputs for
> both servers

eth2 is the 10Gb device on both systems
server a has kernel 3.5 server b has rhel 6 kernel

Server A:
# tc -s -d qdisc
RTNETLINK answers: Operation not supported
Dump terminated

Server B (eth2 is the 10GB/s device):
# tc -s -d qdisc
qdisc mq 0: dev eth0 root
  Sent 55151 bytes 555 pkt (dropped 0, overlimits 0 requeues 0)
  rate 0bit 0pps backlog 0b 0p requeues 0
qdisc mq 0: dev eth2 root
  Sent 38374148475 bytes 2774405 pkt (dropped 0, overlimits 0 requeues 4)
  rate 0bit 0pps backlog 0b 0p requeues 4

ifconfig -a:
http://pastebin.com/raw.php?i=M3QHQjSU

ethtool -S:
http://pastebin.com/raw.php?i=Eap05xKc

Thanks again,
Stefan

^ permalink raw reply

* Re: linux-next: build failure after merge of the net-next tree
From: David Miller @ 2012-06-20  8:20 UTC (permalink / raw)
  To: viresh.kumar2
  Cc: bhupesh.sharma, sfr, netdev, linux-next, linux-kernel,
	federico.vaga, giancarlo.asnaghi, wg, mkl, spear-devel
In-Reply-To: <4FE18502.6040409@arm.com>

From: viresh kumar <viresh.kumar2@arm.com>
Date: Wed, 20 Jun 2012 09:08:34 +0100

> Please see following patchset from me, that got applied in linux-next
> 
> https://lkml.org/lkml/2012/4/24/154
> 
> Please check if this patchset is present in your build repo. I believe it should be
> there. If it is, then you shouldn't get these errors.

Well, then Stephen shouldn't get those errors either.

But obviously he did.

But all of this talk about changes existing only in linux-next is
entirely moot.  Because The damn thing MUST build independently inside
of net-next which doesn't have those clock layer changes.

Someone send me a clean fix for net-next now.

^ permalink raw reply

* Re: [PATCH] net: Update netdev_alloc_frag to work more efficiently with TCP and GRO
From: Eric Dumazet @ 2012-06-20  8:17 UTC (permalink / raw)
  To: Alexander Duyck; +Cc: netdev, davem, jeffrey.t.kirsher
In-Reply-To: <1340170590.4604.784.camel@edumazet-glaptop>

On Wed, 2012-06-20 at 07:36 +0200, Eric Dumazet wrote:

> I tested this idea one month ago and got not convincing results, because
> the branch was taken half of the time.
> 
> The cases where page can be reused is probably specific to ixgbe because
> it uses a different allocator for the frags themselves.
> netdev_alloc_frag() is only used to allocate the skb head.
> 
> For typical nics, we allocate frags to populate the RX ring _way_ before
> packet is received by the NIC.
> 
> Then, I played with using order-2 pages instead of order-0 ones if
> PAGE_SIZE < 8192.
> 
> No clear win either, but you might try this too.

By the way, big cost in netdev_alloc_frag() is the irq masking/restore
We probably could have a version for softirq users...

Another idea would also use a pool of pages, instead of a single one,
if we want to play with the "clear the offset if page count is one"
idea.

Strange, I did again benchs with order-2 allocations and got good
results this time, but with latest net-next, maybe things have changed
since last time I did this.

(netdev_alloc_frag(), get_page_from_freelist() and put_page() less
prevalent in perf results)

^ permalink raw reply

* Re: linux-next: build failure after merge of the net-next tree
From: viresh kumar @ 2012-06-20  8:08 UTC (permalink / raw)
  To: Bhupesh SHARMA, Stephen Rothwell, David Miller
  Cc: netdev@vger.kernel.org, linux-next@vger.kernel.org,
	linux-kernel@vger.kernel.org, Federico Vaga, Giancarlo ASNAGHI,
	Wolfgang Grandegger, Marc Kleine-Budde, spear-devel
In-Reply-To: <D5ECB3C7A6F99444980976A8C6D896384FAA275CA8@EAPEX1MAIL1.st.com>

On 20/06/12 05:27, Bhupesh SHARMA wrote:
>> -----Original Message-----
>> From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
>> Sent: Wednesday, June 20, 2012 9:04 AM
>> To: David Miller; netdev@vger.kernel.org
>> Cc: linux-next@vger.kernel.org; linux-kernel@vger.kernel.org; Federico
>> Vaga; Giancarlo ASNAGHI; Wolfgang Grandegger; Bhupesh SHARMA; Marc
>> Kleine-Budde
>> Subject: linux-next: build failure after merge of the net-next tree
>>
>> Hi all,
>>
>> After merging the net-next tree, today's linux-next build (x86_64
>> allmodconfig) failed like this:
>>
>> ERROR: "clk_get_rate" [drivers/net/can/c_can/c_can_pci.ko] undefined!
>> ERROR: "clk_get" [drivers/net/can/c_can/c_can_pci.ko] undefined!
>> ERROR: "clk_put" [drivers/net/can/c_can/c_can_pci.ko] undefined!
>>
>> Caused by commit 5b92da0443c2 ("c_can_pci: generic module for
>> C_CAN/D_CAN on PCI").  Maybe a missing Kconfig dependency/select?
>>
>> I have used the net-next tree from next-20120619 for today.
>> --
>
> clk_get/clk_put* variants are usually used by ARM platforms.
> Protecting their calls under macro 'CONFIG_HAVE_CLK' should solve the problem.
>
> See [1] for how it is done in c_can_platform.c
>
> Could you possibly add these checks and send a patch for the same?
> It should be fairly simple.

Hi Bhupesh,

Please see following patchset from me, that got applied in linux-next

https://lkml.org/lkml/2012/4/24/154

Please check if this patchset is present in your build repo. I believe it should be
there. If it is, then you shouldn't get these errors.

--
viresh

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

^ permalink raw reply

* Re: [PATCH] usbnet: Activate halt interrupt endpoint before re-submit URB
From: Ming Lei @ 2012-06-20  8:07 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Huajun Li, David Miller, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <201206201000.21845.oneukum-l3A5Bk7waGM@public.gmane.org>

On Wed, Jun 20, 2012 at 4:00 PM, Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org> wrote:
>
> Very well, on second thought, this patch makes sense.
> Could you resend and I'll ack?

BTW, maybe it is better to add below

    usbnet_defer_kevent(dev, EVENT_STS_HALT);

for -EPIPE returned from usb_urb_submit if it will be resent.

thanks,
-- 
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] usbnet: Activate halt interrupt endpoint before re-submit URB
From: Oliver Neukum @ 2012-06-20  8:00 UTC (permalink / raw)
  To: Huajun Li
  Cc: David Miller, tom.leiming-Re5JQEeQqe8AvxtiuMwx3w,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <CA+v9cxZG6b1O7kOQpeTELtv0vHzqy-8NH84boMpim0BM+tp1eQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Am Montag, 18. Juni 2012, 18:25:15 schrieb Huajun Li:
> On Mon, Jun 18, 2012 at 3:23 PM, Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org> wrote:
> > Am Montag, 18. Juni 2012, 01:30:17 schrieb David Miller:
> >> From: Huajun Li <huajun.li.lee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> Date: Wed, 13 Jun 2012 20:50:31 +0800
> >>
> >> > intr_complete() submits URB even the interrupt endpoint stalls.
> >> > This patch will try to activate the endpoint once the exception
> >> > occurs, and then re-submit the URB if the endpoint works again.
> >> >
> >> > Signed-off-by: Huajun Li <huajun.li.lee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >>
> >> Review from USB experts would be appreciated.
> >
> > The code implements a minimum error handler correctly.
> > Did you observe a stall in actual hardware or is this a just
> > in case patch?
> >
> 
> This one is just a patch, thanks for your comments.

Very well, on second thought, this patch makes sense.
Could you resend and I'll ack?

	Regards
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] netxen: Error return off by one in 'netxen_nic_set_pauseparam()'.
From: santosh prasad nayak @ 2012-06-20  7:59 UTC (permalink / raw)
  To: Dan Carpenter, rajesh.borundia; +Cc: sony.chacko, netdev, kernel-janitors
In-Reply-To: <20120620074447.GS4400@mwanda>

On Wed, Jun 20, 2012 at 1:14 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Wed, Jun 20, 2012 at 12:57:39PM +0530, santosh nayak wrote:
>> From: Santosh Nayak <santoshprasadnayak@gmail.com>
>>
>> There are 'NETXEN_NIU_MAX_GBE_PORTS'  GBE ports. Port indexing starts
>> from zero.
>> Hence we should also return error for "port == NETXEN_NIU_MAX_GBE_PORTS"
>>
>
> I don't know this code well enough to say if you are right or not,
> but what about for port == NETXEN_NIU_MAX_XG_PORTS a few lines later
> in both functions?


I think "for port == NETXEN_NIU_MAX_XG_PORTS"  error should be returned.


@Rajesh,

Can you please comment on it ?


regards
santosh

>
> regards,
> dan carpenter
>

^ permalink raw reply

* Re: [PATCH] netxen: Error return off by one in 'netxen_nic_set_pauseparam()'.
From: Dan Carpenter @ 2012-06-20  7:57 UTC (permalink / raw)
  To: santosh nayak; +Cc: sony.chacko, rajesh.borundia, netdev, kernel-janitors
In-Reply-To: <1340177259-14083-1-git-send-email-santoshprasadnayak@gmail.com>

On Wed, Jun 20, 2012 at 12:57:39PM +0530, santosh nayak wrote:
> From: Santosh Nayak <santoshprasadnayak@gmail.com>
> 
> There are 'NETXEN_NIU_MAX_GBE_PORTS'  GBE ports. Port indexing starts
> from zero. 
> Hence we should also return error for "port == NETXEN_NIU_MAX_GBE_PORTS"
> 

So my understanding is that you are guessing on this based on the
fact that, "Who counts from 0-4 inclusive?".  I can't argue with
that logic.

Looking some more at NETXEN_NIU_MAX_XG_PORTS.  It is used off by one
4 times and it's used correctly 1 time.

regards,
dan carpenter

^ permalink raw reply

* Re: [PATCH v3] ipv4: Early TCP socket demux.
From: David Miller @ 2012-06-20  7:57 UTC (permalink / raw)
  To: ja; +Cc: netdev
In-Reply-To: <alpine.LFD.2.00.1206200937040.1912@ja.ssi.bg>

From: Julian Anastasov <ja@ssi.bg>
Date: Wed, 20 Jun 2012 10:00:37 +0300 (EEST)

> 			if (skb->dev != dst->dev)
> 				dst = NULL;

That makes the most sense.

> 	Also, is it a good idea to hide such optimizations
> in a bit mask:
> 
> sysctl_net_optimizations & 1: optimize for end host
> sysctl_net_optimizations & 2: optimize for router
> ...

God, that's ugly as sin.

We're putting this down into GRO, so people can tune with
an existing knob there as they already do.

^ permalink raw reply

* Re: [PATCH -v1 0/3] usbnet: usbnet: PM related fixes
From: Oliver Neukum @ 2012-06-20  7:46 UTC (permalink / raw)
  To: Ming Lei; +Cc: David S. Miller, Greg Kroah-Hartman, netdev, linux-usb
In-Reply-To: <1340176553-32225-1-git-send-email-ming.lei@canonical.com>

Am Mittwoch, 20. Juni 2012, 09:15:50 schrieb Ming Lei:
> Hi David,
> 
> The 3 patches fix some PM related problems.

The first two patches should go into stable.
Could you send them?

	Regards
		Oliver

^ permalink raw reply

* Re: [PATCH -v1 3/3] usbnet: handle remote wakeup asap
From: Oliver Neukum @ 2012-06-20  7:46 UTC (permalink / raw)
  To: Ming Lei; +Cc: David S. Miller, Greg Kroah-Hartman, netdev, linux-usb
In-Reply-To: <1340176553-32225-4-git-send-email-ming.lei@canonical.com>

Am Mittwoch, 20. Juni 2012, 09:15:53 schrieb Ming Lei:
> If usbnet is resumed by remote wakeup, generally there are
> some packets comming to be handled, so allocate and submit
> rx URBs in usbnet_resume to avoid delays introduced by tasklet.
> Otherwise, usbnet may have been runtime suspended before the
> usbnet_bh is executed to schedule Rx URBs.
> 
> Without the patch, usbnet can't recieve any packets from peer
> in runtime suspend state if runtime PM is enabled and
> autosuspend_delay is set as zero.
> 
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
Acked-by: Oliver Neukum <oneukum@suse.de>

^ permalink raw reply

* Re: [PATCH -v1 2/3] usbnet: decrease suspend count if returning -EBUSY for runtime suspend
From: Oliver Neukum @ 2012-06-20  7:45 UTC (permalink / raw)
  To: Ming Lei
  Cc: David S. Miller, Greg Kroah-Hartman,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1340176553-32225-3-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

Am Mittwoch, 20. Juni 2012, 09:15:52 schrieb Ming Lei:
> This patch decreases dev->suspend_count in the -EBUSY failure path
> of usbnet_suspend. Without the change, the later runtime suspend
> will do nothing except for increasing dev->suspend_count.
> 
> Signed-off-by: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Acked-by: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] netxen: Error return off by one in 'netxen_nic_set_pauseparam()'.
From: Dan Carpenter @ 2012-06-20  7:44 UTC (permalink / raw)
  To: santosh nayak; +Cc: sony.chacko, rajesh.borundia, netdev, kernel-janitors
In-Reply-To: <1340177259-14083-1-git-send-email-santoshprasadnayak@gmail.com>

On Wed, Jun 20, 2012 at 12:57:39PM +0530, santosh nayak wrote:
> From: Santosh Nayak <santoshprasadnayak@gmail.com>
> 
> There are 'NETXEN_NIU_MAX_GBE_PORTS'  GBE ports. Port indexing starts
> from zero. 
> Hence we should also return error for "port == NETXEN_NIU_MAX_GBE_PORTS"
> 

I don't know this code well enough to say if you are right or not,
but what about for port == NETXEN_NIU_MAX_XG_PORTS a few lines later
in both functions?

regards,
dan carpenter

^ permalink raw reply

* Re: [PATCH -v1 1/3] usbnet: clear OPEN flag in failure path
From: Oliver Neukum @ 2012-06-20  7:44 UTC (permalink / raw)
  To: Ming Lei; +Cc: David S. Miller, Greg Kroah-Hartman, netdev, linux-usb
In-Reply-To: <1340176553-32225-2-git-send-email-ming.lei@canonical.com>

Am Mittwoch, 20. Juni 2012, 09:15:51 schrieb Ming Lei:
> Without clearing OPEN flag in failure path, runtime or system resume
> may submit interrupt/rx URB and start tx queue mistakenly on a
> interface in DOWN state.
> 
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
Acked-by: Oliver Neukum <oneukum@suse.de>

^ permalink raw reply

* Re: [PATCH 02.5] mm: sl[au]b: first remove PFMEMALLOC flag then SLAB flag
From: Mel Gorman @ 2012-06-20  7:38 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Andrew Morton, Linux-MM, Linux-Netdev, LKML, David Miller,
	Neil Brown, Peter Zijlstra, Mike Christie, Eric B Munson
In-Reply-To: <20120615155432.GA5498@breakpoint.cc>

On Fri, Jun 15, 2012 at 05:54:32PM +0200, Sebastian Andrzej Siewior wrote:
> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> 
> If we first remove the SLAB flag followed by the PFMEMALLOC flag then the
> removal of the latter will trigger the VM_BUG_ON() as it can be seen in
> | kernel BUG at include/linux/page-flags.h:474!
> | invalid opcode: 0000 [#1] PREEMPT SMP
> | Call Trace:
> |  [<c10e2d77>] slab_destroy+0x27/0x70
> |  [<c10e3285>] drain_freelist+0x55/0x90
> |  [<c10e344e>] __cache_shrink+0x6e/0x90
> |  [<c14e3211>] ? acpi_sleep_init+0xcf/0xcf
> |  [<c10e349d>] kmem_cache_shrink+0x2d/0x40
> 
> because the SLAB flag is gone. This patch simply changes the order.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Grr, yes of course. Thanks very much. I've folded this into patch 2 and
preserved credit.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Warning! Your mailbox is almost full.
From: Publishers Clearing House @ 2012-06-20  7:29 UTC (permalink / raw)


Congratulations, your email address has won ($1,000,000.00USD) in the  
on going Publishers Clearing House loto draw that was held today, pls  
fill details bellow for claims. Email us back: onlinepch_213@ozledim.net

Name in full:.. Address:...   Sex:..  Occupation:..   Present Country:..

!!!Once Again Congratulations!!!

Yours Sincerely,
Mrs.Reyna Cruz
ONLINE CO-ORDINATOR.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

^ permalink raw reply

* [PATCH] netxen: Error return off by one in 'netxen_nic_set_pauseparam()'.
From: santosh nayak @ 2012-06-20  7:27 UTC (permalink / raw)
  To: sony.chacko, rajesh.borundia; +Cc: netdev, kernel-janitors, Santosh Nayak

From: Santosh Nayak <santoshprasadnayak@gmail.com>

There are 'NETXEN_NIU_MAX_GBE_PORTS'  GBE ports. Port indexing starts
from zero. 
Hence we should also return error for "port == NETXEN_NIU_MAX_GBE_PORTS"

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
Destination tree "linux-next"


 .../ethernet/qlogic/netxen/netxen_nic_ethtool.c    |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
index 3973040..d4f179f 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
@@ -489,7 +489,7 @@ netxen_nic_get_pauseparam(struct net_device *dev,
 	int port = adapter->physical_port;
 
 	if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
-		if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
+		if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
 			return;
 		/* get flow control settings */
 		val = NXRD32(adapter, NETXEN_NIU_GB_MAC_CONFIG_0(port));
@@ -534,7 +534,7 @@ netxen_nic_set_pauseparam(struct net_device *dev,
 	int port = adapter->physical_port;
 	/* read mode */
 	if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
-		if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
+		if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
 			return -EIO;
 		/* set flow control */
 		val = NXRD32(adapter, NETXEN_NIU_GB_MAC_CONFIG_0(port));
-- 
1.7.4.4

^ permalink raw reply related

* Warning! Your mailbox is almost full.
From: Publishers Clearing House @ 2012-06-20  7:16 UTC (permalink / raw)




Congratulations, your email address has won ($1,000,000.00USD) in the  
on going Publishers Clearing House loto draw that was held today, pls  
fill details bellow for claims. Email us back: onlinepch_213@ozledim.net

Name in full:.. Address:...   Sex:..  Occupation:..   Present Country:..

!!!Once Again Congratulations!!!

Yours Sincerely,
Mrs.Reyna Cruz
ONLINE CO-ORDINATOR.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

^ permalink raw reply

* Re: 10GBE performance drop with net.ipv4.tcp_timestamps=0
From: Eric Dumazet @ 2012-06-20  7:22 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: Linux Netdev List
In-Reply-To: <4FE17522.5050005@profihost.ag>

On Wed, 2012-06-20 at 09:00 +0200, Stefan Priebe - Profihost AG wrote:
> Am 19.06.2012 23:31, schrieb Eric Dumazet:
> > On Tue, 2012-06-19 at 23:08 +0200, Stefan Priebe wrote:
> >> i'm testing 10GBE speed with tweo servers. One with 3.5-rc3 nd thoe
> >> other one whith RHEL 6 (2.6.32 kernel).
> >>
> >> I noticed that setting
> >> net.ipv4.tcp_timestamps=0
> >>
> >> descreased the performance from 9,7 Full Duplex to 3-4Gb/s.
> >>
> >> Is this bahviour fine? What should / could i tet?
> >>
> >
> > Really, you should provide more input than that, if you really want us
> > to help.
> 
> *arg* forgot to add the pastebin links. Sorry. Speed degraded in this 
> case from 9,88Gbit/s to 2,45Gbit/s. When i turn on timestamps it's 
> perfect again. Server A has 3.5.0-rc3 and server B has an RHEL6 2.6.32 
> kernel.
> 
> Before:
> http://pastebin.com/raw.php?i=1gVraWVc
> 
> After:
> http://pastebin.com/raw.php?i=NSh8Y29s

You have a lot of packet losses

add "tc -s -d qdisc" , "ifconfig -a " and "ethtool -S ethX" outputs for
both servers

^ permalink raw reply

* [PATCH -v1 1/3] usbnet: clear OPEN flag in failure path
From: Ming Lei @ 2012-06-20  7:15 UTC (permalink / raw)
  To: David S. Miller, Greg Kroah-Hartman
  Cc: Oliver Neukum, netdev, linux-usb, Ming Lei
In-Reply-To: <1340176553-32225-1-git-send-email-ming.lei@canonical.com>

Without clearing OPEN flag in failure path, runtime or system resume
may submit interrupt/rx URB and start tx queue mistakenly on a
interface in DOWN state.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 drivers/net/usb/usbnet.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index ac2e493..f06cf9b 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -793,11 +793,13 @@ int usbnet_open (struct net_device *net)
 	if (info->manage_power) {
 		retval = info->manage_power(dev, 1);
 		if (retval < 0)
-			goto done;
+			goto done_manage_power_error;
 		usb_autopm_put_interface(dev->intf);
 	}
 	return retval;
 
+done_manage_power_error:
+	clear_bit(EVENT_DEV_OPEN, &dev->flags);
 done:
 	usb_autopm_put_interface(dev->intf);
 done_nopm:
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH -v1 0/3] usbnet: usbnet: PM related fixes
From: Ming Lei @ 2012-06-20  7:15 UTC (permalink / raw)
  To: David S. Miller, Greg Kroah-Hartman; +Cc: Oliver Neukum, netdev, linux-usb

Hi David,

The 3 patches fix some PM related problems.

v1:
	- one line fix in 3/3: GFP_ATOMIC -> flags in rx_alloc_submit

 drivers/net/usb/usbnet.c |   47 +++++++++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 17 deletions(-)

Thanks,
--
Ming Lei

^ permalink raw reply

* [PATCH -v1 3/3] usbnet: handle remote wakeup asap
From: Ming Lei @ 2012-06-20  7:15 UTC (permalink / raw)
  To: David S. Miller, Greg Kroah-Hartman
  Cc: Oliver Neukum, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Ming Lei
In-Reply-To: <1340176553-32225-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

If usbnet is resumed by remote wakeup, generally there are
some packets comming to be handled, so allocate and submit
rx URBs in usbnet_resume to avoid delays introduced by tasklet.
Otherwise, usbnet may have been runtime suspended before the
usbnet_bh is executed to schedule Rx URBs.

Without the patch, usbnet can't recieve any packets from peer
in runtime suspend state if runtime PM is enabled and
autosuspend_delay is set as zero.

Signed-off-by: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
---
 drivers/net/usb/usbnet.c |   42 ++++++++++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 9bfa775..a89d6c5 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1201,6 +1201,21 @@ deferred:
 }
 EXPORT_SYMBOL_GPL(usbnet_start_xmit);
 
+static void rx_alloc_submit(struct usbnet *dev, gfp_t flags)
+{
+	struct urb	*urb;
+	int		i;
+
+	/* don't refill the queue all at once */
+	for (i = 0; i < 10 && dev->rxq.qlen < RX_QLEN(dev); i++) {
+		urb = usb_alloc_urb(0, flags);
+		if (urb != NULL) {
+			if (rx_submit(dev, urb, flags) == -ENOLINK)
+				return;
+		}
+	}
+}
+
 /*-------------------------------------------------------------------------*/
 
 // tasklet (work deferred from completions, in_irq) or timer
@@ -1240,26 +1255,14 @@ static void usbnet_bh (unsigned long param)
 		   !timer_pending (&dev->delay) &&
 		   !test_bit (EVENT_RX_HALT, &dev->flags)) {
 		int	temp = dev->rxq.qlen;
-		int	qlen = RX_QLEN (dev);
-
-		if (temp < qlen) {
-			struct urb	*urb;
-			int		i;
-
-			// don't refill the queue all at once
-			for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) {
-				urb = usb_alloc_urb (0, GFP_ATOMIC);
-				if (urb != NULL) {
-					if (rx_submit (dev, urb, GFP_ATOMIC) ==
-					    -ENOLINK)
-						return;
-				}
-			}
+
+		if (temp < RX_QLEN(dev)) {
+			rx_alloc_submit(dev, GFP_ATOMIC);
 			if (temp != dev->rxq.qlen)
 				netif_dbg(dev, link, dev->net,
 					  "rxqlen %d --> %d\n",
 					  temp, dev->rxq.qlen);
-			if (dev->rxq.qlen < qlen)
+			if (dev->rxq.qlen < RX_QLEN(dev))
 				tasklet_schedule (&dev->bh);
 		}
 		if (dev->txq.qlen < TX_QLEN (dev))
@@ -1565,6 +1568,13 @@ int usbnet_resume (struct usb_interface *intf)
 		spin_unlock_irq(&dev->txq.lock);
 
 		if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
+			/* handle remote wakeup ASAP */
+			if (!dev->wait &&
+				netif_device_present(dev->net) &&
+				!timer_pending(&dev->delay) &&
+				!test_bit(EVENT_RX_HALT, &dev->flags))
+					rx_alloc_submit(dev, GFP_KERNEL);
+
 			if (!(dev->txq.qlen >= TX_QLEN(dev)))
 				netif_tx_wake_all_queues(dev->net);
 			tasklet_schedule (&dev->bh);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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 related

* [PATCH -v1 2/3] usbnet: decrease suspend count if returning -EBUSY for runtime suspend
From: Ming Lei @ 2012-06-20  7:15 UTC (permalink / raw)
  To: David S. Miller, Greg Kroah-Hartman
  Cc: Oliver Neukum, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Ming Lei
In-Reply-To: <1340176553-32225-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

This patch decreases dev->suspend_count in the -EBUSY failure path
of usbnet_suspend. Without the change, the later runtime suspend
will do nothing except for increasing dev->suspend_count.

Signed-off-by: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
---
 drivers/net/usb/usbnet.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index f06cf9b..9bfa775 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1508,6 +1508,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
 		spin_lock_irq(&dev->txq.lock);
 		/* don't autosuspend while transmitting */
 		if (dev->txq.qlen && PMSG_IS_AUTO(message)) {
+			dev->suspend_count--;
 			spin_unlock_irq(&dev->txq.lock);
 			return -EBUSY;
 		} else {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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 related


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