linux/drivers/infiniband/sw/rxe/rxe_net.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
 * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
 * Copyright (c) 2015 System Fabric Works, Inc. All rights reserved.
 */

#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/netdevice.h>
#include <linux/if.h>
#include <linux/if_vlan.h>
#include <net/udp_tunnel.h>
#include <net/sch_generic.h>
#include <linux/netfilter.h>
#include <rdma/ib_addr.h>

#include "rxe.h"
#include "rxe_net.h"
#include "rxe_loc.h"

static struct rxe_recv_sockets recv_sockets;

static struct dst_entry *rxe_find_route4(struct rxe_qp *qp,
					 struct net_device *ndev,
					 struct in_addr *saddr,
					 struct in_addr *daddr)
{}

#if IS_ENABLED(CONFIG_IPV6)
static struct dst_entry *rxe_find_route6(struct rxe_qp *qp,
					 struct net_device *ndev,
					 struct in6_addr *saddr,
					 struct in6_addr *daddr)
{}

#else

static struct dst_entry *rxe_find_route6(struct rxe_qp *qp,
					 struct net_device *ndev,
					 struct in6_addr *saddr,
					 struct in6_addr *daddr)
{
	return NULL;
}

#endif

static struct dst_entry *rxe_find_route(struct net_device *ndev,
					struct rxe_qp *qp,
					struct rxe_av *av)
{}

static int rxe_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
{}

static struct socket *rxe_setup_udp_tunnel(struct net *net, __be16 port,
					   bool ipv6)
{}

static void rxe_release_udp_tunnel(struct socket *sk)
{}

static void prepare_udp_hdr(struct sk_buff *skb, __be16 src_port,
			    __be16 dst_port)
{}

static void prepare_ipv4_hdr(struct dst_entry *dst, struct sk_buff *skb,
			     __be32 saddr, __be32 daddr, __u8 proto,
			     __u8 tos, __u8 ttl, __be16 df, bool xnet)
{}

static void prepare_ipv6_hdr(struct dst_entry *dst, struct sk_buff *skb,
			     struct in6_addr *saddr, struct in6_addr *daddr,
			     __u8 proto, __u8 prio, __u8 ttl)
{}

static int prepare4(struct rxe_av *av, struct rxe_pkt_info *pkt,
		    struct sk_buff *skb)
{}

static int prepare6(struct rxe_av *av, struct rxe_pkt_info *pkt,
		    struct sk_buff *skb)
{}

int rxe_prepare(struct rxe_av *av, struct rxe_pkt_info *pkt,
		struct sk_buff *skb)
{}

static void rxe_skb_tx_dtor(struct sk_buff *skb)
{}

static int rxe_send(struct sk_buff *skb, struct rxe_pkt_info *pkt)
{}

/* fix up a send packet to match the packets
 * received from UDP before looping them back
 */
static int rxe_loopback(struct sk_buff *skb, struct rxe_pkt_info *pkt)
{}

int rxe_xmit_packet(struct rxe_qp *qp, 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)
{}

/*
 * this is required by rxe_cfg to match rxe devices in
 * /sys/class/infiniband up with their underlying ethernet devices
 */
const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num)
{}

int rxe_net_add(const char *ibdev_name, struct net_device *ndev)
{}

static void rxe_port_event(struct rxe_dev *rxe,
			   enum ib_event_type event)
{}

/* Caller must hold net_info_lock */
void rxe_port_up(struct rxe_dev *rxe)
{}

/* Caller must hold net_info_lock */
void rxe_port_down(struct rxe_dev *rxe)
{}

void rxe_set_port_state(struct rxe_dev *rxe)
{}

static int rxe_notify(struct notifier_block *not_blk,
		      unsigned long event,
		      void *arg)
{}

static struct notifier_block rxe_net_notifier =;

static int rxe_net_ipv4_init(void)
{}

static int rxe_net_ipv6_init(void)
{}

void rxe_net_exit(void)
{}

int rxe_net_init(void)
{}