OSDN Git Service

IB/rxe: Reuse code which sets port state
authorYuval Shaia <yuval.shaia@oracle.com>
Fri, 14 Dec 2018 16:05:49 +0000 (08:05 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 20 Dec 2018 21:20:58 +0000 (14:20 -0700)
commitf55c3ec42a97bca408f0208ec08e3382340c7be7
tree6d7a22f044cdc2ebfb4823f431032732162923b8
parentd5108e69fe013ff47ab815b849caba9cc33ca1e5
IB/rxe: Reuse code which sets port state

Same code is executed in both rxe_param_set_add and rxe_notify functions.
Make one function and call it from both places.

Since both callers already have a rxe object use it directly instead of
deriving it from the net device.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com> 
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rxe/rxe.h
drivers/infiniband/sw/rxe/rxe_net.c
drivers/infiniband/sw/rxe/rxe_sysfs.c