From: Jakub Kicinski <kuba@kernel.org>
To: Paul Blakey <paulb@nvidia.com>
Cc: <netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Oz Shlomo <ozsh@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
Roi Dayan <roid@nvidia.com>, Vlad Buslov <vladbu@nvidia.com>
Subject: Re: [PATCH net-next v2 2/6] net/sched: flower: Move filter handle initialization earlier
Date: Tue, 17 Jan 2023 19:51:09 -0800 [thread overview]
Message-ID: <20230117195109.0b4a4135@kernel.org> (raw)
In-Reply-To: <20230117083344.4056-3-paulb@nvidia.com>
On Tue, 17 Jan 2023 10:33:40 +0200 Paul Blakey wrote:
> + if (!fold) {
> + spin_lock(&tp->lock);
> + if (!handle) {
> + handle = 1;
> + err = idr_alloc_u32(&head->handle_idr, fnew, &handle,
> + INT_MAX, GFP_ATOMIC);
> + if (err)
> + goto errout;
sparse says you should release the spin lock
> + } else {
> + err = idr_alloc_u32(&head->handle_idr, fnew, &handle,
> + handle, GFP_ATOMIC);
> +
> + /* Filter with specified handle was concurrently
> + * inserted after initial check in cls_api. This is not
> + * necessarily an error if NLM_F_EXCL is not set in
> + * message flags. Returning EAGAIN will cause cls_api to
> + * try to update concurrently inserted rule.
> + */
> + if (err == -ENOSPC)
> + err = -EAGAIN;
> + }
> + spin_unlock(&tp->lock);
> +
> + if (err)
> + goto errout;
> + }
> + fnew->handle = handle;
> +
> + err = tcf_exts_init(&fnew->exts, net, TCA_FLOWER_ACT, 0);
> + if (err < 0)
> + goto errout_idr;
next prev parent reply other threads:[~2023-01-18 3:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 8:33 [PATCH net-next v2 0/4] net/sched: cls_api: Support hardware miss to tc action Paul Blakey
2023-01-17 8:33 ` [PATCH net-next v2 1/6] " Paul Blakey
2023-01-17 8:33 ` [PATCH net-next v2 2/6] net/sched: flower: Move filter handle initialization earlier Paul Blakey
2023-01-18 3:51 ` Jakub Kicinski [this message]
2023-01-17 8:33 ` [PATCH net-next v2 3/6] net/sched: flower: Support hardware miss to tc action Paul Blakey
2023-01-17 8:33 ` [PATCH net-next v2 4/6] net/mlx5: Refactor tc miss handling to a single function Paul Blakey
2023-01-17 8:33 ` [PATCH net-next v2 5/6] net/mlx5e: Rename CHAIN_TO_REG to MAPPED_OBJ_TO_REG Paul Blakey
2023-01-17 8:33 ` [PATCH net-next v2 6/6] net/mlx5: TC, Set CT miss to the specific ct action instance Paul Blakey
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=20230117195109.0b4a4135@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=ozsh@nvidia.com \
--cc=pabeni@redhat.com \
--cc=paulb@nvidia.com \
--cc=roid@nvidia.com \
--cc=saeedm@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.