RE: [PATCH] [IPROUTE2] Update various classifiers' help output forexpected CLASSID syntax

2008-02-13 Thread Waskiewicz Jr, Peter P
> > + fprintf(stderr, "\nNOTE: CLASSID is parsed as hexidecimal > > +input.\n"); > > s/hexidecimal/hexadecimal/g (?) Gah! Thanks Jarek, I can correct and resend. -PJ Waskiewicz -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED]

RE: [PATCH] [TC U32] Fix input parsing to support more than 9 flow id'scorrectly

2008-02-12 Thread Waskiewicz Jr, Peter P
> Sorry, can't change the api, update the documentation instead. Yes, this is much more reasonable. I'll send a patch shortly to do that. Thanks -PJ Waskiewicz -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo inf

RE: [PATCH] [TC U32] Fix input parsing to support more than 9 flow id'scorrectly

2008-02-12 Thread Waskiewicz Jr, Peter P
> From: PJ Waskiewicz <[EMAIL PROTECTED]> > > Using strtoul with a base of 16 converts flowid 10 into 0x10, > which makes it flowid 16. This is interpreted by the kernel > incorrectly, and causes traffic flows above 9 to be > classified into band 0 on multiband qdiscs. > This changes the base

RE: [PATCH] Disable TSO for non standard qdiscs

2008-02-01 Thread Waskiewicz Jr, Peter P
> I totally disagree with these POVs: > > - 10G cards should be treated by default as 10G cards - not > DSL modems, > and common users shouldn't have to read any warnings or configs to > see this. > - tc with TBF or HTB are professional tools; there should be > added some > warnings to man

RE: Lots of "BUG eth1 code -5 qlen 0" messages in 2.6.24

2008-02-01 Thread Waskiewicz Jr, Peter P
> I've changed the -EIO into NETDEV_TX_BUSY and so far I can't > trigger the bug anymore. It was quite easy to trigger within > minutes with rsync, but I can't trigger it anymore. Should I > send a patch, and if > so: to who? The tulip/xircom_cb driver seems to be orphaned. Perhaps Jeff Garzik

RE: [PATCH] Disable TSO for non standard qdiscs

2008-02-01 Thread Waskiewicz Jr, Peter P
> Right - Essentially it is a usability issue: > People who know how to use TSO (Peter for example) will be > clueful enough to turn it on. Which means the default should > be to protect the clueless and turn it off. > On Andis approach: > Turning TSO off at netdev registration time with a warnin

RE: [PATCH] Disable TSO for non standard qdiscs

