Skip to content

Commit

Permalink
RDMA/rxe: Remove rxe_link_layer()
Browse files Browse the repository at this point in the history
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: 8700e3e ("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>
  • Loading branch information
Kamal Heib authored and Jason Gunthorpe committed Jul 16, 2020
1 parent 293d844 commit 420bd9e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion drivers/infiniband/sw/rxe/rxe_loc.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ int rxe_send(struct rxe_pkt_info *pkt, struct sk_buff *skb);
struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
int paylen, struct rxe_pkt_info *pkt);
int rxe_prepare(struct rxe_pkt_info *pkt, struct sk_buff *skb, u32 *crc);
enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num);
const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num);
struct device *rxe_dma_device(struct rxe_dev *rxe);
int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid);
Expand Down
5 changes: 0 additions & 5 deletions drivers/infiniband/sw/rxe/rxe_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,6 @@ const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num)
return rxe->ndev->name;
}

enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num)
{
return IB_LINK_LAYER_ETHERNET;
}

int rxe_net_add(const char *ibdev_name, struct net_device *ndev)
{
int err;
Expand Down
4 changes: 1 addition & 3 deletions drivers/infiniband/sw/rxe/rxe_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ static int rxe_modify_port(struct ib_device *dev,
static enum rdma_link_layer rxe_get_link_layer(struct ib_device *dev,
u8 port_num)
{
struct rxe_dev *rxe = to_rdev(dev);

return rxe_link_layer(rxe, port_num);
return IB_LINK_LAYER_ETHERNET;
}

static int rxe_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata)
Expand Down

0 comments on commit 420bd9e

Please sign in to comment.