netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Moreno <amorenoz@redhat.com>
To: Ilya Maximets <i.maximets@ovn.org>, netdev@vger.kernel.org
Cc: aconole@redhat.com, eric@garver.life, dev@openvswitch.org
Subject: Re: [net-next v3 1/7] net: openvswitch: add datapath flow drop reason
Date: Wed, 9 Aug 2023 08:47:12 +0200	[thread overview]
Message-ID: <a4dd0cf5-716a-feb9-5ba1-ec09636735a0@redhat.com> (raw)
In-Reply-To: <40427d41-dc23-e777-4536-6bd0a8c1cb33@ovn.org>



On 8/8/23 20:02, Ilya Maximets wrote:
> On 8/7/23 18:45, Adrian Moreno wrote:
>> Create a new drop reason subsystem for openvswitch and add the first
>> drop reason to represent flow drops.
>>
>> A flow drop happens when a flow has an empty action-set or there is no
>> action that consumes the packet (output, userspace, recirc, etc).
>>
>> Implementation-wise, most of these skb-consuming actions already call
>> "consume_skb" internally and return directly from within the
>> do_execute_actions() loop so with minimal changes we can assume that
>> any skb that exits the loop normally is a packet drop.
>>
>> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
>> ---
>>   include/net/dropreason.h   |  6 ++++++
>>   net/openvswitch/actions.c  | 12 ++++++++++--
>>   net/openvswitch/datapath.c | 16 ++++++++++++++++
>>   net/openvswitch/drop.h     | 24 ++++++++++++++++++++++++
>>   4 files changed, 56 insertions(+), 2 deletions(-)
>>   create mode 100644 net/openvswitch/drop.h
> 
> <snip>
> 
>> diff --git a/net/openvswitch/drop.h b/net/openvswitch/drop.h
>> new file mode 100644
>> index 000000000000..cdd10629c6be
>> --- /dev/null
>> +++ b/net/openvswitch/drop.h
>> @@ -0,0 +1,24 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +/*
>> + * OpenvSwitch drop reason list.
>> + */
>> +
>> +#ifndef OPENVSWITCH_DROP_H
>> +#define OPENVSWITCH_DROP_H
>> +#include <net/dropreason.h>
>> +
>> +#define OVS_DROP_REASONS(R)			\
>> +	R(OVS_DROP_FLOW)		        \
> 
> Hi, Adrian.  Not a full review, just complaining about names. :)
> 
> The OVS_DROP_FLOW seems a bit confusing and unclear.  A "flow drop"
> is also a strange term to use.  Maybe we can somehow express in the
> name that this drop reason is used when there are no actions left
> to execute?  e.g. OVS_DROP_NO_MORE_ACTIONS or OVS_DROP_LAST_ACTION
> or OVS_DROP_END_OF_ACTION_LIST or something of that sort?  These may
> seem long, but they are not longer than some other names introduced
> later in the set.  What do yo think?
> 

Hi Ilya,

Thanks for the suggestion. It looks reasonable. I did consider something similar 
but then it felt like having a bit of an "unexpected" or "involuntary" 
connotation. Given that there are other drop reasons that are involutary I 
wanted to somehow differentiate this one from the rest.

Semantically it'd mean something like: When a flow is deliberately installed 
with an empty action list it means "it" (the flow?) _wants_ to drop the packet, 
that's why I ended at that name.

OVS_DROP_LAST_ACTION seems to convey this intentionality as well. I'll can send 
another version changing all names.

Thanks.

-- 
Adrián Moreno


  reply	other threads:[~2023-08-09  6:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 16:45 [net-next v3 0/7] openvswitch: add drop reasons Adrian Moreno
2023-08-07 16:45 ` [net-next v3 1/7] net: openvswitch: add datapath flow drop reason Adrian Moreno
2023-08-08 14:36   ` Aaron Conole
2023-08-08 18:02   ` Ilya Maximets
2023-08-09  6:47     ` Adrian Moreno [this message]
2023-08-07 16:45 ` [net-next v3 2/7] net: openvswitch: add action error " Adrian Moreno
2023-08-08 14:37   ` Aaron Conole
2023-08-07 16:45 ` [net-next v3 3/7] net: openvswitch: add explicit drop action Adrian Moreno
2023-08-08 14:53   ` Aaron Conole
2023-08-09  6:49     ` Adrian Moreno
2023-08-08 18:10   ` Ilya Maximets
2023-08-09  7:03     ` Adrian Moreno
2023-08-07 16:45 ` [net-next v3 4/7] net: openvswitch: add meter drop reason Adrian Moreno
2023-08-08 14:53   ` Aaron Conole
2023-08-07 16:45 ` [net-next v3 5/7] net: openvswitch: add misc error drop reasons Adrian Moreno
2023-08-08 14:56   ` Aaron Conole
2023-08-07 16:45 ` [net-next v3 6/7] selftests: openvswitch: add drop reason testcase Adrian Moreno
2023-08-08 15:04   ` Aaron Conole
2023-08-07 16:45 ` [net-next v3 7/7] selftests: openvswitch: add explicit drop testcase Adrian Moreno
2023-08-08 15:02   ` Aaron Conole
2023-08-09  7:02     ` Adrian Moreno
2023-08-09 15:18       ` 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=a4dd0cf5-716a-feb9-5ba1-ec09636735a0@redhat.com \
    --to=amorenoz@redhat.com \
    --cc=aconole@redhat.com \
    --cc=dev@openvswitch.org \
    --cc=eric@garver.life \
    --cc=i.maximets@ovn.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;
as well as URLs for NNTP newsgroup(s).