All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Andrea Mayer <andrea.mayer@uniroma2.it>,
	"David S. Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Stefano Salsano <stefano.salsano@uniroma2.it>,
	Paolo Lungaroni <paolo.lungaroni@uniroma2.it>,
	Ahmed Abdelsalam <ahabdels.dev@gmail.com>
Subject: Re: [net-next] seg6: add counters support for SRv6 Behaviors
Date: Wed, 28 Apr 2021 20:03:23 -0600	[thread overview]
Message-ID: <a49ed340-3f92-8533-3efb-ac7ee2231ca3@gmail.com> (raw)
In-Reply-To: <20210427154404.20546-1-andrea.mayer@uniroma2.it>

On 4/27/21 9:44 AM, Andrea Mayer wrote:
> This patch provides counters for SRv6 Behaviors as defined in [1],
> section 6. For each SRv6 Behavior instance, counters defined in [1] are:
> 
>  - the total number of packets that have been correctly processed;
>  - the total amount of traffic in bytes of all packets that have been
>    correctly processed;
> 

...

> 
> Results of tests are shown in the following table:
> 
> Scenario (1): average 1504764,81 pps (~1504,76 kpps); std. dev 3956,82 pps
> Scenario (2): average 1501469,78 pps (~1501,47 kpps); std. dev 2979,85 pps
> Scenario (3): average 1501315,13 pps (~1501,32 kpps); std. dev 2956,00 pps
> 
> As can be observed, throughputs achieved in scenarios (2),(3) did not
> suffer any observable degradation compared to scenario (1).
> 
> Thanks to Jakub Kicinski and David Ahern for their valuable suggestions
> and comments provided during the discussion of the proposed RFCs.
> 
> [2] https://www.cloudlab.us
> 
> Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
> ---
>  include/uapi/linux/seg6_local.h |  30 +++++
>  net/ipv6/seg6_local.c           | 198 +++++++++++++++++++++++++++++++-
>  2 files changed, 226 insertions(+), 2 deletions(-)

Thanks for the detailed commit message and stats on performance impact.

> @@ -977,7 +1044,14 @@ static int seg6_local_input(struct sk_buff *skb)
>  	slwt = seg6_local_lwtunnel(orig_dst->lwtstate);
>  	desc = slwt->desc;
>  
> -	return desc->input(skb, slwt);
> +	rc = desc->input(skb, slwt);
> +
> +	if (!seg6_lwtunnel_counters_enabled(slwt))
> +		return rc;
> +
> +	seg6_local_update_counters(slwt, len, rc);
> +
> +	return rc;

Nit: This would be simpler as

	if (seg6_lwtunnel_counters_enabled(slwt))
		seg6_local_update_counters(slwt, len, rc);

	return rc;

but not worth a re-do since net-next is about to close, so:

Reviewed-by: David Ahern <dsahern@kernel.org>


  reply	other threads:[~2021-04-29  2:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 15:44 [net-next] seg6: add counters support for SRv6 Behaviors Andrea Mayer
2021-04-29  2:03 ` David Ahern [this message]
2021-04-29 22:40 ` patchwork-bot+netdevbpf

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=a49ed340-3f92-8533-3efb-ac7ee2231ca3@gmail.com \
    --to=dsahern@gmail.com \
    --cc=ahabdels.dev@gmail.com \
    --cc=andrea.mayer@uniroma2.it \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paolo.lungaroni@uniroma2.it \
    --cc=stefano.salsano@uniroma2.it \
    --cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.