Skip to content

Commit

Permalink
ovs: Bump submodule to latest OVS branch-3.3.
Browse files Browse the repository at this point in the history
This picks up the following relevant OVS commits:
  8893e24d9d dpdk: Update to use v23.11.
  ed738eca39 util: Annotate function that will never return NULL.
  77d0bad04 mcast-snooping: Store IGMP/MLD protocol version.
  b222593bc6 mcast-snooping: Add group protocol to mdb/show output.
  a940a691e7 ovs-atomic: Fix inclusion of Clang header by GCC 14.
  b0cf73112d dp-packet: Reset offload/offsets when clearing a packet.

This commit also ports the CI DPDK related changes from OVS commit
8893e24d9d09 ("dpdk: Update to use v23.11.") which are required as 23.11
is the supported DPDK branch on OVS 3.3.  There's also a small change
that had to be made when mangling the prefix path of the installed
DPDK version in the container.

As a side effect this will also address OVN Fedora 40 (rawhide) build
failures on aarch64 and s390x.  They are fixed by a940a691e7d9
("ovs-atomic: Fix inclusion of Clang header by GCC 14.").

The change in pinctrl.c is needed because b222593bc6 ("mcast-snooping:
Add group protocol to mdb/show output") changed the OVS mcast library
API in a non backwards-compatible way.

Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Acked-by: Numan Siddique<numans@ovn.org>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Mohammad Heib <mheib@redhat.com>
  • Loading branch information
dceara committed Jan 30, 2024
1 parent deed68a commit dc34b4d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
28 changes: 18 additions & 10 deletions .ci/dpdk-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ set -x

function build_dpdk()
{
local VERSION_FILE="dpdk-dir/cached-version"
local DPDK_VER=$1
local DPDK_OPTS=""
local DPDK_INSTALL_DIR="$(pwd)/dpdk-dir"
local VERSION_FILE="$DPDK_INSTALL_DIR/cached-version"

rm -rf dpdk-dir
rm -rf dpdk-src
rm -rf $DPDK_INSTALL_DIR

if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
git clone --single-branch $DPDK_GIT dpdk-dir -b "${DPDK_VER##refs/*/}"
pushd dpdk-dir
git clone --single-branch $DPDK_GIT dpdk-src -b "${DPDK_VER##refs/*/}"
pushd dpdk-src
git log -1 --oneline
else
wget https://fast.dpdk.org/rel/dpdk-$1.tar.xz
tar xvf dpdk-$1.tar.xz > /dev/null
DIR_NAME=$(tar -tf dpdk-$1.tar.xz | head -1 | cut -f1 -d"/")
mv ${DIR_NAME} dpdk-dir
pushd dpdk-dir
mv ${DIR_NAME} dpdk-src
pushd dpdk-src
fi

# Switching to 'default' machine to make dpdk-dir cache usable on
# Switching to 'default' machine to make the dpdk cache usable on
# different CPUs. We can't be sure that all CI machines are exactly same.
DPDK_OPTS="$DPDK_OPTS -Dmachine=default"

Expand All @@ -38,16 +40,22 @@ function build_dpdk()
# only depend on virtio/tap drivers.
# We can disable all remaining drivers to save compilation time.
DPDK_OPTS="$DPDK_OPTS -Denable_drivers=net/null,net/tap,net/virtio"
# OVS depends on the vhost library (and its dependencies).
# net/tap depends on the gso library.
DPDK_OPTS="$DPDK_OPTS -Denable_libs=cryptodev,dmadev,gso,vhost"

# Install DPDK using prefix.
DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
DPDK_OPTS="$DPDK_OPTS --prefix=$DPDK_INSTALL_DIR"

meson $DPDK_OPTS build
ninja -C build
ninja -C build install

echo "Installed DPDK in $(pwd)"
popd

# Remove examples sources.
rm -rf $DPDK_INSTALL_DIR/share/dpdk/examples

echo "Installed DPDK in $DPDK_INSTALL_DIR"
echo "${DPDK_VER}" > ${VERSION_FILE}
}

Expand Down
11 changes: 6 additions & 5 deletions .ci/linux-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ RECHECK=${RECHECK:-"no"}

function install_dpdk()
{
local VERSION_FILE="dpdk-dir/cached-version"
local DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
local DPDK_INSTALL_DIR="$(pwd)/dpdk-dir"
local VERSION_FILE="${DPDK_INSTALL_DIR}/cached-version"
local DPDK_LIB=${DPDK_INSTALL_DIR}/lib/x86_64-linux-gnu

# Export the following path for pkg-config to find the .pc file.
export PKG_CONFIG_PATH=$DPDK_LIB/pkgconfig/:$PKG_CONFIG_PATH

if [ ! -f "${VERSION_FILE}" ]; then
echo "Could not find DPDK in $(pwd)/dpdk-dir"
echo "Could not find DPDK in $DPDK_INSTALL_DIR"
return 1
fi

# As we build inside a container we need to update the prefix.
sed -i -E "s|^prefix=.*|prefix=$(pwd)/dpdk-dir/build|" \
sed -i -E "s|^prefix=.*|prefix=${DPDK_INSTALL_DIR}|" \
"$DPDK_LIB/pkgconfig/libdpdk-libs.pc"

# Update the library paths.
sudo ldconfig
echo "Found cached DPDK $(cat ${VERSION_FILE}) build in $(pwd)/dpdk-dir"
echo "Found cached DPDK $(cat ${VERSION_FILE}) build in $DPDK_INSTALL_DIR"
}

function configure_ovs()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
env:
dependencies: gcc libnuma-dev ninja-build
CC: gcc
DPDK_GIT: https://dpdk.org/git/dpdk-stable
DPDK_VER: 22.11.1
DPDK_GIT: https://dpdk.org/git/dpdk
DPDK_VER: 23.11
name: dpdk gcc
outputs:
dpdk_key: ${{ steps.gen_dpdk_key.outputs.key }}
Expand Down
6 changes: 5 additions & 1 deletion controller/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5473,10 +5473,14 @@ pinctrl_ip_mcast_handle_igmp(struct rconn *swconn,
ovs_rwlock_wrlock(&ip_ms->ms->rwlock);
switch (ntohs(ip_flow->tp_src)) {
case IGMP_HOST_MEMBERSHIP_REPORT:
group_change =
mcast_snooping_add_group4(ip_ms->ms, ip4, IP_MCAST_VLAN,
port_key_data, MCAST_GROUP_IGMPV1);
break;
case IGMPV2_HOST_MEMBERSHIP_REPORT:
group_change =
mcast_snooping_add_group4(ip_ms->ms, ip4, IP_MCAST_VLAN,
port_key_data);
port_key_data, MCAST_GROUP_IGMPV2);
break;
case IGMP_HOST_LEAVE_MESSAGE:
group_change =
Expand Down
2 changes: 1 addition & 1 deletion ovs
Submodule ovs updated 113 files

0 comments on commit dc34b4d

Please sign in to comment.