From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH RFC 1/3] IB/IPoIB: Support SRIOV standard configuration
Date: Thu, 21 May 2015 12:46:13 -0600 [thread overview]
Message-ID: <20150521184613.GD6771@obsidianresearch.com> (raw)
In-Reply-To: <1432225447-6536-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Thu, May 21, 2015 at 07:24:05PM +0300, Or Gerlitz wrote:
> Standard configuration of SRIOV VFs through the host is done over the
> following chain of calls: libvirt --> netlink --> PF netdevice
>
> When this comes to IB/IPoIB we should normalize this into the verbs
> framework so we further go: PF IPoIB --> verbs API --> PF HW driver
>
> Virtualization systems assign VMs 48 bits mac, to allow working with
> non-modified SW layers (open-stack, libvirt, etc), we can safely
> extend this mac to unique 64 bits GUID. Hence the IPoIB ndo_set_vf_mac
> entry calls the set_vf_guid verb.
>
> Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> drivers/infiniband/ulp/ipoib/ipoib_main.c | 39 +++++++++++++++++++++++++++++
> include/rdma/ib_verbs.h | 4 +++
> 2 files changed, 43 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 9e1b203..8f82870 100644
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -1357,6 +1357,43 @@ void ipoib_dev_cleanup(struct net_device *dev)
> priv->tx_ring = NULL;
> }
>
> +static int ipoib_get_vf_config(struct net_device *dev, int vf, struct ifla_vf_info *ivf)
> +{
> + struct ipoib_dev_priv *priv = netdev_priv(dev);
> +
> + if (priv->ca->get_vf_config)
> + return priv->ca->get_vf_config(priv->ca, priv->port, vf, ivf);
> + else
> + return -EINVAL;
> +}
> +
> +static int ipoib_set_vf_mac(struct net_device *dev, int queue, u8 *mac)
> +{
> + char *raw_guid;
> + u64 guid = 0;
This doesn't seem right at all.
It makes no sense that a IPoIB interface with a 20 byte LLADDR would
accept an 8 byte LLADDR only for 'ip link set vf mac'
The definition of the netlink struct seems to confirm this:
struct ifla_vf_mac {
__u32 vf;
__u8 mac[32]; /* MAX_ADDR_LEN */
};
If it was really just ever a mac it would really only be 6 bytes.
[Honestly, this whole feature seems very inconistent with the rest of
the design of ip net link, so who knows]
If the ifla_vf_mac had been variable-sized (like every other address
related attribute) then sure, auto detect the length and do the right
thing.
But with this API, I think you have no choice, 'ip set vf mac LLADDR'
can only be the 20 byte address.
If you really, really want this: Get someone from iproute or netdev to
sign off that they really mean that 'ip set vf mac LLADDR' is always a
6 byte mac.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-05-21 18:46 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 16:24 [PATCH RFC 0/3] Support standard SRIOV configuration for IB VFs Or Gerlitz
[not found] ` <1432225447-6536-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-21 16:24 ` [PATCH RFC 1/3] IB/IPoIB: Support SRIOV standard configuration Or Gerlitz
[not found] ` <1432225447-6536-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-21 18:46 ` Jason Gunthorpe [this message]
[not found] ` <20150521184613.GD6771-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-21 20:05 ` Or Gerlitz
[not found] ` <CAJ3xEMgJvXjg3aFbTNEudj9QWMfP4==eBq0ccuhjuVJsv9mRmQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 21:01 ` Jason Gunthorpe
2015-05-21 21:05 ` Doug Ledford
[not found] ` <1432242331.28905.67.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 21:21 ` Jason Gunthorpe
2015-05-21 16:24 ` [PATCH RFC 2/3] IB/mlx4: Refactor Alias GUID storing Or Gerlitz
2015-05-21 16:24 ` [PATCH RFC 3/3] IB/mlx4: Add support for SRIOV VF management Or Gerlitz
2015-05-21 16:40 ` [PATCH RFC 0/3] Support standard SRIOV configuration for IB VFs Doug Ledford
[not found] ` <1432226406.28905.22.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 19:55 ` Or Gerlitz
[not found] ` <CAJ3xEMjzpqnQuA=0HQaN8noVq04d9BkVvEWGY7Lq5ZntVTKm4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 21:11 ` Doug Ledford
[not found] ` <1432242708.28905.73.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-21 21:44 ` Jason Gunthorpe
2015-05-25 20:04 ` Or Gerlitz
[not found] ` <CAJ3xEMh3BaxJzCu9mV9m6ZMwgrDaO2UvTyS1i=DEPq9nuLX3oA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-25 21:14 ` Jason Gunthorpe
[not found] ` <20150525211433.GA9186-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-25 21:50 ` Or Gerlitz
[not found] ` <CAJ3xEMhG2W6WzxC4Kc2CFmdMwTRUF5ppBgcDZ6SMA=kgJowUpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-25 22:32 ` Jason Gunthorpe
[not found] ` <20150525223235.GA9858-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-26 3:33 ` Or Gerlitz
[not found] ` <CAJ3xEMjSU0xVWyqd8v_-OO5JvsHycGTU6gg=BHpZD8PSqRfzQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-26 5:58 ` Jason Gunthorpe
2015-05-26 16:53 ` Doug Ledford
[not found] ` <1432659226.28905.151.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-26 18:13 ` Jason Gunthorpe
[not found] ` <20150526181336.GD11800-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-26 20:32 ` Doug Ledford
[not found] ` <1432672378.28905.178.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-26 21:11 ` Jason Gunthorpe
[not found] ` <20150526211114.GB4502-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-27 13:01 ` Or Gerlitz
2015-05-27 14:14 ` Doug Ledford
[not found] ` <1432736046.28905.215.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-27 17:11 ` Jason Gunthorpe
[not found] ` <20150527171143.GB9909-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-27 17:53 ` Doug Ledford
[not found] ` <1432749191.28905.243.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-27 18:29 ` Jason Gunthorpe
2015-05-27 21:58 ` Or Gerlitz
[not found] ` <CAJ3xEMjXXKy=DSeksTFEX-GAN=nYm_6nn5msvsYOwnp0roEHJQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 22:42 ` Jason Gunthorpe
2015-05-26 16:53 ` Doug Ledford
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=20150521184613.GD6771@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.