Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-pipeline-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,24 +315,24 @@ jobs:
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log

Run_dpdk-22_11:
Run_dpdk-23_11:
if: ${{ github.repository == 'OpenDataPlane/odp' }}
runs-on: ah-ubuntu_22_04-c7g_2x-50
steps:
- uses: OpenDataPlane/action-clean-up@main
- uses: actions/checkout@v6
- run: sudo docker run -i -v `pwd`:/odp --privileged --shm-size 8g -e CC="${CC}" -e ARCH="${ARCH}"
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-graviton3-dpdk_22.11 /odp/scripts/ci/check.sh
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-graviton3-dpdk_23.11 /odp/scripts/ci/check.sh
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log

Run_dpdk-24_11:
Run_dpdk-25_11:
if: ${{ github.repository == 'OpenDataPlane/odp' }}
runs-on: ah-ubuntu_22_04-c7g_2x-50
steps:
- uses: OpenDataPlane/action-clean-up@main
- uses: actions/checkout@v6
- run: sudo docker run -i -v `pwd`:/odp --privileged --shm-size 8g -e CC="${CC}" -e ARCH="${ARCH}"
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-graviton3-dpdk_24.11 /odp/scripts/ci/check.sh
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-graviton3-dpdk_25.11 /odp/scripts/ci/check.sh
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log
8 changes: 4 additions & 4 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,21 +390,21 @@ jobs:
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log

Run_dpdk-22_11:
Run_dpdk-23_11:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- run: sudo docker run -i -v `pwd`:/odp --privileged --shm-size 8g -e CC="${CC}" -e ARCH="${ARCH}"
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-dpdk_22.11 /odp/scripts/ci/check.sh
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-dpdk_23.11 /odp/scripts/ci/check.sh
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log

Run_dpdk-24_11:
Run_dpdk-25_11:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- run: sudo docker run -i -v `pwd`:/odp --privileged --shm-size 8g -e CC="${CC}" -e ARCH="${ARCH}"
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-dpdk_24.11 /odp/scripts/ci/check.sh
-e CONF="${CONF}" $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-dpdk_25.11 /odp/scripts/ci/check.sh
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log

Expand Down
6 changes: 3 additions & 3 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ Prerequisites for building the OpenDataPlane (ODP) API

3.5 DPDK packet I/O support (optional)

Use DPDK for ODP packet I/O. Currently supported DPDK versions are v22.11,
v23.11 (recommended), and v24.11.
Use DPDK for ODP packet I/O. Currently supported DPDK versions are v23.11,
v24.11 (recommended), and v25.11.

Note: only packet I/O is accelerated with DPDK. See
https://github.com/OpenDataPlane/odp-dpdk.git
Expand All @@ -172,7 +172,7 @@ Prerequisites for building the OpenDataPlane (ODP) API
Minimal instructions for building DPDK library. For more instructions refer
to https://dpdk.org/doc/guides/linux_gsg/build_dpdk.html.

$ git clone https://dpdk.org/git/dpdk-stable --branch <version, e.g. 22.11> --depth 1 ./<dpdk-dir>
$ git clone https://dpdk.org/git/dpdk-stable --branch <version, e.g. 24.11> --depth 1 ./<dpdk-dir>

# Prepare the build directory
$ cd <dpdk-dir>
Expand Down
5 changes: 4 additions & 1 deletion platform/linux-generic/m4/odp_dpdk.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
##########################################################################
# Enable DPDK support
##########################################################################
pktio_dpdk_min_version=22.11.0
pktio_dpdk_min_version=23.11.0
pktio_dpdk_support=no

