1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2024 NVIDIA Corporation & Affiliates
*/
#ifndef ETHDEV_ETHTOOL_H
#define ETHDEV_ETHTOOL_H
#include <stdint.h>
#include <linux/ethtool.h>
#include <rte_compat.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Convert bitmap from ETHTOOL_GLINKSETTINGS ethtool_link_settings::link_mode_masks
* to bitmap RTE_ETH_LINK_SPEED_*
*/
__rte_internal
uint32_t rte_eth_link_speed_glink(const uint32_t *bitmap, int8_t nwords);
/*
* Convert bitmap from deprecated ETHTOOL_GSET ethtool_cmd::supported
* to bitmap RTE_ETH_LINK_SPEED_*
*/
__rte_internal
uint32_t rte_eth_link_speed_gset(uint32_t legacy_bitmap);
#ifdef __cplusplus
}
#endif
#endif /* ETHDEV_ETHTOOL_H */
|