linux/drivers/net/xen-netback/interface.c

/*
 * Network-device interface management.
 *
 * Copyright (c) 2004-2005, Keir Fraser
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation; or, when distributed
 * separately from the Linux kernel or incorporated into other
 * software packages, subject to the following license:
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this source file (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy, modify,
 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
 * and to permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

#include "common.h"

#include <linux/kthread.h>
#include <linux/sched/task.h>
#include <linux/ethtool.h>
#include <linux/rtnetlink.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>

#include <xen/events.h>
#include <asm/xen/hypercall.h>
#include <xen/balloon.h>

/* Number of bytes allowed on the internal guest Rx queue. */
#define XENVIF_RX_QUEUE_BYTES

/* This function is used to set SKBFL_ZEROCOPY_ENABLE as well as
 * increasing the inflight counter. We need to increase the inflight
 * counter because core driver calls into xenvif_zerocopy_callback
 * which calls xenvif_skb_zerocopy_complete.
 */
void xenvif_skb_zerocopy_prepare(struct xenvif_queue *queue,
				 struct sk_buff *skb)
{}

void xenvif_skb_zerocopy_complete(struct xenvif_queue *queue)
{}

static int xenvif_schedulable(struct xenvif *vif)
{}

static bool xenvif_handle_tx_interrupt(struct xenvif_queue *queue)
{}

static irqreturn_t xenvif_tx_interrupt(int irq, void *dev_id)
{}

static int xenvif_poll(struct napi_struct *napi, int budget)
{}

static bool xenvif_handle_rx_interrupt(struct xenvif_queue *queue)
{}

static irqreturn_t xenvif_rx_interrupt(int irq, void *dev_id)
{}

irqreturn_t xenvif_interrupt(int irq, void *dev_id)
{}

static u16 xenvif_select_queue(struct net_device *dev, struct sk_buff *skb,
			       struct net_device *sb_dev)
{}

static netdev_tx_t
xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev)
{}

static struct net_device_stats *xenvif_get_stats(struct net_device *dev)
{}

static void xenvif_up(struct xenvif *vif)
{}

static void xenvif_down(struct xenvif *vif)
{}

static int xenvif_open(struct net_device *dev)
{}

static int xenvif_close(struct net_device *dev)
{}

static int xenvif_change_mtu(struct net_device *dev, int mtu)
{}

static netdev_features_t xenvif_fix_features(struct net_device *dev,
	netdev_features_t features)
{}

static const struct xenvif_stat {} xenvif_stats[] =;

static int xenvif_get_sset_count(struct net_device *dev, int string_set)
{}

static void xenvif_get_ethtool_stats(struct net_device *dev,
				     struct ethtool_stats *stats, u64 * data)
{}

static void xenvif_get_strings(struct net_device *dev, u32 stringset, u8 * data)
{}

static const struct ethtool_ops xenvif_ethtool_ops =;

static const struct net_device_ops xenvif_netdev_ops =;

struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
			    unsigned int handle)
{}

int xenvif_init_queue(struct xenvif_queue *queue)
{}

void xenvif_carrier_on(struct xenvif *vif)
{}

int xenvif_connect_ctrl(struct xenvif *vif, grant_ref_t ring_ref,
			unsigned int evtchn)
{}

static void xenvif_disconnect_queue(struct xenvif_queue *queue)
{}

int xenvif_connect_data(struct xenvif_queue *queue,
			unsigned long tx_ring_ref,
			unsigned long rx_ring_ref,
			unsigned int tx_evtchn,
			unsigned int rx_evtchn)
{}

void xenvif_carrier_off(struct xenvif *vif)
{}

void xenvif_disconnect_data(struct xenvif *vif)
{}

void xenvif_disconnect_ctrl(struct xenvif *vif)
{}

/* Reverse the relevant parts of xenvif_init_queue().
 * Used for queue teardown from xenvif_free(), and on the
 * error handling paths in xenbus.c:connect().
 */
void xenvif_deinit_queue(struct xenvif_queue *queue)
{}

void xenvif_free(struct xenvif *vif)
{}