linux/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  Copyright (C) 2013-2014 Chelsio Communications.  All rights reserved.
 *
 *  Written by Anish Bhatt ([email protected])
 *	       Casey Leedom ([email protected])
 */

#include "cxgb4.h"

/* DCBx version control
 */
const char * const dcb_ver_array[] =;

static inline bool cxgb4_dcb_state_synced(enum cxgb4_dcb_state state)
{}

/* Initialize a port's Data Center Bridging state.
 */
void cxgb4_dcb_state_init(struct net_device *dev)
{}

void cxgb4_dcb_version_init(struct net_device *dev)
{}

static void cxgb4_dcb_cleanup_apps(struct net_device *dev)
{}

/* Reset a port's Data Center Bridging state.  Typically used after a
 * Link Down event.
 */
void cxgb4_dcb_reset(struct net_device *dev)
{}

/* update the dcb port support, if version is IEEE then set it to
 * FW_PORT_DCB_VER_IEEE and if DCB_CAP_DCBX_VER_CEE is already set then
 * clear that. and if it is set to CEE then set dcb supported to
 * DCB_CAP_DCBX_VER_CEE & if DCB_CAP_DCBX_VER_IEEE is set, clear it
 */
static inline void cxgb4_dcb_update_support(struct port_dcb_info *dcb)
{}

/* Finite State machine for Data Center Bridging.
 */
void cxgb4_dcb_state_fsm(struct net_device *dev,
			 enum cxgb4_dcb_state_input transition_to)
{}

/* Handle a DCB/DCBX update message from the firmware.
 */
void cxgb4_dcb_handle_fw_update(struct adapter *adap,
				const struct fw_port_cmd *pcmd)
{}

/* Data Center Bridging netlink operations.
 */


/* Get current DCB enabled/disabled state.
 */
static u8 cxgb4_getstate(struct net_device *dev)
{}

/* Set DCB enabled/disabled.
 */
static u8 cxgb4_setstate(struct net_device *dev, u8 enabled)
{}

static void cxgb4_getpgtccfg(struct net_device *dev, int tc,
			     u8 *prio_type, u8 *pgid, u8 *bw_per,
			     u8 *up_tc_map, int local)
{}

static void cxgb4_getpgtccfg_tx(struct net_device *dev, int tc,
				u8 *prio_type, u8 *pgid, u8 *bw_per,
				u8 *up_tc_map)
{}


static void cxgb4_getpgtccfg_rx(struct net_device *dev, int tc,
				u8 *prio_type, u8 *pgid, u8 *bw_per,
				u8 *up_tc_map)
{}

static void cxgb4_setpgtccfg_tx(struct net_device *dev, int tc,
				u8 prio_type, u8 pgid, u8 bw_per,
				u8 up_tc_map)
{}

static void cxgb4_getpgbwgcfg(struct net_device *dev, int pgid, u8 *bw_per,
			      int local)
{}

static void cxgb4_getpgbwgcfg_tx(struct net_device *dev, int pgid, u8 *bw_per)
{}

static void cxgb4_getpgbwgcfg_rx(struct net_device *dev, int pgid, u8 *bw_per)
{}

static void cxgb4_setpgbwgcfg_tx(struct net_device *dev, int pgid,
				 u8 bw_per)
{}

/* Return whether the specified Traffic Class Priority has Priority Pause
 * Frames enabled.
 */
static void cxgb4_getpfccfg(struct net_device *dev, int priority, u8 *pfccfg)
{}

/* Enable/disable Priority Pause Frames for the specified Traffic Class
 * Priority.
 */
static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg)
{}

static u8 cxgb4_setall(struct net_device *dev)
{}

/* Return DCB capabilities.
 */
static u8 cxgb4_getcap(struct net_device *dev, int cap_id, u8 *caps)
{}

/* Return the number of Traffic Classes for the indicated Traffic Class ID.
 */
static int cxgb4_getnumtcs(struct net_device *dev, int tcs_id, u8 *num)
{}

/* Set the number of Traffic Classes supported for the indicated Traffic Class
 * ID.
 */
static int cxgb4_setnumtcs(struct net_device *dev, int tcs_id, u8 num)
{}

/* Return whether Priority Flow Control is enabled.  */
static u8 cxgb4_getpfcstate(struct net_device *dev)
{}

/* Enable/disable Priority Flow Control. */
static void cxgb4_setpfcstate(struct net_device *dev, u8 state)
{}

/* Return the Application User Priority Map associated with the specified
 * Application ID.
 */
static int __cxgb4_getapp(struct net_device *dev, u8 app_idtype, u16 app_id,
			  int peer)
{}

/* Return the Application User Priority Map associated with the specified
 * Application ID.
 */
static int cxgb4_getapp(struct net_device *dev, u8 app_idtype, u16 app_id)
{}

/* Write a new Application User Priority Map for the specified Application ID
 */
static int __cxgb4_setapp(struct net_device *dev, u8 app_idtype, u16 app_id,
			  u8 app_prio)
{}

/* Priority for CEE inside dcb_app is bitmask, with 0 being an invalid value */
static int cxgb4_setapp(struct net_device *dev, u8 app_idtype, u16 app_id,
			u8 app_prio)
{}

/* Return whether IEEE Data Center Bridging has been negotiated.
 */
static inline int
cxgb4_ieee_negotiation_complete(struct net_device *dev,
				enum cxgb4_dcb_fw_msgs dcb_subtype)
{}

static int cxgb4_ieee_read_ets(struct net_device *dev, struct ieee_ets *ets,
			       int local)
{}

static int cxgb4_ieee_get_ets(struct net_device *dev, struct ieee_ets *ets)
{}

/* We reuse this for peer PFC as well, as we can't have it enabled one way */
static int cxgb4_ieee_get_pfc(struct net_device *dev, struct ieee_pfc *pfc)
{}

static int cxgb4_ieee_peer_ets(struct net_device *dev, struct ieee_ets *ets)
{}

/* Fill in the Application User Priority Map associated with the
 * specified Application.
 * Priority for IEEE dcb_app is an integer, with 0 being a valid value
 */
static int cxgb4_ieee_getapp(struct net_device *dev, struct dcb_app *app)
{}

/* Write a new Application User Priority Map for the specified Application ID.
 * Priority for IEEE dcb_app is an integer, with 0 being a valid value
 */
static int cxgb4_ieee_setapp(struct net_device *dev, struct dcb_app *app)
{}

/* Return our DCBX parameters.
 */
static u8 cxgb4_getdcbx(struct net_device *dev)
{}

/* Set our DCBX parameters.
 */
static u8 cxgb4_setdcbx(struct net_device *dev, u8 dcb_request)
{}

static int cxgb4_getpeer_app(struct net_device *dev,
			     struct dcb_peer_app_info *info, u16 *app_count)
{}

static int cxgb4_getpeerapp_tbl(struct net_device *dev, struct dcb_app *table)
{}

/* Return Priority Group information.
 */
static int cxgb4_cee_peer_getpg(struct net_device *dev, struct cee_pg *pg)
{}

/* Return Priority Flow Control information.
 */
static int cxgb4_cee_peer_getpfc(struct net_device *dev, struct cee_pfc *pfc)
{}

const struct dcbnl_rtnl_ops cxgb4_dcb_ops =;