diff --git a/README.md b/README.md index 0de0e864..84d38d87 100644 --- a/README.md +++ b/README.md @@ -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= make diff --git a/configure.ac b/configure.ac index 4c0f20ce..634dd705 100644 --- a/configure.ac +++ b/configure.ac @@ -40,8 +40,6 @@ AC_TYPE_UINT16_T AC_CHECK_SIZEOF([int *]) -AX_TLS - ########################################################################## # Set correct platform library version ########################################################################## diff --git a/docs/ofp-user-guide.adoc b/docs/ofp-user-guide.adoc index fa4dbd91..db834206 100644 --- a/docs/ofp-user-guide.adoc +++ b/docs/ofp-user-guide.adoc @@ -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 diff --git a/m4/ax_tls.m4 b/m4/ax_tls.m4 deleted file mode 100644 index fed4951f..00000000 --- a/m4/ax_tls.m4 +++ /dev/null @@ -1,73 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_tls.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_TLS([action-if-found], [action-if-not-found]) -# -# DESCRIPTION -# -# Provides a test for the compiler support of thread local storage (TLS) -# extensions. Defines TLS if it is found. Currently knows about GCC/ICC -# and MSVC. I think SunPro uses the same as GCC, and Borland apparently -# supports either. -# -# LICENSE -# -# Copyright (c) 2008 Alan Woodland -# Copyright (c) 2010 Diego Elio Petteno` -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 11 - -AC_DEFUN([AX_TLS], [ - AC_MSG_CHECKING([for thread local storage (TLS) class]) - AC_CACHE_VAL([ac_cv_tls], - [for ax_tls_keyword in __thread '__declspec(thread)' none; do - AS_CASE([$ax_tls_keyword], - [none], [ac_cv_tls=none ; break], - [AC_TRY_COMPILE( - [#include - static void - foo(void) { - static ] $ax_tls_keyword [ int bar; - exit(1); - }], - [], - [ac_cv_tls=$ax_tls_keyword ; break], - ac_cv_tls=none - )]) - done - ]) - AC_MSG_RESULT([$ac_cv_tls]) - - AS_IF([test "$ac_cv_tls" != "none"], - [AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class define it to that here]) - m4_ifnblank([$1],[$1])]) -]) diff --git a/scripts/check-dpdk.sh b/scripts/check-dpdk.sh index 1e84a09d..a66b269c 100755 --- a/scripts/check-dpdk.sh +++ b/scripts/check-dpdk.sh @@ -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 make -j${JOBS} install popd @@ -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 diff --git a/scripts/check.sh b/scripts/check.sh index 2d46c146..00c93b3e 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -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 diff --git a/scripts/devbuild_ofp_odp_dpdk.sh b/scripts/devbuild_ofp_odp_dpdk.sh index 2a5e7141..ab631d2a 100755 --- a/scripts/devbuild_ofp_odp_dpdk.sh +++ b/scripts/devbuild_ofp_odp_dpdk.sh @@ -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 diff --git a/src/ofp_in_mcast.c b/src/ofp_in_mcast.c index 2622b9e3..aee9e12f 100644 --- a/src/ofp_in_mcast.c +++ b/src/ofp_in_mcast.c @@ -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. */ diff --git a/src/ofp_tcp_subr.c b/src/ofp_tcp_subr.c index bb919bb4..45caded7 100644 --- a/src/ofp_tcp_subr.c +++ b/src/ofp_tcp_subr.c @@ -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)) { diff --git a/src/ofp_timer.c b/src/ofp_timer.c index dbc5bc23..556b89fb 100644 --- a/src/ofp_timer.c +++ b/src/ofp_timer.c @@ -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. */ @@ -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, ¶m); - if (t != ODP_TIMER_SUCCESS) { + if (odp_timer_start(timer, ¶m) != ODP_TIMER_SUCCESS) { odp_timer_free(timer); odp_timeout_free(tmo); odp_buffer_free(buf); @@ -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; } diff --git a/src/ofp_uipc_socket.c b/src/ofp_uipc_socket.c index a2d3efa7..18754127 100644 --- a/src/ofp_uipc_socket.c +++ b/src/ofp_uipc_socket.c @@ -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);