2008-02-01 Thread Waskiewicz Jr, Peter P
> Indeed. As an example of an unknowing user, this discussion > made me check whether my cablemodem device (on which I'm > using HFSC) uses TSO :) The TSO defer logic is based on your congestion window and current window size. So the actual frame sizes hitting your NIC attached to your DSL prob

RE: [PATCH] Disable TSO for non standard qdiscs

2008-02-01 Thread Waskiewicz Jr, Peter P
> ...But, on the other hand, in this case the realization seems to be > wrong: probably still all locally created packets will be > treated the same - or I miss something? > > Jarek P. The TCP layer will generate TSO packets based on the kernel socket features associated with the flow. So if yo

RE: [PATCH] Disable TSO for non standard qdiscs

2008-01-31 Thread Waskiewicz Jr, Peter P
> Well, it could be just that when using such qdiscs TSO would be > disabled, but the user could override this by using ethtool after > loading the qdiscs. I still disagree with this. The qdisc should not cause anything to happen to feature flags on the device. It's the scheduling layer and real

RE: [PATCH] Disable TSO for non standard qdiscs

2008-01-31 Thread Waskiewicz Jr, Peter P
> The philosophical problem I have with this suggestion is that > I expect that the large majority of users will be more happy > with disabled TSO if they use non standard qdiscs and > defaults that do not fit the majority use case are bad. > > Basically you're suggesting that nearly everyone u

RE: [PATCH] Disable TSO for non standard qdiscs

2008-01-31 Thread Waskiewicz Jr, Peter P
> My point was that without TSO different submitters will > interleave their streams (because they compete about the > qdisc submission) and then you end up with a smooth rate over > time for all of them. > > If you submit in large chunks only (as TSO does) it will > always be more bursty and

RE: Lots of "BUG eth1 code -5 qlen 0" messages in 2.6.24

2008-01-29 Thread Waskiewicz Jr, Peter P
> Peter, I suspect that driver is just buggy in some other way > as opposed to being re-entered; couldnt tell by inspection. > It is possible it may be too eager to open up before it > really has space. > It will be easy to check your theory by having the driver > just check if it is netif_stop

RE: Lots of "BUG eth1 code -5 qlen 0" messages in 2.6.24

2008-01-29 Thread Waskiewicz Jr, Peter P
> > Are you using any specific qdisc, or just the default pfifo_fast? > > Have you done any specific tuning on your qdisc as well? > The default > > qlen seems to have been changed. > > The driver seems buggy. Make it return NETDEV_TX_BUSY instead > of -EIO in xircom_start_xmit() and the me

RE: Lots of "BUG eth1 code -5 qlen 0" messages in 2.6.24

2008-01-29 Thread Waskiewicz Jr, Peter P
> I've just started to use 2.6.24 on my home firewall (before > it was running 2.6.24-rc2 for about 65 days) and I noticed a > couple of error messages I've never seen before: > > Jan 29 07:50:54 gateway kernel: BUG eth1 code -5 qlen 0 Jan > 29 08:28:30 gateway kernel: BUG eth1 code -5 qlen 0 J

RE: [PATCH] PATCH 1/2 [SCHED 2.6.24]: Check subqueue status before calling hard_start_xmit

2007-11-15 Thread Waskiewicz Jr, Peter P
> You could optimize this by getting HARD_TX_LOCK after the > check. I assume that netif_stop_subqueue (from another CPU) > would always be called by the driver xmit, and that is not > possible since we hold the __LINK_STATE_QDISC_RUNNING bit. > Does that sound correct? Sorry for not respondin

RE: [PATCH] [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded

2007-11-07 Thread Waskiewicz Jr, Peter P
> -Original Message- > From: David Miller [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 3:52 AM > To: Waskiewicz Jr, Peter P > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH] [AF_PACKET]: Allow multicast traffic to > be caught by ORIGDEV

RE: [PATCH] [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded

2007-11-07 Thread Waskiewicz Jr, Peter P
> > The socket option for packet sockets to return the original ifindex > > instead of the bonded ifindex will not match multicast > traffic. Since > > this socket option is the most useful for layer 2 traffic and > > multicast traffic, make the option multicast-aware. > > > > Signed-off-by:

RE: Question on TSO maximum segment sizes.

2007-10-11 Thread Waskiewicz Jr, Peter P
> From: Rick Jones <[EMAIL PROTECTED]> > Date: Thu, 11 Oct 2007 16:50:46 -0700 > > > For just messing about, might it be possible to tweak the socket > > buffer sizes and tcp_tso_win_divisor to kludge things for a short > > while? Couldn't ship that way certainly, but assuming > Peter's going

Question on TSO maximum segment sizes.

2007-10-11 Thread Waskiewicz Jr, Peter P
I'm having an issue with TSO right vs. hardware that can't take the maximum segment size sent from the stack. I've been told that the maximum packet size that can be sent to the hardware today is 64k, but my hardware can only take 32k in certain modes per queue due to hardware limitations. I have

RE: [ofa-general] Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-10 Thread Waskiewicz Jr, Peter P
> -Original Message- > From: Andi Kleen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 10, 2007 9:02 AM > To: Waskiewicz Jr, Peter P > Cc: David Miller; [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED]; [EMAIL

RE: [ofa-general] Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-10 Thread Waskiewicz Jr, Peter P
> From: Andi Kleen <[EMAIL PROTECTED]> > Date: Wed, 10 Oct 2007 12:23:31 +0200 > > > On Wed, Oct 10, 2007 at 02:25:50AM -0700, David Miller wrote: > > > The chip I was working with at the time (UltraSPARC-IIi) > compressed > > > all the linear stores into 64-byte full cacheline > transactions v

RE: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-09 Thread Waskiewicz Jr, Peter P
> A misunderstanding, I think. > > To my brain, DaveM's item #2 seemed to assume/require the NIC > hardware to balance fairly across hw TX rings, which seemed > to preclude the > 8139cp/tg3 style of strict-prio hardware. That's what I was > responding to. > > As long as there is some modular

RE: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-09 Thread Waskiewicz Jr, Peter P
> IMO the net driver really should provide a hint as to what it wants. > > 8139cp and tg3 would probably prefer multiple TX queue > behavior to match silicon behavior -- strict prio. If I understand what you just said, I disagree. If your hardware is running strict prio, you don't want to enfor

RE: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Waskiewicz Jr, Peter P
> If net_device_subqueue is visible from both driver and core > scheduler area (couldnt tell from looking at whats in there > already), then that'll do it. Yes, I use the net_device_subqueue structs (the state variable in there) in the prio and rr qdiscs right now. It's an indexed list at the

RE: parallel networking

2007-10-08 Thread Waskiewicz Jr, Peter P
> Multiply whatever effect you think you might be able to > measure due to that on your 2 or 4 way system, and multiple > it up to 64 cpus or so for machines I am using. This is > where machines are going, and is going to become the norm. That along with speeds going to 10 GbE with multiple Tx

RE: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Waskiewicz Jr, Peter P
> true, that needs some resolution. Heres a hand-waving thought: > Assuming all packets of a specific map end up in the same > qdiscn queue, it seems feasible to ask the qdisc scheduler to > give us enough packages (ive seen people use that terms to > refer to packets) for each hardware ring's a

RE: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Waskiewicz Jr, Peter P
PROTECTED]; > [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED]; [EMAIL PROTECTED]; netdev@vger.kernel.org; > [EMAIL PROTECTED]; Waskiewicz Jr, Peter P; > [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTE

RE: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock

2007-09-24 Thread Waskiewicz Jr, Peter P
> > I really just need to put my nose to the grindstone and get the > > patches together and to the list...stay tuned. > > > > Thanks, > > -PJ Waskiewicz > > - > > > Since we are redoing this, is there any way to make the whole > TX path more lockless? The existing model seems to be more > o

RE: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock

2007-09-24 Thread Waskiewicz Jr, Peter P
> On Mon, 2007-24-09 at 15:57 -0700, Waskiewicz Jr, Peter P wrote: > > > I've looked at that as a candidate to use. The lock for > enqueue would > > be needed when actually placing the skb into the > appropriate software > > queue for the qdisc, so it'

RE: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock

2007-09-24 Thread Waskiewicz Jr, Peter P
> The one thing that seems obvious is to use > dev->hard_prep_xmit() in the patches i posted to select the > xmit ring. You should be able to do figure out the txmit ring > without holding any lock. I've looked at that as a candidate to use. The lock for enqueue would be needed when actually

RE: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock

2007-09-24 Thread Waskiewicz Jr, Peter P
> I have submitted this before; but here it is again. > Against net-2.6.24 from yesterday for this and all following patches. > > > cheers, > jamal Hi Jamal, I've been (slowly) working on resurrecting the original design of my multiqueue patches to address this exact issue of the queue_

RE: [PATCH v2] Move the definition of pr_err() into kernel.h

2007-09-11 Thread Waskiewicz Jr, Peter P
> Other pr_*() macros are already defined in kernel.h, but > pr_err() was defined multiple times in several other places > > Signed-off-by: Emil Medve <[EMAIL PROTECTED]> > --- > > I'm writing a driver and I've been using the pr_*() macros > from kernel.h and I was surprised not to find there p

RE: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB

2007-08-29 Thread Waskiewicz Jr, Peter P
> From: Krishna Kumar2 <[EMAIL PROTECTED]> > Date: Wed, 29 Aug 2007 10:43:23 +0530 > > > The reason was to run parallel copies, not for buffer limitations. > > Oh, I see. > > I'll note in passing that current lmbench-3 has some > parallelization features you could play with, you might want > t

RE: [patch 4/4] Update e1000 driver to use devres.

2007-08-16 Thread Waskiewicz Jr, Peter P
> Now if I insert a return -ENOMEM right after allocating tx_ring: > --- a/drivers/net/e1000/e1000_main.c > +++ b/drivers/net/e1000/e1000_main.c > @@ -1356,6 +1356,8 @@ e1000_alloc_queues(struct e1000_adapter > *adapter) { > adapter->tx_ring = kcalloc(adapter->num_tx_queues, >

RE: [patch 4/4] Update e1000 driver to use devres.

2007-08-16 Thread Waskiewicz Jr, Peter P
> Index: linux-2.6/drivers/net/e1000/e1000_main.c > === > --- linux-2.6.orig/drivers/net/e1000/e1000_main.c > +++ linux-2.6/drivers/net/e1000/e1000_main.c > @@ -860,15 +860,14 @@ e1000_probe(struct pci_dev *pdev, { > struct net_

RE: Potential u32 classifier bug.

2007-08-15 Thread Waskiewicz Jr, Peter P
> * Waskiewicz Jr, Peter P <[EMAIL PROTECTED]> > 2007-08-15 11:02 > > > There is this very horrible way of using the u32 > classifier with a > > > negative offset to look into the ethernet header. > > > > Based on this, it sounds like u32 usin

RE: Potential u32 classifier bug.

2007-08-15 Thread Waskiewicz Jr, Peter P
> * Waskiewicz Jr, Peter P <[EMAIL PROTECTED]> > 2007-08-09 18:07 > > My big question is: Has anyone recently used the 802_3 > protocol in tc > > with u32 and actually gotten it to work? I can't see how the > > u32_classify() code can look at th

Potential u32 classifier bug.

2007-08-09 Thread Waskiewicz Jr, Peter P
I've recently been trying to use tc with u32 classifiers to filter ethernet traffic based on ethertype. Although we found and fixed an issue in the sch_prio call to tc_classify() (thanks Patrick!), this didn't fix the actual filtering issue. For those of you who are curious or are tc-savy, I'm re

RE: [FIX] NET: Fix sch_api and sch_prio to properly set and detect the root qdisc

2007-07-30 Thread Waskiewicz Jr, Peter P
> -Original Message- > From: David Miller [mailto:[EMAIL PROTECTED] > Sent: Monday, July 30, 2007 5:14 PM > To: Waskiewicz Jr, Peter P > Cc: netdev@vger.kernel.org; [EMAIL PROTECTED] > Subject: Re: [FIX] NET: Fix sch_api and sch_prio to properly > set and detect the

RE: [PATCH] NET_DMA: remove unused dma_memcpy_to_kernel_iovec

2007-07-30 Thread Waskiewicz Jr, Peter P
> On 7/26/07, David Miller <[EMAIL PROTECTED]> wrote: > > From: Shannon Nelson <[EMAIL PROTECTED]> > > Date: Tue, 24 Jul 2007 17:36:06 -0700 > > > > > (repost - original eaten by vger?) > > > > > > Al Viro pointed out that dma_memcpy_to_kernel_iovec() really was > > > unreachable and thus unused.

RE: [FIX] NET: Fix sch_api and sch_prio to properly set and detect the root qdisc

2007-07-27 Thread Waskiewicz Jr, Peter P
> From: Patrick McHardy [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 24, 2007 5:36 PM > To: Waskiewicz Jr, Peter P > Cc: [EMAIL PROTECTED]; netdev@vger.kernel.org > Subject: Re: [FIX] NET: Fix sch_api and sch_prio to properly > set and detect the root qdisc > [...] >

RE: [NET_SCHED]: Fix prio/ingress classification logic error

2007-07-26 Thread Waskiewicz Jr, Peter P
> This is the final fix for the problem Peter reported. > Turns out most other schedulers get it right, the only other > case is ingress setting skb->tc_index to the uninitialized > value of res.classid. I've applied this and tested prio and rr, and everything is happy again. Thanks for finding

RE: Tc filtering: broken 802_3 classifier?

2007-07-25 Thread Waskiewicz Jr, Peter P
> In case of prio, if your manually installed filters don't > match, it will fall back to the skb->priority based > classification, which is based on tos and is probably > responsible for what you're seeing. Feel free to investigate, > but you could save us all some time by simply posting what

RE: Tc filtering: broken 802_3 classifier?

2007-07-25 Thread Waskiewicz Jr, Peter P
> Waskiewicz Jr, Peter P wrote: > >>The protocol match is on skb->protocol, so it case of > ethernet its on > >>the ethernet protocol, which is ETH_P_IP or "ip" for IPv4. > > > > > > I see that in the code, but the reason I started worryi

RE: Tc filtering: broken 802_3 classifier?

2007-07-25 Thread Waskiewicz Jr, Peter P
> The protocol match is on skb->protocol, so it case of > ethernet its on the ethernet protocol, which is ETH_P_IP or > "ip" for IPv4. I see that in the code, but the reason I started worrying was when I added the 802_3 classifier on 8 flows, it would shove all traffic into flowid 1:1, no matte

Tc filtering: broken 802_3 classifier?

2007-07-24 Thread Waskiewicz Jr, Peter P
I've been trying to use tc filtering to filter on ethertype, among other things in the MAC layer. I'm running into multiple issues, and want to put this out there in case I'm using the filters wrong, or if there really is a bug in the filter code (I've stared at most of it today, and my head hurts

RE: [PATCH 1/2][RFC] Update net core to use devres.

2007-07-24 Thread Waskiewicz Jr, Peter P
> * netdev_pci_remove_one() can replace simple pci device remove > functions > > * devm_alloc_netdev() is like alloc_netdev but allocates > memory using devres. > alloc_netdev() can be removed once all drivers use devres. Please look at the multiqueue network code that is in 2.6.23. It crea

RE: [PATCH] NET: Fix sch_prio to detect the root qdisc loading

2007-07-22 Thread Waskiewicz Jr, Peter P
> As explained in my last mail, sch->parent is an integer. And > it is set when grafting the qdisc, not on initilization, so > it is always 0 here when coming from prio_init. > > This untested patch should make sure its always set correctly. Yes, I'm using NULL and 0 interchangeably here, sinc

RE: Question: how to detect if a qdisc is root or not?

2007-07-21 Thread Waskiewicz Jr, Peter P
> > Anyways, I tried a few different things, and what it looks like is > > sch->parent will be NULL (0) for the top-level device. This is > > sch->correct, > > and trying to mess with that screws up qdisc_graft() when unloading > > the qdisc. I also tried adding a TCQ_F_ROOT flag to > sch->fla

RE: Question: how to detect if a qdisc is root or not?

2007-07-21 Thread Waskiewicz Jr, Peter P
> From: Patrick McHardy <[EMAIL PROTECTED]> > Date: Sat, 21 Jul 2007 06:01:07 +0200 > > > Waskiewicz Jr, Peter P wrote: > > > I just sent out a patch to fix this. > > > > I didn't see it yet. > > VGER ate it for some reason and I didn't

RE: Question: how to detect if a qdisc is root or not?

2007-07-20 Thread Waskiewicz Jr, Peter P
> Its set after grafting the parent, which is after initialization. > I think what should work is to set it in qdisc_create > instead, sch_api.c around line 490: > > + sch->parent = handle; > > if (handle == TC_H_INGRESS) { > sch->flags |= TCQ_F_INGRESS; >

RE: Question: how to detect if a qdisc is root or not?

2007-07-18 Thread Waskiewicz Jr, Peter P
> Its set after grafting the parent, which is after initialization. > I think what should work is to set it in qdisc_create > instead, sch_api.c around line 490: > > + sch->parent = handle; > > if (handle == TC_H_INGRESS) { > sch->flags |= TCQ_F_INGRESS; >

RE: Question: how to detect if a qdisc is root or not?

2007-07-18 Thread Waskiewicz Jr, Peter P
> You're right, thats a bug. TC_H_ROOT is the parent ID, which > is stored in sch->parent. IIRC its also passed to the > ->init() function. Unfortunately it's not passed. It is passed into the ->change() function: static int prio_init(struct Qdisc *sch, struct rtattr *opt) static int prio_ch

Question: how to detect if a qdisc is root or not?

2007-07-18 Thread Waskiewicz Jr, Peter P
I've been tracking down an issue with the recent multiqueue code, specifically with sch_prio and sch_rr loading as a root qdisc. Right now, we do not want to allow child qdiscs of sch_rr and sch_prio to load with multiqueue enabled; we want to restrict multiqueue-enabled qdiscs to the root qdisc (

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-30 Thread Waskiewicz Jr, Peter P
> It would be great if we could finally get a working e1000 > multiqueue patch so work in this area can actually be tested. I'm actively working on this right now. I'm on vacation next week, but hopefully I can get something working before I leave OLS and post it. -PJ - To unsubscribe from this

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-29 Thread Waskiewicz Jr, Peter P
> Ok everything is checked into net-2.6.23, thanks everyone. Dave, thank you for your patience and feedback on this whole process. Patrick and everyone else, thank you for your feedback and assistance. I am looking at your posed virtualization question, but I need sleep since I just remembered I'

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
> Waskiewicz Jr, Peter P wrote: > >> > >> Looking at Peter's multiqueue patch, which should include all > >> hard_start_xmit users (I'm not seeing sch_teql though, > >> Peter?) the only other one is pktgen. > >> >

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
> -Original Message- > From: Patrick McHardy [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 28, 2007 12:37 PM > To: Jeff Garzik > Cc: Waskiewicz Jr, Peter P; [EMAIL PROTECTED]; > netdev@vger.kernel.org; Kok, Auke-jan H; [EMAIL PROTECTED] > Subject: Re: [PATCH 2

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-28 Thread Waskiewicz Jr, Peter P
> Waskiewicz Jr, Peter P wrote: > >>[...] > >>The only reasonable thing it can do is not care about > multiqueue and > >>just dequeue as usual. In fact I think it should be an error to > >>configure multiqueue on a non-root qdisc. > > > >

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-28 Thread Waskiewicz Jr, Peter P
> Absolutely not. First of all, its perfectly valid to use > non-multiqueue qdiscs on multiqueue devices. Secondly, its > only the root qdisc that has to know about multiqueue since > that one controls the child qdiscs. > > Think about it, it makes absolutely no sense to have the > child qdisc

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
> Waskiewicz Jr, Peter P wrote: > >>Quick question: where are the sch_generic changes? :) > >> > >>If you hold for ten minutes I'll post a set of slightly changed > >>patches with the NETDEVICES_MULTIQUEUE option and a fix for this. > > > >

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-28 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > +#ifdef CONFIG_NET_SCH_MULTIQUEUE > > + if (q->mq) > > + skb->queue_mapping = > > + > q->prio2band[band&TC_PRIO_MAX]; > > + else > > + skb->

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > include/linux/etherdevice.h |3 +- > > include/linux/netdevice.h | 62 > ++- > > include/linux/skbuff.h |4 ++- > > net/core/dev.c | 27 +-- > > net/core/netpoll.c |8 ++

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-28 Thread Waskiewicz Jr, Peter P
> Its not error handling. You do: > > err = register qdisc 1 > if (err) > return err; > err = register qdisc 2 > if (err) > unregister qdisc 2 > return err > > anyways, I already fixed that and cleaned up prio_classify > the way I suggested. Will send shortly. Thanks for fixing; ho

RE: [PATCH] iproute2: sch_rr support in tc

2007-06-28 Thread Waskiewicz Jr, Peter P
> Since rr is not built as a module you could actually put > everything in q_prio and share the code. But I don't really care :) I tried doing this, but I couldn't get things working quite right with selecting the correct module from sch_prio to sch_rr. So I just added the q_rr.c portion of tc,

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-28 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > > + > > static int __init prio_module_init(void) { > > - return register_qdisc(&prio_qdisc_ops); > > + int err; > > + err = register_qdisc(&prio_qdisc_ops); > > + if (!err) > > + err = register_qdisc(&rr_qdisc_ops); > > + return err; > > } > > >

RE: [RTNETLINK]: Add nested compat attribute

2007-06-25 Thread Waskiewicz Jr, Peter P
> From: Patrick McHardy <[EMAIL PROTECTED]> > Date: Mon, 25 Jun 2007 23:08:09 +0200 > > > David Miller wrote: > > > > > >> I've been using this patch and the IPROUTE2 patches Patrick has > > >> proposed with no issues. Can someone else look at these patches > > >> when they have time? I'd be i

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-25 Thread Waskiewicz Jr, Peter P
> Thats not necessary. I just though you could add one exit point: > > > ... > out: > skb->queue_mapping = q->mq ? band : 0; > return q->queues[band]; > } > > But if that doesn't work don't bother .. Unfortunately it won't, given how band might be used like this to select the queue: re

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-25 Thread Waskiewicz Jr, Peter P
> > @@ -70,14 +72,28 @@ prio_classify(struct sk_buff *skb, struct Qdisc > > *sch, int *qerr) #endif > > if (TC_H_MAJ(band)) > > band = 0; > > + if (q->mq) > > + skb->queue_mapping = > > +

RE: [RTNETLINK]: Add nested compat attribute

2007-06-25 Thread Waskiewicz Jr, Peter P
> -Original Message- > From: David Miller [mailto:[EMAIL PROTECTED] > Sent: Monday, June 25, 2007 2:30 PM > To: Waskiewicz Jr, Peter P > Cc: [EMAIL PROTECTED]; netdev@vger.kernel.org; > [EMAIL PROTECTED] > Subject: Re: [RTNETLINK]: Add nested compat attribute >

RE: [RTNETLINK]: Add nested compat attribute

2007-06-25 Thread Waskiewicz Jr, Peter P
> From: "Waskiewicz Jr, Peter P" <[EMAIL PROTECTED]> > Date: Mon, 25 Jun 2007 10:14:37 -0700 > > > > This patch adds a new attribute type that can be used to replace > > > non-nested attributes that contain structures by nested ones in a > > &

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-25 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > + /* If we're multiqueue, make sure the number of incoming bands > > +* matches the number of queues on the device we're > associating with. > > +*/ > > + if (tb[TCA_PRIO_MQ - 1]) > > + q->mq = *(unsigned char *)RTA_DATA(tb[TCA_PRIO_MQ - 1]); > > +

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-25 Thread Waskiewicz Jr, Peter P
> > enum > > { > > - TCA_PRIO_UNPSEC, > > - TCA_PRIO_TEST, > > > You misunderstood me. You can work on top of my compat > attribute patches, but the example code should not have to go > in to apply your patch. Ok. I'll fix my patches. > > diff --git a/net/sched/Kconfig b/net/sched/Kcon

RE: [RTNETLINK]: Add nested compat attribute

2007-06-25 Thread Waskiewicz Jr, Peter P
> This patch adds a new attribute type that can be used to > replace non-nested attributes that contain structures by > nested ones in a compatible way. > > This can be used in cases like Peter's who is trying to > extend sch_prio, which currently uses a fixed structure > without any holes. >

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-25 Thread Waskiewicz Jr, Peter P
> > /* ensure 32-byte alignment of both the device and > private area */ > > - alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & > ~NETDEV_ALIGN_CONST; > > + alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST + > > +(sizeof(struct net_device_subqueue) * > (queue_count - 1))

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-22 Thread Waskiewicz Jr, Peter P
> Patrick McHardy wrote: > > Waskiewicz Jr, Peter P wrote: > > > >>Thought about this more last night and this morning. As > far as I can > >>tell, I still need this. If the qdisc gets loaded with multiqueue > >>turned on, I can just use the v

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-22 Thread Waskiewicz Jr, Peter P
> > #include > > @@ -40,9 +42,13 @@ > > struct prio_sched_data > > { > > int bands; > > +#ifdef CONFIG_NET_SCH_RR > > + int curband; /* for round-robin */ > > +#endif > > struct tcf_proto *filter_list; > > u8 prio2band[TC_PRIO_MAX+1]; > > struct Qdisc *queues[TCQ_PRIO_BANDS];

RE: [PATCH 3/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-21 Thread Waskiewicz Jr, Peter P
> The dependencies seem to be very confused. SCHED_PRIO does > not depend on anything new, SCH_RR also doesn't depend on > anything. SCH_PRIO_MQ and SCH_RR_MQ (which is missing) depend > on SCH_PRIO/SCH_RR. A single NET_SCH_MULTIQUEUE option seems > better than adding one per scheduler though.

RE: [PATCH] NET: Multiple queue hardware support

2007-06-21 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > I did not modify other users of netif_queue_stopped() in > > net/core/netpoll.c, net/core/dev.c, or net/core/pktgen.c, since no > > classification occurs for the skb being sent to the device. > > Therefore, packets should always be ending up in queue 0, > so there's

RE: [PATCH 2/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-21 Thread Waskiewicz Jr, Peter P
> > Yes. This is the tc command I used to configure the qdisc (with > > q_rr.c attached from my patches iproute2 package): > > > > # tc qdisc add dev eth2 root handle 1: rr bands 8 RTNETLINK > answers: > > No such file or directory > > Again, I bet you don't have CONFIG_NET_SCH_RR enabled: Ch

RE: [PATCH 2/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-21 Thread Waskiewicz Jr, Peter P
> Waskiewicz Jr, Peter P wrote: > >> Please post the code. > >> > >> > > > > Code is attached. Please forgive the attachment and any whitespace > > damage...currently using Doubtlook to send this (cringe). > > > > The code look

RE: [PATCH 2/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-21 Thread Waskiewicz Jr, Peter P
> Please post the code. > Code is attached. Please forgive the attachment and any whitespace damage...currently using Doubtlook to send this (cringe). Thanks, -PJ Waskiewicz sch_prio.c Description: sch_prio.c

RE: [PATCH 2/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-21 Thread Waskiewicz Jr, Peter P
> BTw, couldn't you just merge sch_rr with prio? AFAICT you > only need a new dequeue function, a new struct Qdisc_ops and > a MODULE_ALIAS. Ok, I have this somewhat working, but need to poll for some help from the community. I used MODULE_ALIAS("sch_rr") in sch_prio.c, and modprobe is happily

RE: [PATCH] NET: Multiple queue hardware support

2007-06-20 Thread Waskiewicz Jr, Peter P
> to me it seems that this patch set only include multiple > transmit queue support (for qdisc). Am I right with this > observation? If so, are there also plans to support multiple > receive queues to allow the queues to be processed in > parallel on different CPUs via a standard interface? >

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-19 Thread Waskiewicz Jr, Peter P
> It's not being allocated at "compile time", it's being > allocated linearly into one block of ram in order to avoid > pointer derefs but it's still "dynamic" in that the size > isn't known until the alloc_netdev() call. > > We do this trick all over the networking, TCP sockets are 3 > or 4 d

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-19 Thread Waskiewicz Jr, Peter P
> From: PJ Waskiewicz <[EMAIL PROTECTED]> > Date: Mon, 18 Jun 2007 11:42:29 -0700 > > > + > > + /* The TX queue control structures */ > > + struct net_device_subqueue *egress_subqueue; > > + int egress_subqueue_count; > > Since every net device will have at

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-19 Thread Waskiewicz Jr, Peter P
> From: PJ Waskiewicz <[EMAIL PROTECTED]> > Date: Mon, 18 Jun 2007 11:42:29 -0700 > > > + > > + /* The TX queue control structures */ > > + struct net_device_subqueue *egress_subqueue; > > + int egress_subqueue_count; > > Since every net device will have at

RE: [PATCH 2/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-18 Thread Waskiewicz Jr, Peter P
> > Hmm. This is the sch_prio from the first 2.6.23-dev tree. I'll > > resync and make sure it's the correct one. > > Current 2.6.22-rc and net-2.6.23 have > > if (band >= q->bands) I just pulled 2.6.23 down, and see that is true. I must have had that left over. I'll fix that. > >

RE: [PATCH 2/3] NET: [SCHED] Qdisc changes and sch_rr added for multiqueue

2007-06-18 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > > > diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index > > 6d7542c..44ecdc6 100644 > > --- a/net/sched/sch_prio.c > > +++ b/net/sched/sch_prio.c > > } > > +#ifdef CONFIG_NET_SCH_PRIO_MQ > > + /* setup queue to band mapping */ > > + if (q->bands < sch-

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-18 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > Add the multiqueue hardware device support API to the core network > > stack. Allow drivers to allocate multiple queues and > manage them at > > the netdev level if they choose to do so. > > > > Should be 2/3 and qdisc changes should be 3/3. Well actually > the q

RE: [PATCH 1/2 - rev2] qdisc_restart - readability changes plus onebug fix.

2007-06-18 Thread Waskiewicz Jr, Peter P
> -Original Message- > From: Krishna Kumar [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 17, 2007 9:51 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Waskiewicz > Jr, Peter P; [EMAIL PROTECTED]; [EMAIL PROTECTED]; netdev@vger.kernel.org >

RE: [PATCH 1/2] qdisc_restart - readability changes, one bug fix.

2007-06-15 Thread Waskiewicz Jr, Peter P
> - "if (ret == NETDEV_TX_LOCKED && lockless)" is buggy, and > the lockless > check should be removed, since driver will return > NETDEV_TX_LOCKED only > if lockless is true and driver has to do the locking. In > the original > code as well as the latest code, this code can result in a bug

RE: [PATCH 2/2] qdisc_restart - couple of optimizations.

2007-06-14 Thread Waskiewicz Jr, Peter P
> IMHO this scenario occurs so infrequently that the check > isn't worth it especially since the driver has to be able to > deal with us calling it after netif_stop_queue() anyway. That sounds just fine to me. Thanks Krishna and Herbert for weighing in on this. -PJ Waskiewicz - To unsubscribe

RE: [PATCH] NET: Multiqueue network device support.

2007-06-13 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > diff --git a/net/sched/sch_generic.c > b/net/sched/sch_generic.c index > > f28bb2d..b9dc2a6 100644 > > --- a/net/sched/sch_generic.c > > +++ b/net/sched/sch_generic.c > > @@ -123,7 +123,8 @@ static inline int qdisc_restart(struct > net_device *dev) > >

RE: [PATCH] NET: Multiqueue network device support.

2007-06-13 Thread Waskiewicz Jr, Peter P
> From: jamal <[EMAIL PROTECTED]> > Date: Wed, 13 Jun 2007 09:33:22 -0400 > > > So in such a case (assuming 8 rings), One model is creating > 4 netdev > > devices each based on single tx/rx ring and register set and then > > having a mother netdev (what you call the bond) that feeds these > >

RE: [PATCH 2/2] qdisc_restart - couple of optimizations.

2007-06-13 Thread Waskiewicz Jr, Peter P
> - netif_queue_stopped need not be called inside qdisc_restart as > it has been called already in qdisc_run() before the first skb > is sent, and in __qdisc_run() after each intermediate skb is > sent (note : we are the only sender, so the queue cannot get > stopped while the tx lock was g

RE: [PATCH] NET: Multiqueue network device support.

2007-06-11 Thread Waskiewicz Jr, Peter P
> I think grepping will help more than testing :) > > The only issue I can see is that packets going to a > multiqueue device that doesn't have a multiqueue aware qdisc > attached will get a random value. So you would have to > conditionally reset it before ->enqueue. I currently clear queue_m

RE: [PATCH] NET: Multiqueue network device support.

2007-06-11 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > diff --git a/net/sched/sch_generic.c > b/net/sched/sch_generic.c index > > f28bb2d..b9dc2a6 100644 > > --- a/net/sched/sch_generic.c > > +++ b/net/sched/sch_generic.c > > @@ -123,7 +123,8 @@ static inline int qdisc_restart(struct > net_device *dev) > >

RE: [PATCH] NET: Multiqueue network device support.

2007-06-11 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index > > e7367c7..8bcd870 100644 > > --- a/include/linux/skbuff.h > > +++ b/include/linux/skbuff.h > > @@ -215,6 +215,7 @@ typedef unsigned char *sk_buff_data_t; > > * @pkt_type: Packet class > > * @fclone

RE: [PATCH] NET: Multiqueue network device support.

2007-06-08 Thread Waskiewicz Jr, Peter P
> I thought the correct use is to get this lock on clean_tx > side which can get called on a different cpu on rx (which > also cleans up slots for skbs that have finished xmit). Both > TX and clean_tx uses the same tx_ring's head/tail ptrs and > should be exclusive. But I don't find clean tx us

  1   2   >