mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Justin Iurman <justin.iurman@uliege.be>, netdev@vger.kernel.org
Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
	kuba@kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: ioam6: mitigate the two reallocations problem
Date: Thu, 04 Jul 2024 11:23:31 +0200	[thread overview]
Message-ID: <54d30d951eddf0846b88b7f9f73ce16994550bd7.camel@redhat.com> (raw)
In-Reply-To: <20240702174451.22735-3-justin.iurman@uliege.be>

On Tue, 2024-07-02 at 19:44 +0200, Justin Iurman wrote:
> @@ -313,6 +316,10 @@ static int ioam6_output(struct net *net, struct sock *sk, struct sk_buff *skb)
>  
>  	orig_daddr = ipv6_hdr(skb)->daddr;
>  
> +	local_bh_disable();
> +	dst = dst_cache_get(&ilwt->cache);
> +	local_bh_enable();
> +
>  	switch (ilwt->mode) {
>  	case IOAM6_IPTUNNEL_MODE_INLINE:

I now see that the way you coded patch 1/2 makes this one easier.

Still I think it's quite doubtful to make the dst cache access
unconditional.

Given the above I suggest to replace the 2 patches with a single one
moving the whole dst_cache logic before the switch statement.

Also this does not address a functional issue, IMHO it's more a
performance improvement, could as well target net-next with no fixes
tag.

WRT seg6 and rpl tunnels, before any patch, I think we first need
confirmation the problem is present there, too.

Thanks,

Paolo


  parent reply	other threads:[~2024-07-04  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 17:44 [PATCH net 0/2] net: ioam6: fix bugs in ioam6_iptunnel Justin Iurman
2024-07-02 17:44 ` [PATCH net 1/2] net: ioam6: use "new" dst entry with skb_cow_head Justin Iurman
2024-07-04  9:08   ` Paolo Abeni
2024-07-02 17:44 ` [PATCH net 2/2] net: ioam6: mitigate the two reallocations problem Justin Iurman
2024-07-02 18:30   ` Justin Iurman
2024-07-04  9:23   ` Paolo Abeni [this message]
2024-07-04 11:58     ` Justin Iurman

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=54d30d951eddf0846b88b7f9f73ce16994550bd7.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=justin.iurman@uliege.be \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®