From: Andrew Lunn <andrew@lunn.ch>
To: Vlad Buslov <vladbu@nvidia.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
netdev@vger.kernel.org, deb.chatterjee@intel.com,
anjali.singhai@intel.com, namrata.limaye@intel.com,
tom@sipanda.io, mleitner@redhat.com, Mahesh.Shirshyad@amd.com,
tomasz.osinski@intel.com, jiri@resnulli.us,
xiyou.wangcong@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, kernel@mojatatu.com, khalidm@nvidia.com,
toke@redhat.com, mattyk@nvidia.com
Subject: Re: [PATCH RFC v6 net-next 13/17] p4tc: add table entry create, update, get, delete, flush and dump
Date: Sun, 8 Oct 2023 18:53:05 +0200 [thread overview]
Message-ID: <a57b639c-dd5c-4e16-9943-2c0aec724c5d@lunn.ch> (raw)
In-Reply-To: <87edi5ysun.fsf@nvidia.com>
> > +/* Invoked from both control and data path */
> > +static int __p4tc_table_entry_update(struct p4tc_pipeline *pipeline,
> > + struct p4tc_table *table,
> > + struct p4tc_table_entry *entry,
> > + struct p4tc_table_entry_mask *mask,
> > + u16 whodunnit, bool from_control)
> > +__must_hold(RCU)
> > +{
> > + struct p4tc_table_entry_mask *mask_found = NULL;
> > + struct p4tc_table_entry_work *entry_work;
> > + struct p4tc_table_entry_value *value_old;
> > + struct p4tc_table_entry_value *value;
> > + struct p4tc_table_entry *entry_old;
> > + struct p4tc_table_entry_tm *tm_old;
> > + struct p4tc_table_entry_tm *tm;
> > + int ret;
> > +
> > + value = p4tc_table_entry_value(entry);
> > + /* We set it to zero on create an update to avoid having entry
> > + * deletion in parallel before we report to user space.
> > + */
> > + refcount_set(&value->entries_ref, 0);
>
> TBH I already commented on one of the previous versions of this series
> that it is very hard to understand and review tons of different atomic
> reference counters, especially when they are modified with functions
> like refcount_dec_not_one() or unconditional set like in this place.
Hi Vlad
Please always trim replies to just the relevant text. This is a 3000
line patch, which i think you made one comment in, but maybe i missed
others will paging down again, again and again....
Andrew
next prev parent reply other threads:[~2023-10-08 16:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-30 14:35 [PATCH RFC v6 net-next 00/17] Introducing P4TC Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 01/17] net: sched: act_api: Introduce dynamic actions list Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 02/17] net/sched: act_api: increase action kind string length Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 03/17] net/sched: act_api: Update tc_action_ops to account for dynamic actions Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 04/17] net/sched: act_api: add struct p4tc_action_ops as a parameter to lookup callback Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 05/17] net: sched: act_api: Add support for preallocated dynamic action instances Jamal Hadi Salim
2023-10-08 15:26 ` Vlad Buslov
2023-09-30 14:35 ` [PATCH RFC v6 net-next 06/17] net: introduce rcu_replace_pointer_rtnl Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 07/17] rtnl: add helper to check if group has listeners Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 08/17] p4tc: add P4 data types Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 09/17] p4tc: add pipeline create, get, update, delete Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 10/17] p4tc: add header field create, get, delete, flush and dump Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 11/17] p4tc: add action template create, update, delete, get, " Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 12/17] p4tc: add table " Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 13/17] p4tc: add table entry create, update, get, delete, " Jamal Hadi Salim
2023-10-08 16:26 ` Vlad Buslov
2023-10-08 16:53 ` Andrew Lunn [this message]
2023-10-09 6:29 ` Vlad Buslov
2023-10-09 14:02 ` Jamal Hadi Salim
2023-10-09 14:27 ` Vlad Buslov
2023-10-09 15:39 ` Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 14/17] p4tc: add set of P4TC table kfuncs Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 15/17] p4tc: add P4 classifier Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 16/17] p4tc: Add P4 extern interface Jamal Hadi Salim
2023-09-30 14:35 ` [PATCH RFC v6 net-next 17/17] MAINTAINERS: add p4tc entry Jamal Hadi Salim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a57b639c-dd5c-4e16-9943-2c0aec724c5d@lunn.ch \
--to=andrew@lunn.ch \
--cc=Mahesh.Shirshyad@amd.com \
--cc=anjali.singhai@intel.com \
--cc=davem@davemloft.net \
--cc=deb.chatterjee@intel.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@mojatatu.com \
--cc=khalidm@nvidia.com \
--cc=kuba@kernel.org \
--cc=mattyk@nvidia.com \
--cc=mleitner@redhat.com \
--cc=namrata.limaye@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=toke@redhat.com \
--cc=tom@sipanda.io \
--cc=tomasz.osinski@intel.com \
--cc=vladbu@nvidia.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).