Thread (16 messages) 16 messages, 6 authors, 2023-09-05

Re: [PATCH net-next v2 2/3] net/sched: cls_api: Expose tc block ports to the datapath

From: Marcelo Ricardo Leitner <hidden>
Date: 2023-08-23 17:33:53

On Sat, Aug 19, 2023 at 01:35:13PM -0300, Victor Nogueira wrote:
The datapath can now find the block of the port in which the packet arrived
at. It can then use it for various activities.
I think $subject needs a s/ports//. Because, well, the patch is
exposing the block, which contains the ports.. The first sentence here
goes along with this rationale.

more below
In the next patch we show a simple action that multicasts to all ports
excep for the port in which the packet arrived on.
"except"
quoted hunk ↗ jump to hunk
Co-developed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Co-developed-by: Pedro Tammela <redacted>
Signed-off-by: Pedro Tammela <redacted>
Signed-off-by: Victor Nogueira <redacted>
---
 include/net/sch_generic.h |  4 ++++
 net/sched/cls_api.c       | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 824a0ecb5afc..c5defb166ef6 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -440,6 +440,8 @@ struct qdisc_skb_cb {
 	};
 #define QDISC_CB_PRIV_LEN 20
 	unsigned char		data[QDISC_CB_PRIV_LEN];
+	/* This should allow eBPF to continue to align */
Not sure if this comment really belongs in here. Up to you but it
seems better suited in the patch description. Hopefully the next one
won't do something like:

 	/* This should allow eBPF to continue to align */
 	u32                     block_index;
+	/* This one too */
+	u32                     my_var;

:-)
+	u32                     block_index;
 };

 typedef void tcf_chain_head_change_t(struct tcf_proto *tp_head, void *priv);
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help