Re: [PATCH rdma-next 4/4] IB/core: Fix error code for invalid GID entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 27, 2018 at 02:49:16PM +0300, Leon Romanovsky wrote:
> From: Parav Pandit <parav@xxxxxxxxxxxx>
> 
> When GID entry is invalid, currently EAGAIN (try again) is returned.
> This is incorrect, there is nothing that will make this GID entry
> valid again after sometime.
> 
> Therefore return EINVAL which also makes any existing code to avoid
> any complains such as ibv_query_gid_type() API of libibverbs user
> space library.
> 
> Fixes: 03db3a2d81e6 ("IB/core: Add RoCE GID table management")
> Reviewed-by: Daniel Jurgens <danielj@xxxxxxxxxxxx>
> Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/core/cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

After understanding this some more, I took this patch into for-rc, but
rebased and revised the commit message:

commit a840c93ca7582bb6c88df2345a33f979b7a67874
Author: Parav Pandit <parav@xxxxxxxxxxxx>
Date:   Sun May 27 14:49:16 2018 +0300

    IB/core: Fix error code for invalid GID entry
    
    When a GID entry is invalid EAGAIN is returned. This is an incorrect error
    code, there is nothing that will make this GID entry valid again in
    bounded time.
    
    Some user space tools fail incorrectly if EAGAIN is returned here, and
    this represents a small ABI change from earlier kernels.
    
    The first patch in the Fixes list makes entries that were valid before
    to become invalid, allowing this code to trigger, while the second patch
    in the Fixes list introduced the wrong EAGAIN.
    
    Therefore revert the return result to EINVAL which matches the historical
    expectations of the ibv_query_gid_type() API of the libibverbs user space
    library.
    
    Cc: <stable@xxxxxxxxxxxxxxx>
    Fixes: 598ff6bae689 ("IB/core: Refactor GID modify code for RoCE")
    Fixes: 03db3a2d81e6 ("IB/core: Add RoCE GID table management")
    Reviewed-by: Daniel Jurgens <danielj@xxxxxxxxxxxx>
    Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
    Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux