Re: [PATCH rdma-next V2 03/10] IB/core: Add subnet prefix to port info

Jason Gunthorpe
2016-03-08T17:57:52Z

On Tue, Mar 08, 2016 at 06:36:51PM +0200, Eli Cohen wrote:
> The subnet prefix is a part of the port_info MAD returned and should be
> available at the ib_port_attr struct. We define it here and provide a
> default implementation in case the hardware driver does not provide one.
> The subnet prefix is required when creating the address vector to access
> the SA in networks where GRH must be used.
>
> Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Changes from V1:
> Removed the hardware level implementation and implement as part of
> ib_query_port.

Looks reasonable

Are you going to still send the mlx4/5 changes to avoid the other
callback?

Reviewed-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

> +++ b/include/rdma/ib_verbs.h
> @@ -509,6 +509,7 @@ struct ib_port_attr {
> u8 active_width;
> u8 active_speed;
> u8 phys_state;
> + u64 subnet_prefix;
> };

This turned out to be aligned then?

Jason