netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Anton Makarov <antonmakarov11235@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	david.lebrun@uclouvain.be,
	Anton Makarov <anton.makarov11235@gmail.com>
Subject: Re: [net-next 1/1] net: seg6: Add support for SRv6 Headend Reduced Encapsulation
Date: Wed, 8 Jun 2022 20:45:18 -0700	[thread overview]
Message-ID: <20220608204518.4b23c3ca@kernel.org> (raw)
In-Reply-To: <20220608112646.9331-1-anton.makarov11235@gmail.com>

On Wed,  8 Jun 2022 14:26:46 +0300 Anton Makarov wrote:
> SRv6 Headend H.Encaps.Red and H.Encaps.L2.Red behaviors are implemented
> accordingly to RFC 8986. The H.Encaps.Red is an optimization of
> The H.Encaps behavior. The H.Encaps.L2.Red is an optimization of
> the H.Encaps.L2 behavior. Both new behaviors reduce the length of
> the SRH by excluding the first SID in the SRH of the pushed IPv6 header.
> The first SID is only placed in the Destination Address field
> of the pushed IPv6 header.
> 
> The push of the SRH is omitted when the SRv6 Policy only contains
> one segment.

missing byte swaps (install sparse and build with C=1 to catch it):

net/ipv6/seg6_iptunnel.c:237:56: warning: incorrect type in argument 1 (different base types)
net/ipv6/seg6_iptunnel.c:237:56:    expected restricted __be32 [usertype] flowinfo
net/ipv6/seg6_iptunnel.c:237:56:    got unsigned char [usertype] tos

Other random notes on things that jumped out:

> +	memset(skb->cb, 0, 48);

sizeof() is better

> +EXPORT_SYMBOL_GPL(seg6_do_srh_encap_red);

Why the export, this function should be static it seems, it's only used
in a since C source.

  reply	other threads:[~2022-06-09  3:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 11:26 [net-next 1/1] net: seg6: Add support for SRv6 Headend Reduced Encapsulation Anton Makarov
2022-06-09  3:45 ` Jakub Kicinski [this message]
2022-06-10  0:52 ` kernel test robot

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=20220608204518.4b23c3ca@kernel.org \
    --to=kuba@kernel.org \
    --cc=anton.makarov11235@gmail.com \
    --cc=antonmakarov11235@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.lebrun@uclouvain.be \
    --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).