From: Simon Horman <horms@kernel.org>
To: Sai Krishna <saikrishnag@marvell.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, sgoutham@marvell.com,
gakula@marvell.com, hkelam@marvell.com, sbhatta@marvell.com
Subject: Re: [net-next PATCH] octeontx2-pf: Add ucast filter count configurability via devlink.
Date: Tue, 16 Apr 2024 11:22:36 +0100 [thread overview]
Message-ID: <20240416102236.GH2320920@kernel.org> (raw)
In-Reply-To: <20240414105830.678293-1-saikrishnag@marvell.com>
On Sun, Apr 14, 2024 at 04:28:30PM +0530, Sai Krishna wrote:
> Added a devlink param to set/modify unicast filter count. Currently
> it's hardcoded with a macro.
Hi Sai,
I think it would be nice to provide a sample devlink command in
the patch description, as you did for:
2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")
> Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
...
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
...
> +static int otx2_dl_ucast_flt_cnt_get(struct devlink *devlink, u32 id,
> + struct devlink_param_gset_ctx *ctx)
> +{
> + struct otx2_devlink *otx2_dl = devlink_priv(devlink);
> + struct otx2_nic *pfvf = otx2_dl->pfvf;
> +
> + if (!pfvf->flow_cfg) {
> + ctx->val.vu8 = 0;
> + return 0;
> + }
> +
> + ctx->val.vu8 = pfvf->flow_cfg->ucast_flt_cnt;
nit: perhaps this could be more succinctly expressed as follows
(completely untested!):
ctx->val.vu8 = pfvf->flow_cfg ? pfvf->flow_cfg->ucast_flt_cnt : 0;
> +
> + return 0;
> +}
...
next prev parent reply other threads:[~2024-04-16 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-14 10:58 [net-next PATCH] octeontx2-pf: Add ucast filter count configurability via devlink Sai Krishna
2024-04-16 10:22 ` Simon Horman [this message]
2024-04-17 5:17 ` Sai Krishna Gajula
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=20240416102236.GH2320920@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saikrishnag@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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).