Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2014 07:38:54 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: UDP/TCP versus IP frames - subtle out of order packets with hardware hashing
Message-ID:  <CAJ-Vmo=K5y21x2qj35ZWTH_qot92PdKSfyv%2B9HXRfDYRFLQnMg@mail.gmail.com>
In-Reply-To: <20140715143635.GA5178@zxy.spb.ru>
References:  <CAJ-VmomUNJ23CHLLX2qryAuE2XQyBmo30du3MuRnobs%2BwEkguA@mail.gmail.com> <53C4EE00.5090705@gmail.com> <20140715093125.GA89128@zxy.spb.ru> <53C507F2.2090604@gmail.com> <20140715113319.GA96254@zxy.spb.ru> <CAJ-VmomTL=fZnjSTBT6-3KNA0DOqNEefoXNwFipade81dSBK5Q@mail.gmail.com> <20140715143635.GA5178@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15 July 2014 07:36, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
> On Tue, Jul 15, 2014 at 07:33:57AM -0700, Adrian Chadd wrote:
>
>> On 15 July 2014 04:33, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
>> > On Tue, Jul 15, 2014 at 03:22:34PM +0430, Hooman Fazaeli wrote:
>> >
>> >> On 7/15/2014 2:01 PM, Slawa Olhovchenkov wrote:
>> >> > On Tue, Jul 15, 2014 at 01:31:52PM +0430, Hooman Fazaeli wrote:
>> >> >
>> >> >> Doesn't the problem applies to TCP too?
>> >> >> TCP may be fragmented too but is less likely because of MSS.
>> >> > Don't forget GRE, IPIP, ESP and AH!
>> >> >
>> >> These protocols don't use port numbers  and the RSS hash is computed based on the
>> >> (srcip,dstip) tuple, so the problem does not apply to them.
>> >
>> > And all flows go to one queue? Bad.
>>
>> All the packets between two IP addresses for non-TCP, non-UDP get
>> hashed to the same CPU core, yes.
>>
>> If you have 1000 IP tunnels to different end-hosts, they'll be on
>> different CPUs.
>
> What about two host, 10G link and 1000 TCP connections over IPsec?

If the IP data is encrypted, including the TCP header, then yes,
receive occurs on one CPU for now. Transmit occurs from multiple CPUs
but it'll likely be serialised through one transmit queue.

If the TCP data is encrypted, but the TCP header is in clear-text and
it's a normal TCP frame, then hardware will hash it across multiple
CPUs.


-a



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=K5y21x2qj35ZWTH_qot92PdKSfyv%2B9HXRfDYRFLQnMg>