linux/drivers/net/ethernet/sfc/siena/tx_common.c

// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
 * Driver for Solarflare network controllers and boards
 * Copyright 2018 Solarflare Communications Inc.
 *
 * 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, incorporated herein by reference.
 */

#include "net_driver.h"
#include "efx.h"
#include "nic_common.h"
#include "tx_common.h"
#include <net/gso.h>

static unsigned int efx_tx_cb_page_count(struct efx_tx_queue *tx_queue)
{}

int efx_siena_probe_tx_queue(struct efx_tx_queue *tx_queue)
{}

void efx_siena_init_tx_queue(struct efx_tx_queue *tx_queue)
{}

void efx_siena_remove_tx_queue(struct efx_tx_queue *tx_queue)
{}

static void efx_dequeue_buffer(struct efx_tx_queue *tx_queue,
			       struct efx_tx_buffer *buffer,
			       unsigned int *pkts_compl,
			       unsigned int *bytes_compl)
{}

void efx_siena_fini_tx_queue(struct efx_tx_queue *tx_queue)
{}

/* Remove packets from the TX queue
 *
 * This removes packets from the TX queue, up to and including the
 * specified index.
 */
static void efx_dequeue_buffers(struct efx_tx_queue *tx_queue,
				unsigned int index,
				unsigned int *pkts_compl,
				unsigned int *bytes_compl)
{}

void efx_siena_xmit_done_check_empty(struct efx_tx_queue *tx_queue)
{}

void efx_siena_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
{}

/* Remove buffers put into a tx_queue for the current packet.
 * None of the buffers must have an skb attached.
 */
void efx_siena_enqueue_unwind(struct efx_tx_queue *tx_queue,
			      unsigned int insert_count)
{}

struct efx_tx_buffer *efx_siena_tx_map_chunk(struct efx_tx_queue *tx_queue,
					     dma_addr_t dma_addr, size_t len)
{}

static int efx_tx_tso_header_length(struct sk_buff *skb)
{}

/* Map all data from an SKB for DMA and create descriptors on the queue. */
int efx_siena_tx_map_data(struct efx_tx_queue *tx_queue, struct sk_buff *skb,
			  unsigned int segment_count)
{}

unsigned int efx_siena_tx_max_skb_descs(struct efx_nic *efx)
{}

/*
 * Fallback to software TSO.
 *
 * This is used if we are unable to send a GSO packet through hardware TSO.
 * This should only ever happen due to per-queue restrictions - unsupported
 * packets should first be filtered by the feature flags.
 *
 * Returns 0 on success, error code otherwise.
 */
int efx_siena_tx_tso_fallback(struct efx_tx_queue *tx_queue,
			      struct sk_buff *skb)
{}