AC_ARG_ENABLE([dpdk],
Expand Down Expand Up @@ -47,6 +47,9 @@ then
ODP_DPDK([$pktio_dpdk_min_version], [$dpdk_shared], [],
[AC_MSG_FAILURE([can't find DPDK])])

# Enable experimental DPDK APIs
DPDK_CFLAGS="${DPDK_CFLAGS} -DALLOW_EXPERIMENTAL_API"

ODP_CHECK_CFLAG([-Wno-error=cast-align])
AC_DEFINE([_ODP_PKTIO_DPDK], [1],
[Define to 1 to enable DPDK packet I/O support])
Expand Down
32 changes: 31 additions & 1 deletion platform/linux-generic/pktio/dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1786,12 +1786,13 @@ static int dpdk_init_capability(pktio_entry_t *pktio_entry,
capa->stats.pktio.counter.out_packets = 1;
capa->stats.pktio.counter.out_errors = 1;

#if RTE_VERSION < RTE_VERSION_NUM(25, 11, 0, 0)
capa->stats.pktin_queue.counter.octets = 1;
capa->stats.pktin_queue.counter.packets = 1;
capa->stats.pktin_queue.counter.errors = 1;

capa->stats.pktout_queue.counter.octets = 1;
capa->stats.pktout_queue.counter.packets = 1;
#endif

return 0;
}
Expand Down Expand Up @@ -1992,6 +1993,7 @@ static int dpdk_setup_eth_tx(pktio_entry_t *pktio_entry,
}
}

#if RTE_VERSION < RTE_VERSION_NUM(25, 11, 0, 0)
/* Set per queue statistics mappings. Not supported by all PMDs, so
* ignore the return value. */
for (i = 0; i < pktio_entry->num_out_queue && i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
Expand All @@ -2002,6 +2004,7 @@ static int dpdk_setup_eth_tx(pktio_entry_t *pktio_entry,
}
}
_ODP_DBG("Mapped %" PRIu32 "/%d TX counters\n", i, RTE_ETHDEV_QUEUE_STAT_CNTRS);
#endif

return 0;
}
Expand Down Expand Up @@ -2030,6 +2033,7 @@ static int dpdk_setup_eth_rx(const pktio_entry_t *pktio_entry,
}
}

#if RTE_VERSION < RTE_VERSION_NUM(25, 11, 0, 0)
/* Set per queue statistics mappings. Not supported by all PMDs, so
* ignore the return value. */
for (i = 0; i < pktio_entry->num_in_queue && i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
Expand All @@ -2040,6 +2044,7 @@ static int dpdk_setup_eth_rx(const pktio_entry_t *pktio_entry,
}
}
_ODP_DBG("Mapped %" PRIu32 "/%d RX counters\n", i, RTE_ETHDEV_QUEUE_STAT_CNTRS);
#endif

return 0;
}
Expand Down Expand Up @@ -2381,7 +2386,14 @@ static int dpdk_link_info(pktio_entry_t *pktio_entry, odp_pktio_link_info_t *inf
else
info->status = ODP_PKTIO_LINK_STATUS_DOWN;

#if RTE_VERSION >= RTE_VERSION_NUM(25, 11, 0, 0)
if (link.link_connector == RTE_ETH_LINK_CONNECTOR_NONE)
info->media = "unknown";
else
info->media = rte_eth_link_connector_to_str(link.link_connector);
#else
info->media = "unknown";
#endif

return 0;
}
Expand Down Expand Up @@ -2498,6 +2510,7 @@ static int dpdk_extra_stat_counter(pktio_entry_t *pktio_entry, uint32_t id,
return 0;
}

#if RTE_VERSION < RTE_VERSION_NUM(25, 11, 0, 0)
static int dpdk_pktin_stats(pktio_entry_t *pktio_entry, uint32_t index,
odp_pktin_queue_stats_t *pktin_stats)
{
Expand All @@ -2523,7 +2536,16 @@ static int dpdk_pktin_stats(pktio_entry_t *pktio_entry, uint32_t index,

return 0;
}
#else
static int dpdk_pktin_stats(pktio_entry_t *pktio_entry ODP_UNUSED, uint32_t index ODP_UNUSED,
odp_pktin_queue_stats_t *pktin_stats)
{
memset(pktin_stats, 0, sizeof(*pktin_stats));
return 0;
}
#endif

#if RTE_VERSION < RTE_VERSION_NUM(25, 11, 0, 0)
static int dpdk_pktout_stats(pktio_entry_t *pktio_entry, uint32_t index,
odp_pktout_queue_stats_t *pktout_stats)
{
Expand All @@ -2548,6 +2570,14 @@ static int dpdk_pktout_stats(pktio_entry_t *pktio_entry, uint32_t index,

return 0;
}
#else
static int dpdk_pktout_stats(pktio_entry_t *pktio_entry ODP_UNUSED, uint32_t index ODP_UNUSED,
odp_pktout_queue_stats_t *pktout_stats)
{
memset(pktout_stats, 0, sizeof(*pktout_stats));
return 0;
}
#endif

const pktio_if_ops_t _odp_dpdk_pktio_ops = {
.name = "dpdk",
Expand Down