From: Simon Horman <simon.horman@netronome•com>
To: Or Gerlitz <gerlitz.or@gmail•com>
Cc: David Miller <davem@davemloft•net>,
Jakub Kicinski <jakub.kicinski@netronome•com>,
Linux Netdev List <netdev@vger•kernel.org>,
oss-drivers@netronome•com
Subject: Re: [PATCH net-next v2 12/12] nfp: add VF and PF representors to flower app
Date: Thu, 22 Jun 2017 21:08:30 +0200 [thread overview]
Message-ID: <20170622190829.GA29904@vergenet.net> (raw)
In-Reply-To: <CAJ3xEMgBOTO0+8evaE0yOVo3+AiRjGg+kKe3DO1TO=7QYiK2vQ@mail.gmail.com>
On Thu, Jun 22, 2017 at 05:50:29PM +0300, Or Gerlitz wrote:
> On Wed, Jun 21, 2017 at 12:36 AM, Simon Horman
> <simon.horman@netronome•com> wrote:
> > Initialise VF and PF representors in flower app.
> >
> > Based in part on work by Benjamin LaHaise, Bert van Leeuwen and
> > Jakub Kicinski.
> >
> > Signed-off-by: Simon Horman <simon.horman@netronome•com>
> > Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome•com>
> > ---
> > drivers/net/ethernet/netronome/nfp/flower/main.c | 86 +++++++++++++++++++++++-
> > 1 file changed, 84 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.c b/drivers/net/ethernet/netronome/nfp/flower/main.c
> > index d1d905727c54..582b7be3e219 100644
> > --- a/drivers/net/ethernet/netronome/nfp/flower/main.c
> > +++ b/drivers/net/ethernet/netronome/nfp/flower/main.c
> > @@ -149,15 +149,81 @@ static const struct net_device_ops nfp_flower_repr_netdev_ops = {
> > .ndo_get_offload_stats = nfp_repr_get_offload_stats,
> > };
> >
> > +static void nfp_flower_sriov_disable(struct nfp_app *app)
> > +{
> > + nfp_reprs_clean_and_free_by_type(app, NFP_REPR_TYPE_VF);
> > +}
> > +
> > +static int
> > +nfp_flower_spawn_vnic_reprs(struct nfp_app *app,
> > + enum nfp_flower_cmsg_port_vnic_type vnic_type,
> > + enum nfp_repr_type repr_type, unsigned int cnt)
> > +{
> > + u8 nfp_pcie = nfp_cppcore_pcie_unit(app->pf->cpp);
> > + struct nfp_flower_priv *priv = app->priv;
> > + struct nfp_reprs *reprs, *old_reprs;
> > + const u8 queue = 0;
> > + int i, err;
> > +
> > + reprs = nfp_reprs_alloc(cnt);
> > + if (!reprs)
> > + return -ENOMEM;
> > +
> > + for (i = 0; i < cnt; i++) {
> > + u32 port_id;
> > +
> > + reprs->reprs[i] = nfp_repr_alloc(app);
> > + if (!reprs->reprs[i]) {
> > + err = -ENOMEM;
> > + goto err_reprs_clean;
> > + }
> > +
> > + SET_NETDEV_DEV(reprs->reprs[i], &priv->nn->pdev->dev);
>
> why? these are virtual devices, in the same manner that on para virt use case,
> tap devices are. Why we want them all to be linked to the PF PCI entry?
>
> We had that on our code and removed it before upstreaming b/c it made
> provisioning
> systems (open-stack) to get crazy and didn't provide any benefit.
>
> I would vote -1 for this line, suggest to remove it and see later
> if/why you need that.
Sure, I will drop this line. We can revisit this later.
> > + eth_hw_addr_inherit(reprs->reprs[i], priv->nn->dp.netdev);
>
> -1 vote here too.. having all your reps to carry the PF mac would
> create confusion for provisioning
> systems, DHCP daemons and such. We are following the para virt way and
> set random
> mac on the rep, which would be later changed by libvirt as done for tap device
Thanks, I will follow your example and use random mac addresses.
next prev parent reply other threads:[~2017-06-22 19:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 21:36 [PATCH net-next v2 00/12] nfp: add flower app with representors Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 01/12] net: store port/representator id in metadata_dst Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 02/12] nfp: devlink add support for getting eswitch mode Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 03/12] nfp: move physical port init into a helper Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 04/12] nfp: map mac_stats and vf_cfg BARs Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 05/12] nfp: general representor implementation Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 06/12] nfp: add stats and xmit helpers for representors Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 07/12] nfp: app callbacks for SRIOV Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 08/12] nfp: provide nfp_port to of nfp_net_get_mac_addr() Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 09/12] nfp: add support for tx/rx with metadata portid Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 10/12] nfp: add support for control messages for flower app Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 11/12] nfp: add " Simon Horman
2017-06-21 9:04 ` Or Gerlitz
2017-06-21 9:59 ` Simon Horman
2017-06-20 21:36 ` [PATCH net-next v2 12/12] nfp: add VF and PF representors to " Simon Horman
2017-06-22 14:50 ` Or Gerlitz
2017-06-22 19:08 ` Simon Horman [this message]
2017-06-21 19:40 ` [PATCH net-next v2 00/12] nfp: add flower app with representors David Miller
2017-06-22 14:54 ` Or Gerlitz
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=20170622190829.GA29904@vergenet.net \
--to=simon.horman@netronome$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=gerlitz.or@gmail$(echo .)com \
--cc=jakub.kicinski@netronome$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=oss-drivers@netronome$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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