From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: Hight speed data sending from custom IP out of kernel Date: Mon, 25 Apr 2011 14:30:25 +0200 Message-ID: <1303734625.2747.121.camel@edumazet-laptop> References: <53f539ea861e1a24bde4aadceff0b3bb.squirrel@www.liukuma.net> <4DAD76F1.40309@monstr.eu> <45cb2254ff23a4977c95b0f9459e39a6.squirrel@www.liukuma.net> <4DAFE4A0.2030905@monstr.eu> <1303373925.3685.6.camel@edumazet-laptop> <4DB55876.2010008@monstr.eu> <1303733669.2747.115.camel@edumazet-laptop> <4DB5668B.8020808@monstr.eu> <1303734468.2747.120.camel@edumazet-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: juice@swagman.org, netdev@vger.kernel.org To: monstr@monstr.eu Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:51583 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758275Ab1DYMa3 (ORCPT ); Mon, 25 Apr 2011 08:30:29 -0400 Received: by wwa36 with SMTP id 36so2415614wwa.1 for ; Mon, 25 Apr 2011 05:30:28 -0700 (PDT) In-Reply-To: <1303734468.2747.120.camel@edumazet-laptop> Sender: netdev-owner@vger.kernel.org List-ID: Le lundi 25 avril 2011 =C3=A0 14:27 +0200, Eric Dumazet a =C3=A9crit : > Le lundi 25 avril 2011 =C3=A0 14:18 +0200, Michal Simek a =C3=A9crit = : >=20 > > >=20 > > > Now, if all you want to do is send many packets from pktgen (with= only > > > ID changing), you could add a fast path to not rebuild from scrat= ch new > > > packets. > >=20 > > What do you mean? >=20 >=20 > If you know your device has X slots in its TX ring buffer, you would > have to maintain at least X+1 skbs in pktgen to make sure you reuse a= n > skb while its previous logical content was sent on wire. >=20 > Then you are free to only change iph->id and iph->check very fast. >=20 Checking skb->users would also be a good way to know if TX completion released skb reference. If your module owns the last reference, it can do a recycle.