netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Nikishkin <vladimir@nikishkin.pw>
To: Simon Horman <simon.horman@corigine.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com,
	eng.alaamohamedsoliman.am@gmail.com, gnault@redhat.com,
	razor@blackwall.org
Subject: Re: [PATCH net-next v5] vxlan: try to send a packet normally if local bypass fails
Date: Wed, 05 Apr 2023 13:05:02 +0800	[thread overview]
Message-ID: <87o7o2vrd0.fsf@laptop.lockywolf.net> (raw)
In-Reply-To: <ZBxycrxU93mhgkAT@corigine.com>


Simon Horman <simon.horman@corigine.com> writes:

> I'm a bit unsure about the logic around dst_release().
> But assuming it is correct, perhaps this is a slightly

Let me try to defend this logic.

In the previous version, if the destination is local (the first "if"),
then there is no need to keep the address in memory any more, hence the
address was free()'d at the beginning of the "if" (and was not freed
after the "if", because the address was still needed at the userspace
part.)

With this patch, the "localbypass" creates one more branch inside that
"if", which is handing over the processing logic to the userspace (which
has no free()). The older two branches _inside_ the "if" (vxlan
found/vxlan not found) are still terminating, and therefore have one
call to free() each.

Ido Schimmel <idosch@idosch.org> writes:

> Also, please add a selftest under tools/testing/selftests/net/. We
> already have a bunch of VXLAN tests that you can use as a reference.

I have added a file
tools/testing/selftests/net/test_vxlan_nolocalbypass.sh
, which is written on the basis of test_vxlan_mdb.sh

Some tests do have a "testing framework" for enumerating and running
tests (for example, those in ./forwarding/lib.sh), and some do not. I
have used the simplest one.

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)
--
Fastmail.


  reply	other threads:[~2023-04-05  5:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  4:26 [PATCH net-next v5] vxlan: try to send a packet normally if local bypass fails Vladimir Nikishkin
2023-03-23 15:38 ` Simon Horman
2023-04-05  5:05   ` Vladimir Nikishkin [this message]
2023-04-05 10:20     ` Simon Horman
2023-04-05 11:24       ` Vladimir Nikishkin

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=87o7o2vrd0.fsf@laptop.lockywolf.net \
    --to=vladimir@nikishkin.pw \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eng.alaamohamedsoliman.am@gmail.com \
    --cc=gnault@redhat.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=simon.horman@corigine.com \
    /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).