RDMA/rxe: Move rxe_mcast_add/delete to rxe_mcast.c
Move rxe_mcast_add and rxe_mcast_delete from rxe_net.c to rxe_mcast.c, make static and remove declarations from rxe_loc.h. Link: https://lore.kernel.org/r/20220127213755.31697-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
9b1b61c5fb
commit
7df1023970
@ -106,8 +106,6 @@ int rxe_prepare(struct rxe_pkt_info *pkt, struct sk_buff *skb);
|
||||
int rxe_xmit_packet(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
|
||||
struct sk_buff *skb);
|
||||
const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num);
|
||||
int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid);
|
||||
int rxe_mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid);
|
||||
|
||||
/* rxe_qp.c */
|
||||
int rxe_qp_chk_init(struct rxe_dev *rxe, struct ib_qp_init_attr *init);
|
||||
|
@ -7,6 +7,24 @@
|
||||
#include "rxe.h"
|
||||
#include "rxe_loc.h"
|
||||
|
||||
static int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid)
|
||||
{
|
||||
unsigned char ll_addr[ETH_ALEN];
|
||||
|
||||
ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr);
|
||||
|
||||
return dev_mc_add(rxe->ndev, ll_addr);
|
||||
}
|
||||
|
||||
static int rxe_mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid)
|
||||
{
|
||||
unsigned char ll_addr[ETH_ALEN];
|
||||
|
||||
ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr);
|
||||
|
||||
return dev_mc_del(rxe->ndev, ll_addr);
|
||||
}
|
||||
|
||||
/* caller should hold mc_grp_pool->pool_lock */
|
||||
static struct rxe_mc_grp *create_grp(struct rxe_dev *rxe,
|
||||
struct rxe_pool *pool,
|
||||
|
@ -20,24 +20,6 @@
|
||||
|
||||
static struct rxe_recv_sockets recv_sockets;
|
||||
|
||||
int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid)
|
||||
{
|
||||
unsigned char ll_addr[ETH_ALEN];
|
||||
|
||||
ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr);
|
||||
|
||||
return dev_mc_add(rxe->ndev, ll_addr);
|
||||
}
|
||||
|
||||
int rxe_mcast_delete(struct rxe_dev *rxe, union ib_gid *mgid)
|
||||
{
|
||||
unsigned char ll_addr[ETH_ALEN];
|
||||
|
||||
ipv6_eth_mc_map((struct in6_addr *)mgid->raw, ll_addr);
|
||||
|
||||
return dev_mc_del(rxe->ndev, ll_addr);
|
||||
}
|
||||
|
||||
static struct dst_entry *rxe_find_route4(struct net_device *ndev,
|
||||
struct in_addr *saddr,
|
||||
struct in_addr *daddr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user