netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/3] net/sched: Fix ct zone matching for invalid conntrack state
@ 2021-12-09  7:57 Paul Blakey
  2021-12-09  7:57 ` [PATCH net v2 1/3] net/sched: Extend qdisc control block with tc control block Paul Blakey
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Paul Blakey @ 2021-12-09  7:57 UTC (permalink / raw)
  To: Paul Blakey, dev, netdev, Saeed Mahameed, Cong Wang,
	Jamal Hadi Salim, Pravin B Shelar, davem, Jiri Pirko, wenxu,
	Marcelo Ricardo Leitner
  Cc: Oz Shlomo, Vlad Buslov, Roi Dayan

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:
	1->2:
	  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    |  4 ++--
 include/net/pkt_sched.h   | 16 ++++++++++++++++
 include/net/sch_generic.h |  2 --
 net/core/dev.c            |  8 ++++----
 net/core/flow_dissector.c |  6 +++++-
 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, 52 insertions(+), 23 deletions(-)

-- 
2.30.1


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

end of thread, other threads:[~2021-12-14 17:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-09  7:57 [PATCH net v2 0/3] net/sched: Fix ct zone matching for invalid conntrack state Paul Blakey
2021-12-09  7:57 ` [PATCH net v2 1/3] net/sched: Extend qdisc control block with tc control block Paul Blakey
2021-12-09  7:57 ` [PATCH net v2 2/3] net/sched: flow_dissector: Fix matching on zone id for invalid conns Paul Blakey
2021-12-11  4:52   ` Jakub Kicinski
2021-12-12  0:47     ` Cong Wang
2021-12-14 17:07     ` Paul Blakey
2021-12-09  7:57 ` [PATCH net v2 3/3] net: openvswitch: Fix matching zone id for invalid conns arriving from tc Paul Blakey
2021-12-09 12:11 ` [PATCH net v2 0/3] net/sched: Fix ct zone matching for invalid conntrack state Marcelo Ricardo Leitner

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).