Skip to content

net/sched: Fix ct zone matching for invalid conntrack state

Paul Blakey netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 2 repliesSuperseded

v3->v2 from the cover letter

Moved tc skb cb details from dissector back to flower

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net/sched: Extend qdisc control block with tc control blockinclude/net/pkt_sched.h include/net/sch_generic.h net/core/dev.c +4 more+34 -170 repliesApplied
2/3net/sched: flow_dissector: Fix matching on zone id for invalid connsinclude/linux/skbuff.h include/net/pkt_sched.h net/core/flow_dissector.c +2 more+7 -30 repliesApplied
3/3net: openvswitch: Fix matching zone id for invalid conns arriving from tcinclude/linux/skbuff.h net/openvswitch/flow.c net/sched/cls_api.c+9 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net v3 0/3] net/sched: Fix ct zone matching for invalid conntrack state

Hi,

Currently, when a packet is marked as invalid conntrack_in in act_ct, post_ct will be set, and connection info (nf_conn) will be removed from the skb. Later openvswitch and flower matching will parse this as ct_state=+trk+inv. But because the connection info is missing, there is also no zone info to match against even though the packet is tracked.

This series fixes that, by passing the last executed zone by act_ct. The zone info is passed along from act_ct to the ct flow dissector (used by flower to extract zone info) and to ovs, the same way as post_ct is passed, via qdisc layer skb cb to dissector, and via skb extension to OVS.

Since adding any more data to qdisc skb cb, there will be no room for BPF skb cb to extend it and stay under skb->cb size, this series moves the tc related info from within qdisc skb cb to a tc specific cb that also extends it.

---
Changelog:
v3->v2:
Moved tc skb cb details from dissector back to flower
v1->v2:
Cover letter wording
Added blamed CCs

Paul Blakey (3):
net/sched: Extend qdisc control block with tc control block net/sched: flow_dissector: Fix matching on zone id for invalid conns
net: openvswitch: Fix matching zone id for invalid conns arriving from tc

 include/linux/skbuff.h    |  3 ++-
 include/net/pkt_sched.h   | 16 ++++++++++++++++
 include/net/sch_generic.h |  2 --
 net/core/dev.c            |  8 ++++----
 net/core/flow_dissector.c |  3 ++-
 net/openvswitch/flow.c    |  8 +++++++-
 net/sched/act_ct.c        | 15 ++++++++-------
 net/sched/cls_api.c       |  7 +++++--
 net/sched/cls_flower.c    |  6 ++++--
 net/sched/sch_frag.c      |  3 ++-
 10 files changed, 50 insertions(+), 21 deletions(-)
Signature · 1 line
2.30.1