diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index df47a5b..7426b9c 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -69,7 +69,7 @@ index d8a9722809..9f0fbfe40d 100644 matrix: COMPILER: gcc diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml -index fc75581486..6c37a1d244 100644 +index fc75581486..e75cb54d58 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -2,17 +2,23 @@ name: Build and Test @@ -228,7 +228,12 @@ index fc75581486..6c37a1d244 100644 - name: install libunbound libunwind python3-unbound # GitHub Actions doesn't have 32-bit versions of these libraries. if: matrix.m32 == '' -@@ -268,13 +336,13 @@ jobs: +@@ -264,17 +332,20 @@ jobs: + name: logs-linux-${{ join(matrix.*, '-') }} + path: logs.tgz + +- build-clang-analyze: ++ build-clang-analyze-cache: needs: build-dpdk env: dependencies: | @@ -239,22 +244,109 @@ index fc75581486..6c37a1d244 100644 CC: clang DPDK: dpdk CLANG_ANALYZE: true - name: clang-analyze +- name: clang-analyze - runs-on: ubuntu-22.04 ++ name: clang-analyze-cache ++ outputs: ++ key: ${{ steps.cache_key.outputs.key }} ++ outcome: ${{ steps.build_base.outcome }} + runs-on: ubuntu-24.04 timeout-minutes: 30 steps: -@@ -346,7 +414,7 @@ jobs: +@@ -344,35 +415,86 @@ jobs: + key: ${{ steps.cache_key.outputs.key }} + - name: set up python ++ if: steps.clang_cache.outputs.cache-hit != 'true' uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: ${{ env.python_default }} - name: get cached dpdk-dir ++ if: steps.clang_cache.outputs.cache-hit != 'true' uses: actions/cache/restore@v4 -@@ -399,7 +467,7 @@ jobs: + with: + path: dpdk-dir + key: ${{ needs.build-dpdk.outputs.dpdk_key }} + + - name: update APT cache ++ if: steps.clang_cache.outputs.cache-hit != 'true' + run: sudo apt update || true + + - name: install common dependencies ++ if: steps.clang_cache.outputs.cache-hit != 'true' + run: sudo apt install -y ${{ env.dependencies }} + + - name: prepare ++ if: steps.clang_cache.outputs.cache-hit != 'true' + run: ./.ci/linux-prepare.sh + + - name: build base reference ++ id: build_base + if: steps.clang_cache.outputs.cache-hit != 'true' ++ continue-on-error: true + run: ./.ci/linux-build.sh + +- - name: save cache +- uses: actions/cache/save@v4 +- if: steps.clang_cache.outputs.cache-hit != 'true' ++ build-clang-analyze: ++ needs: [build-dpdk, build-clang-analyze-cache] ++ if: > ++ needs.build-clang-analyze-cache.outputs.outcome == 'success' || ++ needs.build-clang-analyze-cache.outputs.outcome == 'skipped' ++ env: ++ dependencies: | ++ automake bc clang-tools libnuma-dev libunbound-dev libunwind-dev \ ++ libssl-dev libtool libxdp-dev llvm-dev ++ CC: clang ++ DPDK: dpdk ++ CLANG_ANALYZE: true ++ name: clang-analyze ++ runs-on: ubuntu-24.04 ++ timeout-minutes: 30 ++ ++ steps: ++ - name: checkout ++ uses: actions/checkout@v4 ++ ++ - name: update PATH ++ run: | ++ echo "$HOME/bin" >> $GITHUB_PATH ++ echo "$HOME/.local/bin" >> $GITHUB_PATH ++ ++ - name: check for analyzer result cache ++ uses: actions/cache/restore@v4 + with: + path: base-clang-analyzer-results +- key: ${{ steps.cache_key.outputs.key }} ++ key: ${{ needs.build-clang-analyze-cache.outputs.key }} ++ ++ - name: set up python ++ uses: actions/setup-python@v5 ++ with: ++ python-version: ${{ env.python_default }} ++ ++ - name: get cached dpdk-dir ++ uses: actions/cache/restore@v4 ++ with: ++ path: dpdk-dir ++ key: ${{ needs.build-dpdk.outputs.dpdk_key }} ++ ++ - name: update APT cache ++ run: sudo apt update || true ++ ++ - name: install common dependencies ++ run: sudo apt install -y ${{ env.dependencies }} ++ ++ - name: prepare ++ run: ./.ci/linux-prepare.sh + + - name: build + run: ./.ci/linux-build.sh +@@ -399,7 +521,7 @@ jobs: - name: set up python uses: actions/setup-python@v5 with: @@ -263,7 +355,7 @@ index fc75581486..6c37a1d244 100644 - name: install dependencies run: brew install automake libtool - name: prepare -@@ -421,7 +489,7 @@ jobs: +@@ -421,7 +543,7 @@ jobs: DPDK: ${{ matrix.dpdk }} name: linux deb ${{ matrix.dpdk }} dpdk @@ -2536,7 +2628,7 @@ index 8596741aa1..6e3091b939 100644 return af_inet_ifreq_ioctl(name, &ifr, SIOCSIFFLAGS, "SIOCSIFFLAGS"); diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index 45f61930d4..fd54f34692 100644 +index 45f61930d4..489a85f224 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -464,9 +464,8 @@ struct netdev_dpdk { @@ -2560,19 +2652,16 @@ index 45f61930d4..fd54f34692 100644 static bool is_dpdk_class(const struct netdev_class *class) { -@@ -1351,6 +1353,21 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) +@@ -1351,6 +1353,18 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) info.tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_TCP_CKSUM; } -+ if (!strcmp(info.driver_name, "net_ice") -+ || !strcmp(info.driver_name, "net_i40e") -+ || !strcmp(info.driver_name, "net_iavf") -+ || !strcmp(info.driver_name, "net_txgbe")) { ++ if (!strcmp(info.driver_name, "net_txgbe")) { + /* FIXME: Driver advertises the capability but doesn't seem + * to actually support it correctly. Can remove this once + * the driver is fixed on DPDK side. */ + VLOG_INFO("%s: disabled Tx outer udp checksum offloads for a " -+ "net/ice, net/i40e, net/iavf or net/txgbe port.", ++ "net/txgbe port.", + netdev_get_name(&dev->up)); + info.tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM; + info.tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO; @@ -2582,7 +2671,7 @@ index 45f61930d4..fd54f34692 100644 if (info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) { dev->hw_ol_features |= NETDEV_TX_IPV4_CKSUM_OFFLOAD; } else { -@@ -1514,7 +1531,6 @@ common_construct(struct netdev *netdev, dpdk_port_t port_no, +@@ -1514,7 +1528,6 @@ common_construct(struct netdev *netdev, dpdk_port_t port_no, dev->virtio_features_state = OVS_VIRTIO_F_CLEAN; dev->attached = false; dev->started = false; @@ -2590,7 +2679,7 @@ index 45f61930d4..fd54f34692 100644 ovsrcu_init(&dev->qos_conf, NULL); -@@ -2137,13 +2153,11 @@ netdev_dpdk_run(const struct netdev_class *netdev_class OVS_UNUSED) +@@ -2137,13 +2150,11 @@ netdev_dpdk_run(const struct netdev_class *netdev_class OVS_UNUSED) if (!pending_reset) { continue; } @@ -2604,7 +2693,7 @@ index 45f61930d4..fd54f34692 100644 netdev_request_reconfigure(&dev->up); VLOG_DBG_RL(&rl, "%s: Device reset requested.", netdev_get_name(&dev->up)); -@@ -2364,17 +2378,16 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args, +@@ -2364,17 +2375,16 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args, struct eth_addr mac; if (!dpdk_port_is_representor(dev)) { @@ -2630,7 +2719,7 @@ index 45f61930d4..fd54f34692 100644 } else if (!eth_addr_equals(dev->requested_hwaddr, mac)) { dev->requested_hwaddr = mac; netdev_request_reconfigure(netdev); -@@ -2567,73 +2580,133 @@ static bool +@@ -2567,73 +2577,133 @@ static bool netdev_dpdk_prep_hwol_packet(struct netdev_dpdk *dev, struct rte_mbuf *mbuf) { struct dp_packet *pkt = CONTAINER_OF(mbuf, struct dp_packet, mbuf); @@ -2814,7 +2903,7 @@ index 45f61930d4..fd54f34692 100644 return true; } -@@ -2664,6 +2737,35 @@ netdev_dpdk_prep_hwol_batch(struct netdev_dpdk *dev, struct rte_mbuf **pkts, +@@ -2664,6 +2734,35 @@ netdev_dpdk_prep_hwol_batch(struct netdev_dpdk *dev, struct rte_mbuf **pkts, return cnt; } @@ -2850,7 +2939,7 @@ index 45f61930d4..fd54f34692 100644 /* Tries to transmit 'pkts' to txq 'qid' of device 'dev'. Takes ownership of * 'pkts', even in case of failure. * -@@ -2680,6 +2782,8 @@ netdev_dpdk_eth_tx_burst(struct netdev_dpdk *dev, int qid, +@@ -2680,6 +2779,8 @@ netdev_dpdk_eth_tx_burst(struct netdev_dpdk *dev, int qid, VLOG_WARN_RL(&rl, "%s: Output batch contains invalid packets. " "Only %u/%u are valid: %s", netdev_get_name(&dev->up), nb_tx_prep, cnt, rte_strerror(rte_errno)); @@ -2859,7 +2948,7 @@ index 45f61930d4..fd54f34692 100644 } while (nb_tx != nb_tx_prep) { -@@ -4523,10 +4627,11 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, +@@ -4523,10 +4624,11 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, int argc, const char *argv[], void *aux OVS_UNUSED) { @@ -2874,7 +2963,7 @@ index 45f61930d4..fd54f34692 100644 if (argc == 2) { netdev = netdev_from_name(argv[1]); -@@ -4550,10 +4655,14 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, +@@ -4550,10 +4652,14 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, ovs_mutex_lock(&dev->mutex); ovs_mutex_lock(&dpdk_mp_mutex); @@ -2893,7 +2982,7 @@ index 45f61930d4..fd54f34692 100644 ovs_mutex_unlock(&dpdk_mp_mutex); ovs_mutex_unlock(&dev->mutex); -@@ -4565,7 +4674,11 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, +@@ -4565,7 +4671,11 @@ netdev_dpdk_get_mempool_info(struct unixctl_conn *conn, fclose(stream); @@ -2906,7 +2995,7 @@ index 45f61930d4..fd54f34692 100644 out: free(response); netdev_close(netdev); -@@ -5965,6 +6078,7 @@ static int +@@ -5965,6 +6075,7 @@ static int netdev_dpdk_reconfigure(struct netdev *netdev) { struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); @@ -2914,7 +3003,7 @@ index 45f61930d4..fd54f34692 100644 bool try_rx_steer; int err = 0; -@@ -5976,6 +6090,9 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -5976,6 +6087,9 @@ netdev_dpdk_reconfigure(struct netdev *netdev) dev->requested_n_rxq += 1; } @@ -2924,7 +3013,7 @@ index 45f61930d4..fd54f34692 100644 if (netdev->n_txq == dev->requested_n_txq && netdev->n_rxq == dev->requested_n_rxq && dev->rx_steer_flags == dev->requested_rx_steer_flags -@@ -5985,7 +6102,7 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -5985,7 +6099,7 @@ netdev_dpdk_reconfigure(struct netdev *netdev) && dev->txq_size == dev->requested_txq_size && eth_addr_equals(dev->hwaddr, dev->requested_hwaddr) && dev->socket_id == dev->requested_socket_id @@ -2933,7 +3022,7 @@ index 45f61930d4..fd54f34692 100644 /* Reconfiguration is unnecessary */ goto out; -@@ -5994,10 +6111,14 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -5994,10 +6108,14 @@ netdev_dpdk_reconfigure(struct netdev *netdev) retry: dpdk_rx_steer_unconfigure(dev); diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 273c2ae..93bb9ed 100644 --- a/SPECS/openvswitch3.3.spec +++ b/SPECS/openvswitch3.3.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.3.0 -Release: 21%{?dist} +Release: 22%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -769,6 +769,13 @@ exit 0 %endif %changelog +* Fri Dec 13 2024 Open vSwitch CI - 3.3.0-22 +- Merging upstream branch-3.3 [RH git: 1b08d44a8f] + Commit list: + 89bc5dbd60 github: Skip clang-analyze when reference generation fails. + 6278e92779 netdev-dpdk: Restore outer UDP checksum for Intel nics. + + * Wed Dec 11 2024 Open vSwitch CI - 3.3.0-21 - Merging upstream branch-3.3 [RH git: 9d4392d406] Commit list: