RE: [PATCH v2] [RFC] rdma/cm: support option to allow manually setting IB path

Sean Hefty
2009-10-22T18:28:11Z

>> if (number of paths > 1)
>> return -ENOSYS;
>
>This is really no different than what you had at first.

The main difference is returning ENOSYS to indicate that only one path is
acceptable.

>My idea was to have the kernel search the array for the entries it
>needs/supports. First one found wins. This provides future
>API compatability.
>
>Some future userspace, to support some future kernel APM, would pass in 2
>entries:
> IB_PATH_GMP | IB_PATH_PRIMARY | IB_PATH_OUTBOUND | IB_PATH_INBOUND
> IB_PATH_GMP | IB_PATH_ALTERNATE | IB_PATH_OUTBOUND | IB_PATH_INBOUND
>
>This shouldn't break old kernels.

I don't like the idea of the kernel silently ignoring the alternate path.
Returning an error seems like a better idea.

>Again, some even future kernel would support 6 entries, future user
>space would send this:
> IB_PATH_PRIMARY | IB_PATH_INBOUND
> IB_PATH_PRIMARY | IB_PATH_OUTBOUND
> IB_PATH_GMP | IB_PATH_PRIMARY | IB_PATH_OUTBOUND | IB_PATH_INBOUND
> IB_PATH_ALTERNATE | IB_PATH_INBOUND
> IB_PATH_ALTERNATE | IB_PATH_OUTBOUND
> IB_PATH_GMP | IB_PATH_ALTERNATE | IB_PATH_OUTBOUND | IB_PATH_INBOUND
>
>This shouldn't break old kernels either.

To me, this sets contradictory paths. The pairings <PRI | IN>, <PRI | OUT>,
<ALT | IN>, <ALT | OUT> should appear exactly once in a set of paths.

- Sean