Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/rxe: Remove rxe_link_layer()

Instead of returning IB_LINK_LAYER_ETHERNET from rxe_link_layer, return it
directly from get_link_layer callback and remove rxe_link_layer().

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Link: https://lore.kernel.org/r/20200705104313.283034-5-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

authored by

Kamal Heib and committed by
Jason Gunthorpe
420bd9e2 293d8440

+1 -9
-1
drivers/infiniband/sw/rxe/rxe_loc.h
··· 142 142 struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av, 143 143 int paylen, struct rxe_pkt_info *pkt); 144 144 int rxe_prepare(struct rxe_pkt_info *pkt, struct sk_buff *skb, u32 *crc); 145 - enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num); 146 145 const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num); 147 146 struct device *rxe_dma_device(struct rxe_dev *rxe); 148 147 int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid);
-5
drivers/infiniband/sw/rxe/rxe_net.c
··· 520 520 return rxe->ndev->name; 521 521 } 522 522 523 - enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num) 524 - { 525 - return IB_LINK_LAYER_ETHERNET; 526 - } 527 - 528 523 int rxe_net_add(const char *ibdev_name, struct net_device *ndev) 529 524 { 530 525 int err;
+1 -3
drivers/infiniband/sw/rxe/rxe_verbs.c
··· 141 141 static enum rdma_link_layer rxe_get_link_layer(struct ib_device *dev, 142 142 u8 port_num) 143 143 { 144 - struct rxe_dev *rxe = to_rdev(dev); 145 - 146 - return rxe_link_layer(rxe, port_num); 144 + return IB_LINK_LAYER_ETHERNET; 147 145 } 148 146 149 147 static int rxe_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata)