From: Srikanth Yalavarthi <syalavarthi@marvell.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Prince Takkar <ptakkar@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Shivah Shankar Shankar Narayan Rao <sshankarnara@marvell.com>,
Anup Prabhu <aprabhu@marvell.com>,
Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
Srikanth Yalavarthi <syalavarthi@marvell.com>
Subject: RE: [EXT] Re: [PATCH 1/1] ml/cnxk: fix name of TVM model with single layer
Date: Wed, 22 Nov 2023 17:16:44 +0000 [thread overview]
Message-ID: <DS0PR18MB5502A84D962517934B566CF1AEBAA@DS0PR18MB5502.namprd18.prod.outlook.com> (raw)
In-Reply-To: <ZV4xVptZiHzABtW6@bricha3-MOBL.ger.corp.intel.com>
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: 22 November 2023 22:21
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Cc: Prince Takkar <ptakkar@marvell.com>; dev@dpdk.org; Shivah Shankar
> Shankar Narayan Rao <sshankarnara@marvell.com>; Anup Prabhu
> <aprabhu@marvell.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Subject: [EXT] Re: [PATCH 1/1] ml/cnxk: fix name of TVM model with single
> layer
>
> External Email
>
> ----------------------------------------------------------------------
> On Wed, Nov 22, 2023 at 04:48:50PM +0000, Bruce Richardson wrote:
> > On Wed, Nov 22, 2023 at 08:36:40AM -0800, Srikanth Yalavarthi wrote:
> > > Name field of TVM model with single MRVL layer is currently set to
> > > empty string. Update the name with the field from metadata.
> > >
> > > Fixes: 5cea2c67edfc ("ml/cnxk: update internal TVM model info
> > > structure")
> > >
> > > Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> > > ---
> > > drivers/ml/cnxk/mvtvm_ml_model.c | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/drivers/ml/cnxk/mvtvm_ml_model.c
> > > b/drivers/ml/cnxk/mvtvm_ml_model.c
> > > index 3e06ea658bb..102d30e5f4f 100644
> > > --- a/drivers/ml/cnxk/mvtvm_ml_model.c
> > > +++ b/drivers/ml/cnxk/mvtvm_ml_model.c
> > > @@ -352,6 +352,10 @@ mvtvm_ml_model_info_set(struct cnxk_ml_dev
> > > *cnxk_mldev, struct cnxk_ml_model *mo
> > > tvm_mrvl_model:
> > > cn10k_ml_model_info_set(cnxk_mldev, model, &model-
> >mvtvm.info,
> > > &model->layer[0].glow.metadata);
> > > +
> > > + metadata = &model->mvtvm.metadata;
> > > + rte_memcpy(info->name, metadata->model.name,
> TVMDP_NAME_STRLEN);
> > > +
> >
> > Minor nit, but you probably don't need a high-performance copy here,
> > so I'd recommend using regular memcpy rather than rte_memcpy.
> >
> Actually, if this is a name value, would a strcpy function, e.g. strlcpy, not be
> more appropriate?
Thanks. Updated in v2.
We have few other locations unrelated to the current patch, where rte_memcpy can be replaced with strlcpy. Will submit a separate patch for this.
next prev parent reply other threads:[~2023-11-22 17:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 16:36 Srikanth Yalavarthi
2023-11-22 16:48 ` Bruce Richardson
2023-11-22 16:50 ` Bruce Richardson
2023-11-22 17:16 ` Srikanth Yalavarthi [this message]
2023-11-22 17:13 ` [PATCH v2 " Srikanth Yalavarthi
2023-11-23 0:28 ` Thomas Monjalon
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=DS0PR18MB5502A84D962517934B566CF1AEBAA@DS0PR18MB5502.namprd18.prod.outlook.com \
--to=syalavarthi@marvell.com \
--cc=aprabhu@marvell.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ptakkar@marvell.com \
--cc=sshankarnara@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).