netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Moreno <amorenoz@redhat.com>
To: netdev@vger.kernel.org
Cc: Adrian Moreno <amorenoz@redhat.com>,
	aconole@redhat.com, i.maximets@ovn.org, eric@garver.life,
	dev@openvswitch.org
Subject: [net-next v3 0/7] openvswitch: add drop reasons
Date: Mon,  7 Aug 2023 18:45:41 +0200	[thread overview]
Message-ID: <20230807164551.553365-1-amorenoz@redhat.com> (raw)

There is currently a gap in drop visibility in the openvswitch module.
This series tries to improve this by adding a new drop reason subsystem
for OVS.

Apart from adding a new drop reasson subsystem and some common drop
reasons, this series takes Eric's preliminary work [1] on adding an
explicit drop action and integrates it into the same subsystem.

A limitation of this series is that it does not report upcall errors.
The reason is that there could be many sources of upcall drops and the
most common one, which is the netlink buffer overflow, cannot be
reported via kfree_skb() because the skb is freed in the netlink layer
(see [2]). Therefore, using a reason for the rare events and not the
common one would be even more misleading. I'd propose we add (in a
follow up patch) a tracepoint to better report upcall errors.

[1] https://lore.kernel.org/netdev/202306300609.tdRdZscy-lkp@intel.com/T/
[2] commit 1100248a5c5c ("openvswitch: Fix double reporting of drops in dropwatch")

---
rfc2 -> v3:
- Rebased on top of latest net-next

rfc1 -> rfc2:
- Fail when an explicit drop is not the last
- Added a drop reason for action errors
- Added braces around macros
- Dropped patch that added support for masks in ovs-dpctl.py as it's now
  included in Aaron's series [2].

Adrian Moreno (6):
  net: openvswitch: add datapath flow drop reason
  net: openvswitch: add action error drop reason
  net: openvswitch: add meter drop reason
  net: openvswitch: add misc error drop reasons
  selftests: openvswitch: add drop reason testcase
  selftests: openvswitch: add explicit drop testcase

Eric Garver (1):
  net: openvswitch: add explicit drop action

 include/net/dropreason.h                      |  6 ++
 include/uapi/linux/openvswitch.h              |  2 +
 net/openvswitch/actions.c                     | 42 ++++++---
 net/openvswitch/conntrack.c                   |  3 +-
 net/openvswitch/datapath.c                    | 16 ++++
 net/openvswitch/drop.h                        | 34 +++++++
 net/openvswitch/flow_netlink.c                | 10 +-
 .../selftests/net/openvswitch/openvswitch.sh  | 92 ++++++++++++++++++-
 .../selftests/net/openvswitch/ovs-dpctl.py    | 22 ++++-
 9 files changed, 209 insertions(+), 18 deletions(-)
 create mode 100644 net/openvswitch/drop.h

-- 
2.41.0


             reply	other threads:[~2023-08-07 16:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 16:45 Adrian Moreno [this message]
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
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=20230807164551.553365-1-amorenoz@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).