/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2017 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* - NIC queue statistics mappings
*
* Any other configuration will not be stored and will need to be re-entered
- * after a call to rte_eth_dev_start().
+ * before a call to rte_eth_dev_start().
*
* Finally, a network application can close an Ethernet device by invoking the
* rte_eth_dev_close() function.
#include "rte_ether.h"
#include "rte_eth_ctrl.h"
#include "rte_dev_info.h"
-#include "rte_compat.h"
struct rte_mbuf;
/**
* This enum indicates the possible number of traffic classes
- * in DCB configratioins
+ * in DCB configurations
*/
enum rte_eth_nb_tcs {
ETH_4_TCS = 4, /**< 4 TCs with DCB. */
/** @internal Structure to keep track of registered callbacks */
TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
-
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
-#define RTE_PMD_DEBUG_TRACE(...) \
- rte_pmd_debug_trace(__func__, __VA_ARGS__)
-#else
-#define RTE_PMD_DEBUG_TRACE(...)
-#endif
-
-
/* Macros to check for valid port */
#define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \
if (!rte_eth_dev_is_valid_port(port_id)) { \
} \
} while (0)
+#define RTE_ETH_DEV_TO_PCI(eth_dev) RTE_DEV_TO_PCI((eth_dev)->device)
+
/**
* l2 tunnel configuration.
*/
struct rte_eth_xstat *stats, unsigned n);
/**< @internal Get extended stats of an Ethernet device. */
-typedef int (*eth_xstats_get_by_ids_t)(struct rte_eth_dev *dev,
- uint64_t *ids, uint64_t *values, unsigned int n);
+typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
+ const uint64_t *ids,
+ uint64_t *values,
+ unsigned int n);
/**< @internal Get extended stats of an Ethernet device. */
typedef void (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
struct rte_eth_xstat_name *xstats_names, unsigned size);
/**< @internal Get names of extended stats of an Ethernet device. */
-typedef int (*eth_xstats_get_names_by_ids_t)(struct rte_eth_dev *dev,
- struct rte_eth_xstat_name *xstats_names, uint64_t *ids,
+typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
+ struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
unsigned int size);
/**< @internal Get names of extended stats of an Ethernet device. */
-typedef int (*eth_xstats_get_by_name_t)(struct rte_eth_dev *dev,
- struct rte_eth_xstat_name *xstats_names,
- struct rte_eth_xstat *xstat,
- const char *name);
-/**< @internal Get xstat specified by name of an Ethernet device. */
-
typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
uint16_t queue_id,
uint8_t stat_idx,
typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
/**< @internal Remove MAC address from receive address register */
-typedef void (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
+typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
struct ether_addr *mac_addr,
uint32_t index,
uint32_t vmdq);
uint8_t en);
/**< @internal enable/disable the l2 tunnel offload functions */
-#ifdef RTE_NIC_BYPASS
-
-enum {
- RTE_BYPASS_MODE_NONE,
- RTE_BYPASS_MODE_NORMAL,
- RTE_BYPASS_MODE_BYPASS,
- RTE_BYPASS_MODE_ISOLATE,
- RTE_BYPASS_MODE_NUM,
-};
-
-#define RTE_BYPASS_MODE_VALID(x) \
- ((x) > RTE_BYPASS_MODE_NONE && (x) < RTE_BYPASS_MODE_NUM)
-
-enum {
- RTE_BYPASS_EVENT_NONE,
- RTE_BYPASS_EVENT_START,
- RTE_BYPASS_EVENT_OS_ON = RTE_BYPASS_EVENT_START,
- RTE_BYPASS_EVENT_POWER_ON,
- RTE_BYPASS_EVENT_OS_OFF,
- RTE_BYPASS_EVENT_POWER_OFF,
- RTE_BYPASS_EVENT_TIMEOUT,
- RTE_BYPASS_EVENT_NUM
-};
-
-#define RTE_BYPASS_EVENT_VALID(x) \
- ((x) > RTE_BYPASS_EVENT_NONE && (x) < RTE_BYPASS_MODE_NUM)
-
-enum {
- RTE_BYPASS_TMT_OFF, /* timeout disabled. */
- RTE_BYPASS_TMT_1_5_SEC, /* timeout for 1.5 seconds */
- RTE_BYPASS_TMT_2_SEC, /* timeout for 2 seconds */
- RTE_BYPASS_TMT_3_SEC, /* timeout for 3 seconds */
- RTE_BYPASS_TMT_4_SEC, /* timeout for 4 seconds */
- RTE_BYPASS_TMT_8_SEC, /* timeout for 8 seconds */
- RTE_BYPASS_TMT_16_SEC, /* timeout for 16 seconds */
- RTE_BYPASS_TMT_32_SEC, /* timeout for 32 seconds */
- RTE_BYPASS_TMT_NUM
-};
-
-#define RTE_BYPASS_TMT_VALID(x) \
- ((x) == RTE_BYPASS_TMT_OFF || \
- ((x) > RTE_BYPASS_TMT_OFF && (x) < RTE_BYPASS_TMT_NUM))
-
-typedef void (*bypass_init_t)(struct rte_eth_dev *dev);
-typedef int32_t (*bypass_state_set_t)(struct rte_eth_dev *dev, uint32_t *new_state);
-typedef int32_t (*bypass_state_show_t)(struct rte_eth_dev *dev, uint32_t *state);
-typedef int32_t (*bypass_event_set_t)(struct rte_eth_dev *dev, uint32_t state, uint32_t event);
-typedef int32_t (*bypass_event_show_t)(struct rte_eth_dev *dev, uint32_t event_shift, uint32_t *event);
-typedef int32_t (*bypass_wd_timeout_set_t)(struct rte_eth_dev *dev, uint32_t timeout);
-typedef int32_t (*bypass_wd_timeout_show_t)(struct rte_eth_dev *dev, uint32_t *wd_timeout);
-typedef int32_t (*bypass_ver_show_t)(struct rte_eth_dev *dev, uint32_t *ver);
-typedef int32_t (*bypass_wd_reset_t)(struct rte_eth_dev *dev);
-#endif
typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
enum rte_filter_type filter_type,
eth_promiscuous_enable_t promiscuous_enable; /**< Promiscuous ON. */
eth_promiscuous_disable_t promiscuous_disable;/**< Promiscuous OFF. */
eth_allmulticast_enable_t allmulticast_enable;/**< RX multicast ON. */
- eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OF. */
+ eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
eth_mac_addr_remove_t mac_addr_remove; /**< Remove MAC address. */
eth_mac_addr_add_t mac_addr_add; /**< Add a MAC address. */
eth_mac_addr_set_t mac_addr_set; /**< Set a MAC address. */
eth_get_eeprom_t get_eeprom; /**< Get eeprom data. */
eth_set_eeprom_t set_eeprom; /**< Set eeprom. */
- /* bypass control */
-#ifdef RTE_NIC_BYPASS
- bypass_init_t bypass_init;
- bypass_state_set_t bypass_state_set;
- bypass_state_show_t bypass_state_show;
- bypass_event_set_t bypass_event_set;
- bypass_event_show_t bypass_event_show;
- bypass_wd_timeout_set_t bypass_wd_timeout_set;
- bypass_wd_timeout_show_t bypass_wd_timeout_show;
- bypass_ver_show_t bypass_ver_show;
- bypass_wd_reset_t bypass_wd_reset;
-#endif
eth_filter_ctrl_t filter_ctrl; /**< common filter control. */
eth_timesync_adjust_time timesync_adjust_time; /** Adjust the device clock. */
eth_timesync_read_time timesync_read_time; /** Get the device clock time. */
eth_timesync_write_time timesync_write_time; /** Set the device clock time. */
- eth_xstats_get_by_ids_t xstats_get_by_ids;
- /**< Get extended device statistics by ID. */
- eth_xstats_get_names_by_ids_t xstats_get_names_by_ids;
+
+ eth_xstats_get_by_id_t xstats_get_by_id;
+ /**< Get extended device statistic values by ID. */
+ eth_xstats_get_names_by_id_t xstats_get_names_by_id;
/**< Get name of extended device statistics by ID. */
- eth_xstats_get_by_name_t xstats_get_by_name;
- /**< Get extended device statistics by name. */
};
/**
uint32_t dev_flags; /**< Capabilities */
enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */
int numa_node; /**< NUMA node connection */
- const char *drv_name; /**< Driver name */
};
/** Device supports hotplug detach */
int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
/**
- * Attach a new Ethernet device specified by aruguments.
+ * Attach a new Ethernet device specified by arguments.
*
* @param devargs
* A pointer to a strings array describing the new device
*/
void rte_eth_stats_reset(uint8_t port_id);
-
-/**
- * Gets the ID of a statistic from its name.
- *
- * This function searches for the statistics using string compares, and
- * as such should not be used on the fast-path. For fast-path retrieval of
- * specific statistics, store the ID as provided in *id* from this function,
- * and pass the ID to rte_eth_xstats_get()
- *
- * @param port_id The port to look up statistics from
- * @param xstat_name The name of the statistic to return
- * @param[out] id A pointer to an app-supplied uint64_t which should be
- * set to the ID of the stat if the stat exists.
- * @return
- * 0 on success
- * -ENODEV for invalid port_id,
- * -EINVAL if the xstat_name doesn't exist in port_id
- */
-int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
- uint64_t *id);
-
-/**
- * Retrieve all extended statistics of an Ethernet device.
- *
- * @param port_id
- * The port identifier of the Ethernet device.
- * @param xstats
- * A pointer to a table of structure of type *rte_eth_xstat*
- * to be filled with device statistics ids and values: id is the
- * index of the name string in xstats_names (see rte_eth_xstats_get_names()),
- * and value is the statistic counter.
- * This parameter can be set to NULL if n is 0.
- * @param n
- * The size of the xstats array (number of elements).
- * @return
- * - A positive value lower or equal to n: success. The return value
- * is the number of entries filled in the stats table.
- * - A positive value higher than n: error, the given statistics table
- * is too small. The return value corresponds to the size that should
- * be given to succeed. The entries in the table are not valid and
- * shall not be used by the caller.
- * - A negative value on error (invalid port id).
- */
-__rte_deprecated
-int rte_eth_xstats_get_all(uint8_t port_id, struct rte_eth_xstat *xstats,
- unsigned int n);
-
/**
- * Retrieve names of all extended statistics of an Ethernet device.
+ * Retrieve names of extended statistics of an Ethernet device.
*
* @param port_id
* The port identifier of the Ethernet device.
* An rte_eth_xstat_name array of at least *size* elements to
* be filled. If set to NULL, the function returns the required number
* of elements.
- * @param n
+ * @param size
* The size of the xstats_names array (number of elements).
* @return
* - A positive value lower or equal to size: success. The return value
* shall not be used by the caller.
* - A negative value on error (invalid port id).
*/
-__rte_deprecated
-int rte_eth_xstats_get_names_all(uint8_t port_id,
- struct rte_eth_xstat_name *xstats_names, unsigned int n);
+int rte_eth_xstats_get_names(uint8_t port_id,
+ struct rte_eth_xstat_name *xstats_names,
+ unsigned int size);
/**
* Retrieve extended statistics of an Ethernet device.
* shall not be used by the caller.
* - A negative value on error (invalid port id).
*/
-int rte_eth_xstats_get_v22(uint8_t port_id, struct rte_eth_xstat *xstats,
- unsigned int n);
+int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
+ unsigned int n);
/**
- * Retrieve extended statistics of an Ethernet device.
+ * Retrieve names of extended statistics of an Ethernet device.
*
* @param port_id
* The port identifier of the Ethernet device.
+ * @param xstats_names
+ * An rte_eth_xstat_name array of at least *size* elements to
+ * be filled. If set to NULL, the function returns the required number
+ * of elements.
* @param ids
- * A pointer to an ids array passed by application. This tells wich
- * statistics values function should retrieve. This parameter
- * can be set to NULL if n is 0. In this case function will retrieve
- * all avalible statistics.
- * @param values
- * A pointer to a table to be filled with device statistics values.
- * @param n
- * The size of the ids array (number of elements).
+ * IDs array given by app to retrieve specific statistics
+ * @param size
+ * The size of the xstats_names array (number of elements).
* @return
- * - A positive value lower or equal to n: success. The return value
+ * - A positive value lower or equal to size: success. The return value
* is the number of entries filled in the stats table.
- * - A positive value higher than n: error, the given statistics table
+ * - A positive value higher than size: error, the given statistics table
* is too small. The return value corresponds to the size that should
* be given to succeed. The entries in the table are not valid and
* shall not be used by the caller.
* - A negative value on error (invalid port id).
*/
-int rte_eth_xstats_get_v1705(uint8_t port_id, uint64_t *ids, uint64_t *values,
- unsigned int n);
-
-int rte_eth_xstats_get(uint8_t port_id, uint64_t *ids, uint64_t *values,
- unsigned int n);
+int
+rte_eth_xstats_get_names_by_id(uint8_t port_id,
+ struct rte_eth_xstat_name *xstats_names, unsigned int size,
+ uint64_t *ids);
/**
* Retrieve extended statistics of an Ethernet device.
*
* @param port_id
* The port identifier of the Ethernet device.
- * @param xstats_names
- * A pointer to a table of structure of type *rte_eth_xstat*
- * to be filled with device statistics ids and values: id is the
- * index of the name string in xstats_names (see rte_eth_xstats_get_names()),
- * and value is the statistic counter.
- * This parameter can be set to NULL if n is 0.
+ * @param ids
+ * A pointer to an ids array passed by application. This tells which
+ * statistics values function should retrieve. This parameter
+ * can be set to NULL if n is 0. In this case function will retrieve
+ * all avalible statistics.
+ * @param values
+ * A pointer to a table to be filled with device statistics values.
* @param n
- * The size of the xstats array (number of elements).
+ * The size of the ids array (number of elements).
* @return
* - A positive value lower or equal to n: success. The return value
* is the number of entries filled in the stats table.
* shall not be used by the caller.
* - A negative value on error (invalid port id).
*/
-int rte_eth_xstats_get_names_v1607(uint8_t port_id,
- struct rte_eth_xstat_name *xstats_names, unsigned int n);
+int rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids,
+ uint64_t *values, unsigned int n);
/**
- * Retrieve names of extended statistics of an Ethernet device.
+ * Gets the ID of a statistic from its name.
*
- * @param port_id
- * The port identifier of the Ethernet device.
- * @param xstats_names
- * An rte_eth_xstat_name array of at least *size* elements to
- * be filled. If set to NULL, the function returns the required number
- * of elements.
- * @param ids
- * IDs array given by app to retrieve specific statistics
- * @param size
- * The size of the xstats_names array (number of elements).
+ * This function searches for the statistics using string compares, and
+ * as such should not be used on the fast-path. For fast-path retrieval of
+ * specific statistics, store the ID as provided in *id* from this function,
+ * and pass the ID to rte_eth_xstats_get()
+ *
+ * @param port_id The port to look up statistics from
+ * @param xstat_name The name of the statistic to return
+ * @param[out] id A pointer to an app-supplied uint64_t which should be
+ * set to the ID of the stat if the stat exists.
* @return
- * - A positive value lower or equal to size: success. The return value
- * is the number of entries filled in the stats table.
- * - A positive value higher than size: error, the given statistics table
- * is too small. The return value corresponds to the size that should
- * be given to succeed. The entries in the table are not valid and
- * shall not be used by the caller.
- * - A negative value on error (invalid port id).
+ * 0 on success
+ * -ENODEV for invalid port_id,
+ * -EINVAL if the xstat_name doesn't exist in port_id
*/
-int rte_eth_xstats_get_names_v1705(uint8_t port_id,
- struct rte_eth_xstat_name *xstats_names, unsigned int size,
- uint64_t *ids);
-
-int rte_eth_xstats_get_names(uint8_t port_id,
- struct rte_eth_xstat_name *xstats_names, unsigned int size,
- uint64_t *ids);
+int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
+ uint64_t *id);
/**
* Reset extended statistics of an Ethernet device.
* @param ptype_mask
* A hint of what kind of packet type which the caller is interested in.
* @param ptypes
- * An array pointer to store adequent packet types, allocated by caller.
+ * An array pointer to store adequate packet types, allocated by caller.
* @param num
* Size of the array pointed by param ptypes.
* @return
int rte_eth_dev_get_vlan_offload(uint8_t port_id);
/**
- * Set port based TX VLAN insersion on or off.
+ * Set port based TX VLAN insertion on or off.
*
* @param port_id
* The port identifier of the Ethernet device.
* @param pvid
- * Port based TX VLAN identifier togeth with user priority.
+ * Port based TX VLAN identifier together with user priority.
* @param on
* Turn on or off the port based TX VLAN insertion.
*
* method to retrieve bursts of received packets and to immediately
* queue them for further parallel processing by another logical core,
* for instance. However, instead of having received packets being
- * individually queued by the driver, this approach allows the invoker
+ * individually queued by the driver, this approach allows the caller
* of the rte_eth_rx_burst() function to queue a burst of retrieved
* packets at a time and therefore dramatically reduce the cost of
* enqueue/dequeue operations per packet.
* causing N packets to be sent, and the error callback to be called for
* the rest.
*/
-static inline uint16_t __attribute__((always_inline))
+static __rte_always_inline uint16_t
rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id,
struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
{
RTE_ETH_EVENT_MAX /**< max value of this enum */
};
-typedef void (*rte_eth_dev_cb_fn)(uint8_t port_id, \
- enum rte_eth_event_type event, void *cb_arg);
+typedef int (*rte_eth_dev_cb_fn)(uint8_t port_id,
+ enum rte_eth_event_type event, void *cb_arg, void *ret_param);
/**< user application callback to be registered for interrupts */
* @param cb_arg
* Pointer to the parameters for the registered callback.
*
- * The user data is overwritten in the case of RTE_ETH_EVENT_VF_MBOX.
- * This even occurs when a message from the VF is received by the PF.
- * The user data is overwritten with struct rte_pmd_ixgbe_mb_event_param.
- * This struct is defined in rte_pmd_ixgbe.h.
- *
* @return
* - On success, zero.
* - On failure, a negative value.
* @param event
* Eth device interrupt event type.
* @param cb_arg
- * Update callback parameter to pass data back to user application.
+ * callback parameter.
+ * @param ret_param
+ * To pass data back to user application.
* This allows the user application to decide if a particular function
* is permitted or not.
*
* @return
- * void
+ * int
*/
-void _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
- enum rte_eth_event_type event, void *cb_arg);
+int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+ enum rte_eth_event_type event, void *cb_arg, void *ret_param);
/**
* When there is no rx packet coming in Rx Queue for a long time, we can
* sleep lcore related to RX Queue for power saving, and enable rx interrupt
- * to be triggered when rx packect arrives.
+ * to be triggered when Rx packet arrives.
*
* The rte_eth_dev_rx_intr_enable() function enables rx queue
* interrupt on specific rx queue of a port.
int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
uint16_t tx_rate);
-/**
- * Initialize bypass logic. This function needs to be called before
- * executing any other bypass API.
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_init(uint8_t port);
-
-/**
- * Return bypass state.
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param state
- * The return bypass state.
- * - (1) Normal mode
- * - (2) Bypass mode
- * - (3) Isolate mode
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_state_show(uint8_t port, uint32_t *state);
-
-/**
- * Set bypass state
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param new_state
- * The current bypass state.
- * - (1) Normal mode
- * - (2) Bypass mode
- * - (3) Isolate mode
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_state_set(uint8_t port, uint32_t *new_state);
-
-/**
- * Return bypass state when given event occurs.
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param event
- * The bypass event
- * - (1) Main power on (power button is pushed)
- * - (2) Auxiliary power on (power supply is being plugged)
- * - (3) Main power off (system shutdown and power supply is left plugged in)
- * - (4) Auxiliary power off (power supply is being unplugged)
- * - (5) Display or set the watchdog timer
- * @param state
- * The bypass state when given event occurred.
- * - (1) Normal mode
- * - (2) Bypass mode
- * - (3) Isolate mode
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_event_show(uint8_t port, uint32_t event, uint32_t *state);
-
-/**
- * Set bypass state when given event occurs.
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param event
- * The bypass event
- * - (1) Main power on (power button is pushed)
- * - (2) Auxiliary power on (power supply is being plugged)
- * - (3) Main power off (system shutdown and power supply is left plugged in)
- * - (4) Auxiliary power off (power supply is being unplugged)
- * - (5) Display or set the watchdog timer
- * @param state
- * The assigned state when given event occurs.
- * - (1) Normal mode
- * - (2) Bypass mode
- * - (3) Isolate mode
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_event_store(uint8_t port, uint32_t event, uint32_t state);
-
-/**
- * Set bypass watchdog timeout count.
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param timeout
- * The timeout to be set.
- * - (0) 0 seconds (timer is off)
- * - (1) 1.5 seconds
- * - (2) 2 seconds
- * - (3) 3 seconds
- * - (4) 4 seconds
- * - (5) 8 seconds
- * - (6) 16 seconds
- * - (7) 32 seconds
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_wd_timeout_store(uint8_t port, uint32_t timeout);
-
-/**
- * Get bypass firmware version.
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param ver
- * The firmware version
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_ver_show(uint8_t port, uint32_t *ver);
-
-/**
- * Return bypass watchdog timeout in seconds
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param wd_timeout
- * The return watchdog timeout. "0" represents timer expired
- * - (0) 0 seconds (timer is off)
- * - (1) 1.5 seconds
- * - (2) 2 seconds
- * - (3) 3 seconds
- * - (4) 4 seconds
- * - (5) 8 seconds
- * - (6) 16 seconds
- * - (7) 32 seconds
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout);
-
-/**
- * Reset bypass watchdog timer
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-EINVAL) if bad parameter.
- */
-int rte_eth_dev_bypass_wd_reset(uint8_t port);
-
/**
* Configuration of Receive Side Scaling hash computation of Ethernet device.
*
void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
rte_rx_callback_fn fn, void *user_param);
-/*
-* Add a callback that must be called first on packet RX on a given port
-* and queue.
-*
-* This API configures a first function to be called for each burst of
-* packets received on a given NIC port queue. The return value is a pointer
-* that can be used to later remove the callback using
-* rte_eth_remove_rx_callback().
-*
-* Multiple functions are called in the order that they are added.
-*
-* @param port_id
-* The port identifier of the Ethernet device.
-* @param queue_id
-* The queue on the Ethernet device on which the callback is to be added.
-* @param fn
-* The callback function
-* @param user_param
-* A generic pointer parameter which will be passed to each invocation of the
-* callback function on this port and queue.
-*
-* @return
-* NULL on error.
-* On success, a pointer value which can later be used to remove the callback.
-*/
+/**
+ * Add a callback that must be called first on packet RX on a given port
+ * and queue.
+ *
+ * This API configures a first function to be called for each burst of
+ * packets received on a given NIC port queue. The return value is a pointer
+ * that can be used to later remove the callback using
+ * rte_eth_remove_rx_callback().
+ *
+ * Multiple functions are called in the order that they are added.
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param queue_id
+ * The queue on the Ethernet device on which the callback is to be added.
+ * @param fn
+ * The callback function
+ * @param user_param
+ * A generic pointer parameter which will be passed to each invocation of the
+ * callback function on this port and queue.
+ *
+ * @return
+ * NULL on error.
+ * On success, a pointer value which can later be used to remove the callback.
+ */
void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
rte_rx_callback_fn fn, void *user_param);
uint8_t en);
/**
-* Get the port id from pci adrress or device name
+* Get the port id from pci address or device name
* Ex: 0000:2:00.0 or vdev name net_pcap0
*
* @param name
* @param port_id
* pointer to port identifier of the device
* @return
-* - (0) if successful.
+* - (0) if successful and port_id is filled.
* - (-ENODEV or -EINVAL) on failure.
*/
int