lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 31 Jan 2024 13:25:14 +0200
From: Louis Peens <louis.peens@...igine.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>, Fei Qin <fei.qin@...igine.com>,
	netdev@...r.kernel.org, oss-drivers@...igine.com
Subject: Re: [PATCH net-next 2/2] nfp: customize the dim profiles

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@...nulli.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