public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Jack Morgenstein
	<jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Subject: Re: [PATCH for-next 3/9] net/mlx4_core: Set initial admin GUIDs for VFs
Date: Tue, 31 Mar 2015 12:54:56 +0300	[thread overview]
Message-ID: <551A6EF0.4090300@mellanox.com> (raw)
In-Reply-To: <20150330171631.GA1152-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On 3/30/2015 8:16 PM, Jason Gunthorpe wrote:
> But, it doesn't really make sense to use eth_random_addr (which
> doesn't have a special OUI) and not randomize every bit.
>
>          get_random_bytes(&guid, sizeof(guid));
>          guid &= ~(1ULL << 56);
> 	guid |= 1ULL << 57;

OK, we can do that, sure.

> I also don't think the kernel should be generating random GUIDs. Either the SA should be consulted to do this, or the management stack should generate a cloud wide unique number.

There **is** an option to consult with the SM controlled by the 
sm_guid_assign module param of mlx4_ib. When this mode is in action, the 
randomized guid would be overridden by the one assigned by the SA.

In real life environments, people will use the "host assigned" option 
(sm_guid_assign = false) where the virtualization systems generate a 
unique guid to be used by the VF/VM and provision it through mlx4_ib to 
be provided to VF when the bindin.

The only place where the random value will be used, is for OOTB 
experience for staging purposes and such, when one wants to have working 
system with zero-touch. The practice of generating locally random 
address for non-provisioned VF is also used by the pretty much the whole 
set of Ethernet VF drivers (ixgbe_vf, i40e_vf, mlx4 VF code, etc). This 
is low cost solution for point cases which need that.

Or.

--
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

  parent reply	other threads:[~2015-03-31  9:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-29 13:51 [PATCH for-next 0/9] mlx4 changes in virtual GID management Or Gerlitz
     [not found] ` <1427637093-6711-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-03-29 13:51   ` [PATCH for-next 1/9] IB/mlx4: Alias GUID adding persistency support Or Gerlitz
2015-03-29 13:51   ` [PATCH for-next 2/9] net/mlx4_core: Manage alias GUID per VF Or Gerlitz
2015-03-29 13:51   ` [PATCH for-next 3/9] net/mlx4_core: Set initial admin GUIDs for VFs Or Gerlitz
     [not found]     ` <1427637093-6711-4-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-03-30 17:16       ` Jason Gunthorpe
     [not found]         ` <20150330171631.GA1152-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-03-31  9:54           ` Or Gerlitz [this message]
2015-03-29 13:51   ` [PATCH for-next 4/9] IB/mlx4: Manage admin alias GUID upon admin request Or Gerlitz
2015-03-29 13:51   ` [PATCH for-next 5/9] IB/mlx4: Change init flow to request alias GUIDs for active VFs Or Gerlitz
2015-03-29 13:51   ` [PATCH for-next 6/9] IB/mlx4: Request alias GUID on demand Or Gerlitz
2015-03-29 13:51   ` [PATCH for-next 7/9] net/mlx4_core: Raise slave shutdown event upon FLR Or Gerlitz
2015-03-29 13:51   ` [PATCH for-next 8/9] net/mlx4_core: Return the admin alias GUID upon host view request Or Gerlitz
2015-03-29 13:51   ` [PATCH for-next 9/9] IB/mlx4: Change alias guids default to be host assigned Or Gerlitz
2015-03-30 16:17   ` [PATCH for-next 0/9] mlx4 changes in virtual GID management Or Gerlitz
     [not found]     ` <CAJ3xEMj0T8QXBQdVHmfEFMXwjAFVD-O6ywAwyyVY+M3oRLzAVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31  3:36       ` David Miller
     [not found]         ` <20150330.233602.155832546277570456.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-03-31  3:47           ` Roland Dreier
     [not found]             ` <CAL1RGDUmDGCGdTBeTTBiHygO5UgEbRm_Qgxtx-+bxo1vg1v-8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31  9:13               ` Sagi Grimberg
     [not found]                 ` <551A6556.9030708-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-03-31 18:46                   ` Jason Gunthorpe
2015-03-31 11:22               ` Or Gerlitz
     [not found]                 ` <CAJ3xEMjfbxt2Ouh4bhuf3_LMc7qY807h6FryvdCr0rr_gdiZAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31 12:49                   ` Christoph Lameter
     [not found]                     ` <alpine.DEB.2.11.1503310735380.13128-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2015-03-31 12:57                       ` Hal Rosenstock
     [not found]                         ` <551A99D4.7060703-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-03-31 15:49                           ` Christoph Lameter
2015-03-31 15:50                       ` David Miller
     [not found]                         ` <20150331.115052.1321302787804579694.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-03-31 16:29                           ` Christoph Lameter
2015-03-31 15:48                   ` David Miller
     [not found]                     ` <20150331.114824.651005354305268415.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-03-31 17:27                       ` Hefty, Sean
     [not found]                         ` <1828884A29C6694DAF28B7E6B8A82373A8FBB790-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-31 20:28                           ` Or Gerlitz
2015-03-31 21:33                             ` Hefty, Sean
     [not found]                               ` <1828884A29C6694DAF28B7E6B8A82373A8FBBCE3-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-04-02 14:32                                 ` Or Gerlitz
     [not found]                                   ` <CAJ3xEMgptECgnWXfW7wN8sjqRfUvzF3tCN=Lj8MZtdOG8yg3jQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-02 22:31                                     ` ira.weiny
     [not found]                                       ` <20150402223135.GA12588-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-04-05  5:15                                         ` Or Gerlitz
     [not found]                                           ` <CAJ3xEMgsHAFJomuCN+EzMcYaxTOTQqHuDdr9zztuO9pH9QicXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-05 14:51                                             ` Roland Dreier
     [not found]                                               ` <CAG4TOxOv98YjNOi9MbKHiHg6aLw75XRfasMaScdRccRitiE3-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-05 20:46                                                 ` David Miller
     [not found]                                                   ` <20150405.164626.1878934248335902055.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-04-07 17:12                                                     ` Jason Gunthorpe
2015-04-08 13:03                                                 ` 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=551A6EF0.4090300@mellanox.com \
    --to=ogerlitz-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox