Netdev List
 help / color / mirror / Atom feed
From: Stanislaw Kardach <skardach@marvell.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <sgoutham@marvell.com>,
	<netdev@vger.kernel.org>, <kda@semihalf.com>
Subject: Re: [PATCH net-next 3/3] octeontx2-af: add support for custom KPU entries
Date: Mon, 14 Sep 2020 21:55:49 +0200	[thread overview]
Message-ID: <20200914195549.GA10151@yoga> (raw)
In-Reply-To: <20200911135324.6418b50c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

> ________________________________________
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Friday, September 11, 2020 10:53 PM
> To: Stanislaw Kardach [C]
> Cc: davem@davemloft.net; Sunil Kovvuri Goutham; netdev@vger.kernel.org
> Subject: [EXT] Re: [PATCH net-next 3/3] octeontx2-af: add support for custom KPU entries
>
> External Email
>
> ----------------------------------------------------------------------
> On Fri, 11 Sep 2020 15:21:24 +0200 skardach@marvell.com wrote:
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> > index 6bfb9a9d3003..fe164b85adfb 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> > +++ b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
> > @@ -148,7 +148,7 @@ struct npc_kpu_profile_cam {
> >       u16 dp1_mask;
> >       u16 dp2;
> >       u16 dp2_mask;
> > -};
> > +} __packed;
> >
> >  struct npc_kpu_profile_action {
> >       u8 errlev;
> > @@ -168,7 +168,7 @@ struct npc_kpu_profile_action {
> >       u8 mask;
> >       u8 right;
> >       u8 shift;
> > -};
> > +} __packed;
> >
> >  struct npc_kpu_profile {
> >       int cam_entries;
> > @@ -323,6 +323,15 @@ struct npc_mcam_kex {
> >       u64 intf_ld_flags[NPC_MAX_INTF][NPC_MAX_LD][NPC_MAX_LFL];
> >  } __packed;
> >
> > +struct npc_kpu_fwdata {
> > +     int     entries;
> > +     /* What follows is:
> > +      * struct npc_kpu_profile_cam[entries];
> > +      * struct npc_kpu_profile_action[entries];
> > +      */
> > +     u8      data[0];
> > +} __packed;
>
> Why do you mark a structure with a single int member as __packed?
>
> Please drop all the __packed attrs you add in this series.

Sorry, will fix in V2.

>
> >  module_param(mkex_profile, charp, 0000);
> >  MODULE_PARM_DESC(mkex_profile, "MKEX profile name string");
> >
> > +static char *kpu_profile; /* KPU profile name */
> > +module_param(kpu_profile, charp, 0000);
> > +MODULE_PARM_DESC(kpu_profile, "KPU profile name string");
>
> Why do you need a module parameter for this?
>
> Just decide on a filename, always request it, and if user doesn't want
> to load a special profile you'll get a -ENOENT and move on.

The use-case I am targeting here is using different profiles in
different parts of the network but re-using a single initramfs+kernel
(say a common set of platform software) via tftpboot. I.e. one custom
protocol for the edge and another for core network. Then boot parameters
are customized based on some configuration embedded in the equipment
(i.e. device tree in flash + customized uboot).
Without module parameter I think that could be done via symlinking and
delaying module loading but that means more hassle when driver is
built-in, hence the parameter.

Thanks for reviewing my patches!

Best Regards,
Stanislaw Kardach

      reply	other threads:[~2020-09-14 19:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 13:21 [PATCH net-next 0/3] octeontx2-af: add support for KPU profile customization skardach
2020-09-11 13:21 ` [PATCH net-next 1/3] octeontx2-af: fix LD CUSTOM LTYPE aliasing skardach
2020-09-11 13:21 ` [PATCH net-next 2/3] octeontx2-af: prepare for custom KPU profiles skardach
2020-09-11 13:21 ` [PATCH net-next 3/3] octeontx2-af: add support for custom KPU entries skardach
2020-09-11 20:53   ` Jakub Kicinski
2020-09-14 19:55     ` Stanislaw Kardach [this message]

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=20200914195549.GA10151@yoga \
    --to=skardach@marvell.com \
    --cc=davem@davemloft.net \
    --cc=kda@semihalf.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --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