From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
To: Evgeniy Polyakov <zbr@ioremap.net>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
Liran Liss <liranl@mellanox.co.il>,
Tziporet Koren <tziporet@mellanox.co.il>
Subject: Re: IP LRO
Date: Thu, 08 Jan 2009 12:35:00 +0200 [thread overview]
Message-ID: <4965D6D4.3010000@mellanox.co.il> (raw)
In-Reply-To: <20090108091755.GA23458@ioremap.net>
Hi,
Thanks for your comments
>> We have recently implemented a reassembly of fragmented IP packets in
>> mlx4_en driver. This offload gives a performance boost in case of incoming
>> traffic with fragmented packets (such as UDP traffic with message size larger
>> then MTU). The attached patch contains this offload. I believe that we can make
>> this code generic, maybe part of inet_lro.
>> Please review and comment.
>
> Frankly from the patch it is quite hard to tell if it is suitable or not
> for the generic usage. For example no structure access or lookup are
> guarded with some locks, likely they are somewhere in the driver itself,
> so at least it should be documented. Fragment structure can be
> rearranged to better fit the alignment rules of the platform (there are
> gaps even on 32bit). Please provide higher-level description on how it
> operates compared to existing GRO/LRO (except that it is one layer lower),
> how strcutres are operated, what are the lifetime rules for them and
> appropriate skbs, what are the usage case. How will it live with
> GRO/LRO, i.e. who will steal the skb if it matches both subsystems.
>
The patch that I sent is suitable for our driver only. Naturally, to make
the code generic, changes are required. The structures protection is done
in the driver's receive flow. The sessions are per RX ring, and for each ring we
handle the skbs sequentially.
This feature only handles packets that are not eligible for LRO. The skb should be
IPv4 and IP fragmented. We currently only work with skb_frags, but there should not
be a problem to add skb mode.
Packet is flushed in the following cases:
1. The last fragment of the IP packet arrived.
2. Received an "out of order" fragment (its offset doesn't fit what we are expecting)
In this case all the aggregated fragments are flushed, and we start a new session.
3. Finished completion handle, we don't want to delay the packets for a long time.
Yevgeny
prev parent reply other threads:[~2009-01-08 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 8:54 IP LRO Yevgeny Petrilin
2009-01-08 9:17 ` Evgeniy Polyakov
2009-01-08 10:35 ` Yevgeny Petrilin [this message]
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=4965D6D4.3010000@mellanox.co.il \
--to=yevgenyp@mellanox.co.il \
--cc=davem@davemloft.net \
--cc=liranl@mellanox.co.il \
--cc=netdev@vger.kernel.org \
--cc=tziporet@mellanox.co.il \
--cc=zbr@ioremap.net \
/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).