[PATCH 3/4] app/testpmd: decode module EEPROM with transceiver library
Roman Khromenok
roma55592 at yandex.ru
Thu Oct 29 19:15:10 CET 2026
Call rte_transceiver_decode() directly instead of the ethdev
wrapper rte_eth_module_eeprom_parse(), which is going to be removed.
The module type reported by ethdev has the same values as the
transceiver library ones.
Signed-off-by: Roman Khromenok <roma55592 at yandex.ru>
---
app/test-pmd/config.c | 3 ++-
app/test-pmd/meson.build | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ec348cf854..559c823a65 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -55,6 +55,7 @@
#include <rte_gro.h>
#endif
#include <rte_hexdump.h>
+#include <rte_transceiver.h>
#include "testpmd.h"
#include "cmdline_mtr.h"
@@ -1244,7 +1245,7 @@ port_module_eeprom_decode_display(portid_t port_id)
printf("Port %u module EEPROM (type 0x%x, %u bytes):\n",
port_id, minfo.type, einfo.length);
- ret = rte_eth_module_eeprom_parse(minfo.type, einfo.data, einfo.length,
+ ret = rte_transceiver_decode(minfo.type, einfo.data, einfo.length,
port_module_eeprom_field_print, NULL);
if (ret == -ENOTSUP)
fprintf(stderr, "Unsupported module type: 0x%x\n", minfo.type);
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 83163a5406..3b726164c2 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -34,7 +34,7 @@ if dpdk_conf.has('RTE_HAS_JANSSON')
ext_deps += jansson_dep
endif
-deps += ['ethdev', 'cmdline', 'pci']
+deps += ['ethdev', 'cmdline', 'pci', 'transceiver']
if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')
deps += 'crypto_scheduler'
endif
--
2.47.3
More information about the dev
mailing list