void cmd_read_reg(uint8_t port_id, unsigned int id)
{
-#if RTE_VERSION < RTE_VERSION_NUM(21,11,0,0)
unsigned int val, rc;
if (!port_is_active(port_id)) {
return ;
else {
plog_info("Register 0x%08X : %08X \n", id, val);
}
-#else
- plog_err("cmd_read_reg(%d, %d) not supported on this dpdk version\n", port_id, id);
-#endif
}
void cmd_reset_port(uint8_t portid)
void cmd_write_reg(uint8_t port_id, unsigned int id, unsigned int val)
{
-#if RTE_VERSION < RTE_VERSION_NUM(21,11,0,0)
if (!port_is_active(port_id)) {
return ;
}
plog_info("writing 0x%08X %08X\n", id, val);
write_reg(port_id, id, val);
-#else
- plog_err("cmd_write_reg(%d, %d, %d) not supported on this dpdk version\n", port_id, id, val);
-#endif
}
void cmd_set_vlan_offload(uint8_t port_id, unsigned int val)
endif
if get_option('hw_direct_stats').enabled()
-if dpdk_version.version_compare('<21.11.0')
add_project_arguments('-DPROX_HW_DIRECT_STATS', language: 'c')
-else
- warning('hw_direct_stats not supported on this dpdk version')
-endif
endif
if get_option('dbg')
'stats_cons_cli.c', 'stats_parser.c', 'hash_set.c', 'prox_lua.c',
'prox_malloc.c', 'prox_ipv6.c', 'prox_compat.c', 'handle_nsh.c')
-if dpdk_version.version_compare('<21.11.0')
sources += files('rw_reg.c')
-endif
# Include a couple of source files depending on DPDK support
if cc.find_library('rte_pmd_aesni', required: false).found()
// limitations under the License.
*/
+#include <rte_version.h>
+#if RTE_VERSION >= RTE_VERSION_NUM(21,11,0,0)
+#include <ethdev_driver.h> // Please configure DPDK with meson option -Denable_driver_sdk=true
+#endif
#include <rte_ethdev.h>
#include "rw_reg.h"
#include <stdio.h>
#include <rte_version.h>
+#if RTE_VERSION >= RTE_VERSION_NUM(21,11,0,0)
+#include <ethdev_driver.h> // Please configure DPDK with meson option -Denable_driver_sdk=true
+#endif
#include <rte_ethdev.h>
#include <rte_cycles.h>
#include <rte_byteorder.h>