mbox series

[net-next,v5,0/7] openvswitch: add drop reasons

Message ID 20230811141255.4103827-1-amorenoz@redhat.com (mailing list archive)
Headers show
Series openvswitch: add drop reasons | expand

Message

Adrián Moreno Aug. 11, 2023, 2:12 p.m. UTC
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")

---
v4 -> v5:
- Rebased
- Added a helper function to explicitly convert drop reason enum types

v3 -> v4:
- Changed names of errors following Ilya's suggestions
- Moved the ovs-dpctl.py changes from patch 7/7 to 3/7
- Added a test to ensure actions following a drop are rejected

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 last-action 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                        |  41 +++++++
 net/openvswitch/flow_netlink.c                |  10 +-
 .../selftests/net/openvswitch/openvswitch.sh  | 102 +++++++++++++++++-
 .../selftests/net/openvswitch/ovs-dpctl.py    |  22 +++-
 9 files changed, 226 insertions(+), 18 deletions(-)
 create mode 100644 net/openvswitch/drop.h

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 14, 2023, 7:10 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 11 Aug 2023 16:12:47 +0200 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,1/7] net: openvswitch: add last-action drop reason
    https://git.kernel.org/netdev/net-next/c/9d802da40b7c
  - [net-next,v5,2/7] net: openvswitch: add action error drop reason
    https://git.kernel.org/netdev/net-next/c/ec7bfb5e5a05
  - [net-next,v5,3/7] net: openvswitch: add explicit drop action
    https://git.kernel.org/netdev/net-next/c/e7bc7db9ba46
  - [net-next,v5,4/7] net: openvswitch: add meter drop reason
    https://git.kernel.org/netdev/net-next/c/f329d1bc1a45
  - [net-next,v5,5/7] net: openvswitch: add misc error drop reasons
    https://git.kernel.org/netdev/net-next/c/43d95b30cf57
  - [net-next,v5,6/7] selftests: openvswitch: add drop reason testcase
    https://git.kernel.org/netdev/net-next/c/aab1272f5dac
  - [net-next,v5,7/7] selftests: openvswitch: add explicit drop testcase
    https://git.kernel.org/netdev/net-next/c/4242029164d6

You are awesome, thank you!