netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Daniel Axtens <dja@axtens.net>
Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH 3/3] docs: segmentation-offloads.txt: add SCTP info
Date: Wed, 14 Feb 2018 11:00:43 -0200	[thread overview]
Message-ID: <20180214130043.GA4625@localhost.localdomain> (raw)
In-Reply-To: <20180214070533.28377-4-dja@axtens.net>

On Wed, Feb 14, 2018 at 06:05:33PM +1100, Daniel Axtens wrote:
> Most of this is extracted from 90017accff61 ("sctp: Add GSO support"),
> with some extra text about GSO_BY_FRAGS and the need to check for it.
> 
> Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

> ---
>  Documentation/networking/segmentation-offloads.txt | 26 ++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/Documentation/networking/segmentation-offloads.txt b/Documentation/networking/segmentation-offloads.txt
> index b247471a183c..d47480b61ac6 100644
> --- a/Documentation/networking/segmentation-offloads.txt
> +++ b/Documentation/networking/segmentation-offloads.txt
> @@ -13,6 +13,7 @@ The following technologies are described:
>   * Generic Segmentation Offload - GSO
>   * Generic Receive Offload - GRO
>   * Partial Generic Segmentation Offload - GSO_PARTIAL
> + * SCTP accelleration with GSO - GSO_BY_FRAGS
>  
>  TCP Segmentation Offload
>  ========================
> @@ -132,3 +133,28 @@ values for if the header was simply duplicated.  The one exception to this
>  is the outer IPv4 ID field.  It is up to the device drivers to guarantee
>  that the IPv4 ID field is incremented in the case that a given header does
>  not have the DF bit set.
> +
> +SCTP accelleration with GSO
> +===========================
> +
> +SCTP - despite the lack of hardware support - can still take advantage of
> +GSO to pass one large packet through the network stack, rather than
> +multiple small packets.
> +
> +This requires a different approach to other offloads, as SCTP packets
> +cannot be just segmented to (P)MTU. Rather, the chunks must be contained in
> +IP segments, padding respected. So unlike regular GSO, SCTP can't just
> +generate a big skb, set gso_size to the fragmentation point and deliver it
> +to IP layer.
> +
> +Instead, the SCTP protocol layer builds an skb with the segments correctly
> +padded and stored as chained skbs, and skb_segment() splits based on those.
> +To signal this, gso_size is set to the special value GSO_BY_FRAGS.
> +
> +Therefore, any code in the core networking stack must be aware of the
> +possibility that gso_size will be GSO_BY_FRAGS and handle that case
> +appropriately. (For size checks, the skb_gso_validate_*_len family of
> +helpers do this automatically.)
> +
> +This also affects drivers with the NETIF_F_FRAGLIST & NETIF_F_GSO_SCTP bits
> +set. Note also that NETIF_F_GSO_SCTP is included in NETIF_F_GSO_SOFTWARE.
> -- 
> 2.14.1
> 

  reply	other threads:[~2018-02-14 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14  7:05 [PATCH 0/3] Updates to segmentation-offloads.txt Daniel Axtens
2018-02-14  7:05 ` [PATCH 1/3] docs: segmentation-offloads.txt: update for UFO depreciation Daniel Axtens
2018-02-14  7:05 ` [PATCH 2/3] docs: segmentation-offloads.txt: Fix ref to SKB_GSO_TUNNEL_REMCSUM Daniel Axtens
2018-02-14  7:05 ` [PATCH 3/3] docs: segmentation-offloads.txt: add SCTP info Daniel Axtens
2018-02-14 13:00   ` Marcelo Ricardo Leitner [this message]
2018-02-14 19:54 ` [PATCH 0/3] Updates to segmentation-offloads.txt David Miller

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=20180214130043.GA4625@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=dja@axtens.net \
    --cc=linux-sctp@vger.kernel.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 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).