From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Subject: Re: Hight speed data sending from custom IP out of kernel Date: Mon, 25 Apr 2011 14:48:21 +0200 Message-ID: <4DB56D95.1000205@monstr.eu> 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> <1303734625.2747.121.camel@edumazet-laptop> Reply-To: monstr@monstr.eu Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: juice@swagman.org, netdev@vger.kernel.org To: Eric Dumazet Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:34750 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038Ab1DYMsZ (ORCPT ); Mon, 25 Apr 2011 08:48:25 -0400 Received: by bwz15 with SMTP id 15so1588618bwz.19 for ; Mon, 25 Apr 2011 05:48:24 -0700 (PDT) In-Reply-To: <1303734625.2747.121.camel@edumazet-laptop> Sender: netdev-owner@vger.kernel.org List-ID: Eric Dumazet wrote: > 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= : >> >>>> 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 scratc= h new >>>> packets. >>> What do you mean? >> >> 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 = an >> skb while its previous logical content was sent on wire. >> >> Then you are free to only change iph->id and iph->check very fast. >> got it. There is an option to setup number of BDs in the driver where I= need to=20 use half skb because of nr_frags=3D2 where two BDs are used. >=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 ca= n > do a recycle. Ok. I see that dev_kfree_skb(consume_skb). Thanks will try, Michal --=20 Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/= fdt/ Microblaze U-BOOT custodian