DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ma, WenwuX" <wenwux.ma@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Jiale, SongX" <songx.jiale@intel.com>
Subject: RE: [PATCH] dma/idxd: fix failure to configure a device instance for DSA
Date: Fri, 28 Jun 2024 10:08:37 +0000	[thread overview]
Message-ID: <MN0PR11MB6110E1FC033370F9A662DC9AEBD02@MN0PR11MB6110.namprd11.prod.outlook.com> (raw)
In-Reply-To: <Zn6CE66iVqEYj2YJ@bricha3-mobl1.ger.corp.intel.com>

hi

> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Friday, June 28, 2024 5:28 PM
> To: Ma, WenwuX <wenwux.ma@intel.com>
> Cc: dev@dpdk.org; Jiale, SongX <songx.jiale@intel.com>
> Subject: Re: [PATCH] dma/idxd: fix failure to configure a device instance for
> DSA
> 
> On Fri, Jun 28, 2024 at 01:34:58PM +0800, Wenwu Ma wrote:
> > In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
> > DPDK needs to write a correct value to this file when configuring a
> > device instance using the dpdk_idxd_cfg.py script, otherwise it will
> > fail to be configured, this patch fixes the issue.
> >
> > Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> > ---
> 
> One comment inline below. With that addressed:
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> >  drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py
> > b/drivers/dma/idxd/dpdk_idxd_cfg.py
> > index c0c833ade9..9ca4c4d76c 100755
> > --- a/drivers/dma/idxd/dpdk_idxd_cfg.py
> > +++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
> > @@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
> >                   "priority": 1,
> >                   "max_batch_size": 1024,
> >                   "size": int(max_work_queues_size / nb_queues)}
> > -        wqcfg.update(parse_wq_opts(args.wq_option))
> >          wq_dir = SysfsDir(os.path.join(dsa_dir.path,
> > f"wq{dsa_id}.{q}"))
> > +        if os.path.exists(SysfsDir(os.path.join(wq_dir.path,
> f"driver_name")).path):
> 
> I think this be simplified to remove the extra SysfsDir call as:
> 	if os.path.exists(os.path.join(wq_dir.path,"driver_name")):
Ok, thanks

> 
> > +            wqcfg.update({"driver_name": "user"})
> > +        wqcfg.update(parse_wq_opts(args.wq_option))
> >          wq_dir.write_values(wqcfg)
> >
> >      # enable device and then queues
> > --
> > 2.25.1
> >

  reply	other threads:[~2024-06-28 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28  5:34 Wenwu Ma
2024-06-28  9:27 ` Bruce Richardson
2024-06-28 10:08   ` Ma, WenwuX [this message]
2024-06-28  9:54 ` [PATCH v2] " Wenwu Ma
2024-06-28 10:25   ` Bruce Richardson

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=MN0PR11MB6110E1FC033370F9A662DC9AEBD02@MN0PR11MB6110.namprd11.prod.outlook.com \
    --to=wenwux.ma@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=songx.jiale@intel.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).