Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to ODP API v1.45.1.0 #293

Merged
merged 10 commits into from
Oct 14, 2024
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Download and build OpenDataPlane (ODP) library:

git clone https://github.com/OpenDataPlane/odp
cd odp
git checkout v1.41.0.0
git checkout v1.45.1.0
./bootstrap
./configure --prefix=<INSTALL ODP TO THIS DIR>
make
Expand Down
2 changes: 0 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ AC_TYPE_UINT16_T

AC_CHECK_SIZEOF([int *])

AX_TLS

##########################################################################
# Set correct platform library version
##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion docs/ofp-user-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Download and install ODP:

git clone https://github.com/OpenDataPlane/odp
cd odp
git checkout v1.41.0.0
git checkout v1.45.1.0
./bootstrap
./configure --prefix=/usr/local
make install
Expand Down
73 changes: 0 additions & 73 deletions m4/ax_tls.m4

This file was deleted.

14 changes: 7 additions & 7 deletions scripts/check-dpdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ fi

cd $(readlink -e $(dirname $0))/..

# Configure hugepages
sysctl vm.nr_hugepages=1000
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge

# Build ODP
git clone https://github.com/OpenDataPlane/odp-dpdk --branch v1.41.0.0_DPDK_22.11 --depth 1
git clone https://github.com/OpenDataPlane/odp-dpdk --branch v1.45.1.0_DPDK_22.11 --depth 1
pushd odp-dpdk
./bootstrap
./configure --prefix=$(pwd)/install --without-tests --without-examples
./configure --prefix=$(pwd)/install --enable-dpdk-shared --without-tests --without-examples
JannePeltonen marked this conversation as resolved.
Show resolved Hide resolved
make -j${JOBS} install
popd

Expand All @@ -26,5 +21,10 @@ popd
./configure --with-odp-lib=odp-dpdk --with-odp=$(pwd)/odp-dpdk/install --prefix=$(pwd)/install --enable-cunit
make -j${JOBS} install

# Configure hugepages
sysctl vm.nr_hugepages=1000
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge

# Test OFP
make check
2 changes: 1 addition & 1 deletion scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
cd $(readlink -e $(dirname $0))/..

# Build ODP
git clone https://github.com/OpenDataPlane/odp --branch v1.41.0.0 --depth 1
git clone https://github.com/OpenDataPlane/odp --branch v1.45.1.0 --depth 1
pushd odp
./bootstrap
./configure --prefix=$(pwd)/install --without-tests --without-examples
Expand Down
2 changes: 1 addition & 1 deletion scripts/devbuild_ofp_odp_dpdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ popd
popd

# Build ODP
git clone https://github.com/OpenDataPlane/odp-dpdk --branch v1.41.0.0_DPDK_22.11 --depth 1
git clone https://github.com/OpenDataPlane/odp-dpdk --branch v1.45.1.0_DPDK_22.11 --depth 1
pushd odp-dpdk
./bootstrap
PKG_CONFIG_PATH=$(pwd)/../dpdk/install/lib64/pkgconfig:${PKG_CONFIG_PATH} ./configure --prefix=$(pwd)/install
Expand Down
3 changes: 2 additions & 1 deletion src/ofp_in_mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,9 +1088,10 @@ inm_merge(struct ofp_in_multi *inm, /*const*/ struct ofp_in_mfilter *imf)
/* Decrement ASM listener count on transition out of ASM mode. */
if (imf->imf_st[0] == OFP_MCAST_EXCLUDE && nsrc0 == 0) {
if ((imf->imf_st[1] != OFP_MCAST_EXCLUDE) ||
(imf->imf_st[1] == OFP_MCAST_EXCLUDE && nsrc1 > 0))
(imf->imf_st[1] == OFP_MCAST_EXCLUDE && nsrc1 > 0)) {
CTR1(KTR_IGMPV3, "%s: --asm on inm at t1", __func__);
--inm->inm_st[1].iss_asm;
}
}

/* Increment ASM listener count on transition to ASM mode. */
Expand Down
2 changes: 1 addition & 1 deletion src/ofp_tcp_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,7 @@ tcp_log_addr(struct in_conninfo *inc, struct ofp_tcphdr *th, void *ip4hdr,
if (s == NULL)
return (NULL);

strcat(s, "TCP: [");
strcpy(s, "TCP: [");
sp = s + strlen(s);

if (inc && ((inc->inc_flags & INC_ISIPV6) == 0)) {
Expand Down
6 changes: 2 additions & 4 deletions src/ofp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ odp_timer_t ofp_timer_start_cpu_id(uint64_t tmo_us, ofp_timer_callback callback,
uint64_t period_ns;
struct ofp_timer_internal *bufdata;
odp_buffer_t buf;
odp_timer_set_t t;
odp_timeout_t tmo;

/* Init shm if not done yet. */
Expand Down Expand Up @@ -432,9 +431,8 @@ odp_timer_t ofp_timer_start_cpu_id(uint64_t tmo_us, ofp_timer_callback callback,
param.tick_type = ODP_TIMER_TICK_ABS;
param.tick = tick;
param.tmo_ev = bufdata->t_ev;
t = odp_timer_start(timer, &param);

if (t != ODP_TIMER_SUCCESS) {
if (odp_timer_start(timer, &param) != ODP_TIMER_SUCCESS) {
odp_timer_free(timer);
odp_timeout_free(tmo);
odp_buffer_free(buf);
Expand Down Expand Up @@ -497,7 +495,7 @@ int ofp_timer_cancel(odp_timer_t tim)
return -1;
}

if (odp_timer_free(tim) != ODP_EVENT_INVALID) {
if (odp_timer_free(tim)) {
OFP_ERR("odp_timer_free failed");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ofp_uipc_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,7 @@ ofp_soreceive_generic(struct socket *so, struct ofp_sockaddr **psa, struct uio *
* We could receive some data while was notifying
* the protocol. Skip blocking in this case.
*/
if (so->so_rcv.sb_mb == NULL) {
if (ofp_sockbuf_get_first(&so->so_rcv) == ODP_PACKET_INVALID) {
error = ofp_sbwait(&so->so_rcv);
if (error) {
SOCKBUF_UNLOCK(&so->so_rcv);
Expand Down
Loading