From: Michal Simek <monstr@monstr.eu>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: juice@swagman.org, netdev@vger.kernel.org
Subject: Re: Hight speed data sending from custom IP out of kernel
Date: Mon, 25 Apr 2011 13:18:14 +0200 [thread overview]
Message-ID: <4DB55876.2010008@monstr.eu> (raw)
In-Reply-To: <1303373925.3685.6.camel@edumazet-laptop>
Hi,
Eric Dumazet wrote:
> Le jeudi 21 avril 2011 à 10:02 +0200, Michal Simek a écrit :
>
>> Thanks for that. I am looking at pktgen. On UDP my system is able to send full
>> bandwidth on 100Mbit/s ethernet and 220Mbit/s on 1G/s.
>> I will let you know when I have any useful resutls.
>
> 220Mbits/s in pktgen or an application ?
> - how many packets per second ? (or packet size ?)
>
> pktgen has the "clone_skb 100" thing that avoid skb_alloc()/skb_free()
> overhead, and permits to really test driver performance.
>
> It also bypass qdisc management.
>
I have reused the part of code from pktgen and I have found that I am missing
some IDs that's why I have done one simple patch(below) in pktgen which is
update IP ID field to find out if all packets are sent or not. As you suggest I
am also missing some IDs here.
My question is if I can use any mechanism to ensure to sending all IDs?
The next my question about packet fragments. Is it possible to setup IP
fragments from higher level? I do it on low level as pktgen and I have change
page address to memory which I need to send but it in under UDP.
The point is to create packet with frags > 1 where the first fragment is IP/TCP
header and the second fragments contains pointer to data which are prepared in
the memory and will be copied directly by network driver. I am doing the same
hacked code from pktgen. Is it possible to do it on higher level?
Thanks,
Michal
For 2.6.37.6
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 33bc382..3429eb3 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3500,6 +3500,13 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
pkt_dev->last_pkt_size = pkt_dev->skb->len;
pkt_dev->allocated_skbs++;
pkt_dev->clone_count = 0; /* reset counter */
+ } else {
+ struct iphdr *iph;
+ iph = ip_hdr(pkt_dev->skb);
+ iph->id = htons(pkt_dev->ip_id);
+ pkt_dev->ip_id++;
+ iph->check = 0;
+ iph->check = ip_fast_csum((void *)iph, iph->ihl);
}
if (pkt_dev->delay && pkt_dev->last_ok)
--
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
next prev parent reply other threads:[~2011-04-25 11:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 11:34 Hight speed data sending from custom IP out of kernel juice
2011-04-19 11:50 ` Michal Simek
2011-04-19 16:02 ` juice
2011-04-21 8:02 ` Michal Simek
2011-04-21 8:18 ` Eric Dumazet
2011-04-21 9:20 ` Michal Simek
2011-04-25 11:18 ` Michal Simek [this message]
2011-04-25 12:14 ` Eric Dumazet
2011-04-25 12:18 ` Michal Simek
2011-04-25 12:27 ` Eric Dumazet
2011-04-25 12:30 ` Eric Dumazet
2011-04-25 12:48 ` Michal Simek
2011-04-21 13:56 ` zhou rui
2011-04-21 14:31 ` zhou rui
2011-04-21 20:27 ` juice
-- strict thread matches above, loose matches on Subject: below --
2011-04-19 9:49 Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB55876.2010008@monstr.eu \
--to=monstr@monstr.eu \
--cc=eric.dumazet@gmail.com \
--cc=juice@swagman.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.