Re: pktgen question

2007-10-08 Thread David Miller
From: Steve Wise <[EMAIL PROTECTED]> Date: Mon, 08 Oct 2007 17:46:26 -0500 > We're talking about just for pktgen...eh? My bad, I'm happy to review a patch that uses the skb->destructor in pktgen to achieve this. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a

Re: pktgen question

2007-10-08 Thread Steve Wise
David Miller wrote: From: Ben Greear <[EMAIL PROTECTED]> Date: Mon, 08 Oct 2007 14:57:13 -0700 This skb recycling can certainly work and has been done several times before. It never gets into the kernel though. Because it doesn't work. A socket can hang onto a receive packet essentially f

Re: pktgen question

2007-10-08 Thread David Miller
From: Ben Greear <[EMAIL PROTECTED]> Date: Mon, 08 Oct 2007 14:57:13 -0700 > This skb recycling can certainly work and has been done several > times before. It never gets into the kernel though. Because it doesn't work. A socket can hang onto a receive packet essentially forever. You cannot th

Re: pktgen question

2007-10-08 Thread Ben Greear
Steve Wise wrote: Ben Greear wrote: Rick Jones wrote: Perf-wise, you could clone the skbs up front, then deliver them to the nic in a tight loop. This would mitigate the added overhead introduced by calling skb_clone() in the loop doing transmits... That only works if you are sending a sm

Re: pktgen question

2007-10-08 Thread Steve Wise
Ben Greear wrote: Rick Jones wrote: Perf-wise, you could clone the skbs up front, then deliver them to the nic in a tight loop. This would mitigate the added overhead introduced by calling skb_clone() in the loop doing transmits... That only works if you are sending a small number of skbs.

Re: pktgen question

2007-09-24 Thread Ben Greear
Rick Jones wrote: Perf-wise, you could clone the skbs up front, then deliver them to the nic in a tight loop. This would mitigate the added overhead introduced by calling skb_clone() in the loop doing transmits... That only works if you are sending a small number of skbs. You can't pre-clon

Re: pktgen question

2007-09-24 Thread Rick Jones
Perf-wise, you could clone the skbs up front, then deliver them to the nic in a tight loop. This would mitigate the added overhead introduced by calling skb_clone() in the loop doing transmits... That only works if you are sending a small number of skbs. You can't pre-clone several minutes w

Re: pktgen question

2007-09-24 Thread David Miller
From: Steve Wise <[EMAIL PROTECTED]> Date: Mon, 24 Sep 2007 08:54:13 -0500 > I think pktgen should be cloning the skbs using skb_clone(). Then it > will work for all devices, eh? The problem is that skb_clone() is (relatively) expensive and pktgen is trying to just grab a reference to the SKB i

Re: pktgen question

2007-09-24 Thread Robert Olsson
Hi, Steve Wise writes: > I think pktgen should be cloning the skbs using skb_clone(). Then it > will work for all devices, eh? pktgen assumes for "fastpath" sending exclusive ownership of the skb. And does a skb_get to avoid final skb destruction so the same skb can be sent over and over

Re: pktgen question

2007-09-24 Thread Ben Greear
Steve Wise wrote: Ben Greear wrote: Steve Wise wrote: I think pktgen should be cloning the skbs using skb_clone(). Then it will work for all devices, eh? That might work, but it would decrease performance slightly (or, increase CPU load at least). Perf-wise, you could clone the skbs up fro

Re: pktgen question

2007-09-24 Thread Steve Wise
Ben Greear wrote: Steve Wise wrote: I think pktgen should be cloning the skbs using skb_clone(). Then it will work for all devices, eh? That might work, but it would decrease performance slightly (or, increase CPU load at least). Perf-wise, you could clone the skbs up front, then deliver th

Re: pktgen question

2007-09-24 Thread Ben Greear
Steve Wise wrote: I think pktgen should be cloning the skbs using skb_clone(). Then it will work for all devices, eh? That might work, but it would decrease performance slightly (or, increase CPU load at least). Maybe a new option: multi_clone Ben -- Ben Greear <[EMAIL PROTECTED]> Candela

Re: pktgen question

2007-09-24 Thread Steve Wise
I think pktgen should be cloning the skbs using skb_clone(). Then it will work for all devices, eh? Ben Greear wrote: jamal wrote: On Sun, 2007-23-09 at 12:55 -0500, Steve Wise wrote: Its a hack that breaks cxgb3 because cxgb3 uses the skb->cb area for each skb passed down. So cxgb3 is

Re: pktgen question

2007-09-23 Thread Ben Greear
jamal wrote: On Sun, 2007-23-09 at 12:55 -0500, Steve Wise wrote: Its a hack that breaks cxgb3 because cxgb3 uses the skb->cb area for each skb passed down. So cxgb3 is at fault then? IE a driver cannot use the skb->cb field if the users count is > 1? Or maybe a driver can _never_ use t

Re: pktgen question

2007-09-23 Thread jamal
On Sun, 2007-23-09 at 12:55 -0500, Steve Wise wrote: > Its a hack that breaks cxgb3 because cxgb3 uses the skb->cb area for > each skb passed down. So cxgb3 is at fault then? IE a driver cannot > use the skb->cb field if the users count is > 1? Or maybe a driver can > _never_ use the cb fiel

Re: pktgen question

2007-09-23 Thread Evgeniy Polyakov
Hi Steve. On Sun, Sep 23, 2007 at 11:12:12AM -0500, Steve Wise ([EMAIL PROTECTED]) wrote: > The pktgen module provides a way to "clone" the skb its using for > transmission, and allows passing N clones of the originally created skb > to the driver under test.However, it doesn't really use sk

Re: pktgen question

2007-09-23 Thread Steve Wise
Evgeniy Polyakov wrote: Hi Steve. On Sun, Sep 23, 2007 at 11:12:12AM -0500, Steve Wise ([EMAIL PROTECTED]) wrote: The pktgen module provides a way to "clone" the skb its using for transmission, and allows passing N clones of the originally created skb to the driver under test.However, it