From: Daniel Borkmann <daniel@iogearbox.net>
To: Ben Greear <greearb@candelatech.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <tom@herbertland.com>, netdev <netdev@vger.kernel.org>
Subject: Re: How to do TCP tx checksums
Date: Tue, 17 Nov 2015 20:40:40 +0100 [thread overview]
Message-ID: <564B82B8.8060507@iogearbox.net> (raw)
In-Reply-To: <564B72BC.6060702@candelatech.com>
On 11/17/2015 07:32 PM, Ben Greear wrote:
> On 11/17/2015 10:26 AM, Eric Dumazet wrote:
>> On Tue, 2015-11-17 at 09:44 -0800, Ben Greear wrote:
>>
>>> And in case it helps, here is the output from dmesg.
>>>
>>> This is an Ethernet frame, and in this case csum-start is the
>>> index of the first byte of the TCP header as far as I can tell.
>>>
>>> [64967.194251] check: 0xf51b csum-start: 34 offset: 16 summed: 0x3 saddr: 0x201010a daddr: 0x101010a len: 1514
>>>
>>
>> You forgot to clear tcp header @check before calling
>> __tcp_v4_send_check(), I think.
>>
>> ( th->check = 0; )
>
> From printk I added to e1000e, it looks like I have bad offsets
> somehow. I'll try clearing check as well, however.
>
>> Anyway, just use trafgen and get ~6 Mpps, more easily than with pktgen.
>
> I do plan to look at this...but need to make sure I can get similar
> features before I ditch pktgen. It's not just raw throughput that is
> of interest to me, but also randomizing, sequential, etc header fields
> to test various network equipment (routers, MAC tables in switches, etc).
trafgen has a number of these things you mentioned. It started out as a
hobby project longer time ago as a simple way to tx raw frames, which was
needed to test some kernel project back in the days. Of course, nothing
is perfect and patches are always welcome. And if we can also get AF_PACKET
into a better shape by this, even better. ;)
next prev parent reply other threads:[~2015-11-17 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 0:20 How to do TCP tx checksums Ben Greear
2015-11-17 5:02 ` Tom Herbert
2015-11-17 5:47 ` Eric Dumazet
2015-11-17 17:19 ` Ben Greear
2015-11-17 17:44 ` Ben Greear
2015-11-17 18:26 ` Eric Dumazet
2015-11-17 18:32 ` Ben Greear
2015-11-17 19:40 ` Daniel Borkmann [this message]
2015-11-17 19:28 ` David Miller
2015-11-17 21:22 ` Ben Greear
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=564B82B8.8060507@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=eric.dumazet@gmail.com \
--cc=greearb@candelatech.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).