ethdev: port kernel definitions for module EEPROM

Message ID d9481d6b5d57c8b8eab4069b3ccff33e060039a4.1568027294.git.dekelp@mellanox.com
State New
Delegated to: Ferruh Yigit
Headers show
Series
  • ethdev: port kernel definitions for module EEPROM
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance success Performance Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/checkpatch success coding style OK

Commit Message

Dekel Peled Sept. 9, 2019, 11:09 a.m.
This patch copies definitions of maximal data length in module eeprom,
from include/uapi/linux/ethtool.h.

These definitions can be used by application to validate data length.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 lib/librte_ethdev/rte_dev_info.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Viacheslav Ovsiienko Sept. 10, 2019, 6:11 a.m. | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Monday, September 9, 2019 14:10
> To: Thomas Monjalon <thomas@monjalon.net>; ferruh.yigit@intel.com;
> arybchenko@solarflare.com; Shahaf Shuler <shahafs@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] ethdev: port kernel definitions for module
> EEPROM
> 
> This patch copies definitions of maximal data length in module eeprom, from
> include/uapi/linux/ethtool.h.
> 
> These definitions can be used by application to validate data length.
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  lib/librte_ethdev/rte_dev_info.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/librte_ethdev/rte_dev_info.h
> b/lib/librte_ethdev/rte_dev_info.h
> index fea5da8..7a6b61f 100644
> --- a/lib/librte_ethdev/rte_dev_info.h
> +++ b/lib/librte_ethdev/rte_dev_info.h
> @@ -43,7 +43,9 @@ struct rte_eth_dev_module_info {
>  #define RTE_ETH_MODULE_SFF_8472_LEN         512
>  #define RTE_ETH_MODULE_SFF_8636             0x3
>  #define RTE_ETH_MODULE_SFF_8636_LEN         256
> +#define RTE_ETH_MODULE_SFF_8636_MAX_LEN     640
>  #define RTE_ETH_MODULE_SFF_8436             0x4
>  #define RTE_ETH_MODULE_SFF_8436_LEN         256
> +#define RTE_ETH_MODULE_SFF_8436_MAX_LEN     640
> 
>  #endif /* _RTE_DEV_INFO_H_ */
> --
> 1.8.3.1

Patch

diff --git a/lib/librte_ethdev/rte_dev_info.h b/lib/librte_ethdev/rte_dev_info.h
index fea5da8..7a6b61f 100644
--- a/lib/librte_ethdev/rte_dev_info.h
+++ b/lib/librte_ethdev/rte_dev_info.h
@@ -43,7 +43,9 @@  struct rte_eth_dev_module_info {
 #define RTE_ETH_MODULE_SFF_8472_LEN         512
 #define RTE_ETH_MODULE_SFF_8636             0x3
 #define RTE_ETH_MODULE_SFF_8636_LEN         256
+#define RTE_ETH_MODULE_SFF_8636_MAX_LEN     640
 #define RTE_ETH_MODULE_SFF_8436             0x4
 #define RTE_ETH_MODULE_SFF_8436_LEN         256
+#define RTE_ETH_MODULE_SFF_8436_MAX_LEN     640
 
 #endif /* _RTE_DEV_INFO_H_ */