Netdev List
 help / color / mirror / Atom feed
* [PATCH net v1 0/2] net: openvswitch: fix a feature leak on a failed change
@ 2026-11-07 11:34 Minxi Hou
  2026-11-07 11:34 ` [PATCH net v1 1/2] net: openvswitch: do not record user features when the change fails Minxi Hou
  2026-11-07 11:34 ` [PATCH net v1 2/2] selftests/net/openvswitch: check that a failed set keeps the features Minxi Hou
  0 siblings, 2 replies; 7+ messages in thread
From: Minxi Hou @ 2026-11-07 11:34 UTC (permalink / raw)
  To: netdev
  Cc: Aaron Conole, Eelco Chaudron, Ilya Maximets, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Shuah Khan, Jamal Hadi Salim, Paul Blakey, dev, linux-kselftest

ovs_dp_change() records the requested user features before it calls the
update that can fail, so a request rejected for an empty per-cpu-pids
leaves the datapath claiming a feature it never enabled. The tc skb
extension key is a reference count shared with cls_flower, and the code
that would keep it in step is skipped on that path.

Patch 1 fixes the ordering. Patch 2 adds a set-dp command to the
openvswitch selftest tool, and a test that sends such a request and
checks the features the datapath reports afterwards. It fails without
the fix and passes with it.

The problem turned up while the YNL spec for this family was being
written: describing the ovs_datapath set command meant reading
ovs_dp_change(), where the ordering stands out.

Signed-off-by: Minxi Hou <houminxi@gmail.com>

Minxi Hou (2):
Minxi Hou (2):
  net: openvswitch: do not record user features when the change fails
  selftests/net/openvswitch: check that a failed set keeps the features

 net/openvswitch/datapath.c                    | 10 +--
 .../selftests/net/openvswitch/openvswitch.sh  | 64 +++++++++++++++++++
 .../selftests/net/openvswitch/ovs-dpctl.py    | 50 +++++++++++++++
 3 files changed, 119 insertions(+), 5 deletions(-)


base-commit: 30c71476d842b094651bd7712f6c8ee8716147d0
-- 
2.56.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-08 12:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07 11:34 [PATCH net v1 0/2] net: openvswitch: fix a feature leak on a failed change Minxi Hou
2026-11-07 11:34 ` [PATCH net v1 1/2] net: openvswitch: do not record user features when the change fails Minxi Hou
2026-11-08 12:04   ` netdev-bot+sashiko
2026-11-08 12:35   ` Minxi Hou
2026-11-07 11:34 ` [PATCH net v1 2/2] selftests/net/openvswitch: check that a failed set keeps the features Minxi Hou
2026-11-08 12:04   ` netdev-bot+sashiko
2026-11-08 12:35   ` Minxi Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox