File: ethdev_linux_ethtool.h

package info (click to toggle)
dpdk 25.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 127,892 kB
  • sloc: ansic: 2,358,479; python: 16,426; sh: 4,474; makefile: 1,713; awk: 70
file content (35 lines) | stat: -rw-r--r-- 723 bytes parent folder | download
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 */