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: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2023-08-24 14:09:45

On Wed, Aug 23, 2023 at 1:33 PM Marcelo Ricardo Leitner
[off-list ref] wrote:
On Sat, Aug 19, 2023 at 01:35:13PM -0300, Victor Nogueira wrote:
quoted
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
quoted
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"
Thanks Marcelo. We'll fix both in the next version.

cheers,
jamal
quoted
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;

:-)
quoted
+     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