From: Louis Peens <louis.peens@corigine.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Fei Qin <fei.qin@corigine.com>,
netdev@vger.kernel.org, oss-drivers@corigine.com
Subject: Re: [PATCH net-next 2/2] nfp: customize the dim profiles
Date: Wed, 31 Jan 2024 13:25:14 +0200 [thread overview]
Message-ID: <ZbouGqJ2C6gKbiaS@LouisNoVo> (raw)
In-Reply-To: <ZboVNWrlgucuxH9N@nanopsycho>
On Wed, Jan 31, 2024 at 10:39:01AM +0100, Jiri Pirko wrote:
> [Some people who received this message don't often get email from jiri@resnulli.us. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> > static void nfp_net_rx_dim_work(struct work_struct *work)
> > {
> >+ static const struct nfp_dim rx_profile[] = {
> >+ {.usec = 0, .pkts = 1},
> >+ {.usec = 4, .pkts = 32},
> >+ {.usec = 64, .pkts = 64},
> >+ {.usec = 128, .pkts = 256},
> >+ {.usec = 256, .pkts = 256},
> >+ };
> > struct nfp_net_r_vector *r_vec;
> > unsigned int factor, value;
> >- struct dim_cq_moder moder;
> >+ struct nfp_dim moder;
> > struct nfp_net *nn;
> > struct dim *dim;
> >
> > dim = container_of(work, struct dim, work);
> >- moder = net_dim_get_rx_moderation(dim->mode, dim->profile_ix);
> >+ moder = rx_profile[dim->profile_ix];
>
> It looks incorrect to hardcode it like this. There is a reason this is
> abstracted out in lib/dim/net_dim.c to avoid exactly this. Can't you
> perhaps introduce your modified profile there and keep using
> net_dim_get_[tr]x_moderation() helpers?
Hmmm, we'll take a look at this. There might be follow-up questions but
we'll give it a closer look first. Thanks for the feedback.
next prev parent reply other threads:[~2024-01-31 11:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 8:54 [PATCH net-next 0/2] nfp: series of minor driver improvements Louis Peens
2024-01-31 8:54 ` [PATCH net-next 1/2] nfp: update devlink device info output Louis Peens
2024-01-31 9:31 ` Jiri Pirko
2024-01-31 9:40 ` Louis Peens
2024-02-02 4:29 ` Jakub Kicinski
2024-01-31 8:54 ` [PATCH net-next 2/2] nfp: customize the dim profiles Louis Peens
2024-01-31 9:39 ` Jiri Pirko
2024-01-31 11:25 ` Louis Peens [this message]
2024-02-01 2:16 ` Yinjun Zhang
2024-02-01 7:42 ` Jiri Pirko
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=ZbouGqJ2C6gKbiaS@LouisNoVo \
--to=louis.peens@corigine.com \
--cc=davem@davemloft.net \
--cc=fei.qin@corigine.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.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).