Re: [PATCH rdma-next 4/5] RDMA/cma: Use existing netif_is_bond_master function

Yuval Shaia
2018-01-28T11:22:03Z

On Sun, Jan 28, 2018 at 11:25:32AM +0200, Leon Romanovsky wrote:
> From: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> When checking whatever the current netdev is the bond master interface,
> use kernel API netif_is_bond_master() instead of hardcoding the check.
> No functionality is changed.
>
> Reviewed-by: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
> drivers/infiniband/core/cma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 84812b9dea9b..e66963ca58bd 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -4294,7 +4294,7 @@ static int cma_netdev_callback(struct notifier_block *self, unsigned long event,
> if (event != NETDEV_BONDING_FAILOVER)
> return NOTIFY_DONE;
>
> - if (!(ndev->flags & IFF_MASTER) || !(ndev->priv_flags & IFF_BONDING))
> + if (!netif_is_bond_master(ndev))
> return NOTIFY_DONE;

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

>
> mutex_lock(&lock);
> --
> 2.16.1
>
> --
> 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