linux/lib/dim/net_dim.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
 * Copyright (c) 2018, Mellanox Technologies inc.  All rights reserved.
 */

#include <linux/dim.h>
#include <linux/rtnetlink.h>

/*
 * Net DIM profiles:
 *        There are different set of profiles for each CQ period mode.
 *        There are different set of profiles for RX/TX CQs.
 *        Each profile size must be of NET_DIM_PARAMS_NUM_PROFILES
 */
#define NET_DIM_RX_EQE_PROFILES

#define NET_DIM_RX_CQE_PROFILES

#define NET_DIM_TX_EQE_PROFILES

#define NET_DIM_TX_CQE_PROFILES

static const struct dim_cq_moder
rx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] =;

static const struct dim_cq_moder
tx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] =;

struct dim_cq_moder
net_dim_get_rx_moderation(u8 cq_period_mode, int ix)
{}
EXPORT_SYMBOL();

struct dim_cq_moder
net_dim_get_def_rx_moderation(u8 cq_period_mode)
{}
EXPORT_SYMBOL();

struct dim_cq_moder
net_dim_get_tx_moderation(u8 cq_period_mode, int ix)
{}
EXPORT_SYMBOL();

struct dim_cq_moder
net_dim_get_def_tx_moderation(u8 cq_period_mode)
{}
EXPORT_SYMBOL();

int net_dim_init_irq_moder(struct net_device *dev, u8 profile_flags,
			   u8 coal_flags, u8 rx_mode, u8 tx_mode,
			   void (*rx_dim_work)(struct work_struct *work),
			   void (*tx_dim_work)(struct work_struct *work))
{}
EXPORT_SYMBOL();

/* RTNL lock is held. */
void net_dim_free_irq_moder(struct net_device *dev)
{}
EXPORT_SYMBOL();

void net_dim_setting(struct net_device *dev, struct dim *dim, bool is_tx)
{}
EXPORT_SYMBOL();

void net_dim_work_cancel(struct dim *dim)
{}
EXPORT_SYMBOL();

struct dim_cq_moder net_dim_get_rx_irq_moder(struct net_device *dev,
					     struct dim *dim)
{}
EXPORT_SYMBOL();

struct dim_cq_moder net_dim_get_tx_irq_moder(struct net_device *dev,
					     struct dim *dim)
{}
EXPORT_SYMBOL();

void net_dim_set_rx_mode(struct net_device *dev, u8 rx_mode)
{}
EXPORT_SYMBOL();

void net_dim_set_tx_mode(struct net_device *dev, u8 tx_mode)
{}
EXPORT_SYMBOL();

static int net_dim_step(struct dim *dim)
{}

static void net_dim_exit_parking(struct dim *dim)
{}

static int net_dim_stats_compare(struct dim_stats *curr,
				 struct dim_stats *prev)
{}

static bool net_dim_decision(struct dim_stats *curr_stats, struct dim *dim)
{}

void net_dim(struct dim *dim, struct dim_sample end_sample)
{}
EXPORT_SYMBOL();