From: Aaron Conole <aconole@redhat.com>
To: Ilya Maximets <i.maximets@ovn.org>
Cc: netdev@vger.kernel.org, Pravin B Shelar <pshelar@ovn.org>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>, Thomas Graf <tgraf@suug.ch>,
dev@openvswitch.org, Eelco Chaudron <echaudro@redhat.com>,
Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [RFC net-next 1/6] openvswitch: exclude kernel flow key from upcalls
Date: Tue, 29 Nov 2022 09:30:38 -0500 [thread overview]
Message-ID: <f7ta649sui9.fsf@redhat.com> (raw)
In-Reply-To: <c04242ee-f125-6d95-e263-65470222d3cf@ovn.org> (Ilya Maximets's message of "Wed, 23 Nov 2022 22:22:23 +0100")
Ilya Maximets <i.maximets@ovn.org> writes:
> On 11/22/22 15:03, Aaron Conole wrote:
>> When processing upcall commands, two groups of data are available to
>> userspace for processing: the actual packet data and the kernel
>> sw flow key data. The inclusion of the flow key allows the userspace
>> avoid running through the dissection again.
>>
>> However, the userspace can choose to ignore the flow key data, as is
>> the case in some ovs-vswitchd upcall processing. For these messages,
>> having the flow key data merely adds additional data to the upcall
>> pipeline without any actual gain. Userspace simply throws the data
>> away anyway.
>
> Hi, Aaron. While it's true that OVS in userpsace is re-parsing the
> packet from scratch and using the newly parsed key for the OpenFlow
> translation, the kernel-porvided key is still used in a few important
> places. Mainly for the compatibility checking. The use is described
> here in more details:
> https://docs.kernel.org/networking/openvswitch.html#flow-key-compatibility
>
> We need to compare the key generated in userspace with the key
> generated by the kernel to know if it's safe to install the new flow
> to the kernel, i.e. if the kernel and OVS userpsace are parsing the
> packet in the same way.
>
> On the other hand, OVS today doesn't check the data, it only checks
> which fields are present. So, if we can generate and pass the bitmap
> of fields present in the key or something similar without sending the
> full key, that might still save some CPU cycles and memory in the
> socket buffer while preserving the ability to check for forward and
> backward compatibility. What do you think?
Maybe that can work. I will try testing. If so, then I would change
this semantic to send just the bitmap rather than omitting everything.
> The rest of the patch set seems useful even without patch #1 though.
I agree - but I didn't know if it made sense to submit the series
without adding something impactful (like a test). I will work a bit
more on the flow area - maybe I can add enough actions and matches to
implement basic flow tests to submit while we think more about the feature.
> Nit: This patch #1 should probably be merged with the patch #6 and be
> at the end of a patch set, so the selftest and the main code are updated
> at the same time.
Okay - I can restructure them this way.
> Best regards, Ilya Maximets.
next prev parent reply other threads:[~2022-11-29 14:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 14:03 [RFC net-next 0/6] Allow excluding sw flow key from upcalls Aaron Conole
2022-11-22 14:03 ` [RFC net-next 1/6] openvswitch: exclude kernel " Aaron Conole
2022-11-23 21:22 ` Ilya Maximets
2022-11-25 15:29 ` [ovs-dev] " Adrian Moreno
2022-11-25 15:51 ` Ilya Maximets
2022-11-28 9:12 ` Adrian Moreno
2022-11-29 14:26 ` Aaron Conole
2022-11-29 14:30 ` Aaron Conole [this message]
2022-11-22 14:03 ` [RFC net-next 2/6] selftests: openvswitch: add interface support Aaron Conole
2022-11-22 14:03 ` [RFC net-next 3/6] selftests: openvswitch: add flow dump support Aaron Conole
2022-11-22 14:03 ` [RFC net-next 4/6] selftests: openvswitch: adjust datapath NL message Aaron Conole
2022-11-22 14:03 ` [RFC net-next 5/6] selftests: openvswitch: add upcall support Aaron Conole
2022-11-22 14:03 ` [RFC net-next 6/6] selftests: openvswitch: add exclude support for packet commands Aaron Conole
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=f7ta649sui9.fsf@redhat.com \
--to=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pshelar@ovn.org \
--cc=shuah@kernel.org \
--cc=tgraf@suug.ch \
/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).