Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package google-guest-configs for 
openSUSE:Factory checked in at 2026-09-21 12:13:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-guest-configs (Old)
 and      /work/SRC/openSUSE:Factory/.google-guest-configs.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "google-guest-configs"

Mon Sep 21 12:13:20 2026 rev:45 rq:1379220 version:20260918.01

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/google-guest-configs/google-guest-configs.changes    
    2026-08-05 17:48:56.046958375 +0200
+++ 
/work/SRC/openSUSE:Factory/.google-guest-configs.new.383539/google-guest-configs.changes
    2026-09-21 12:13:54.075919939 +0200
@@ -1,0 +2,20 @@
+Sat Sep 19 09:01:14 UTC 2026 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- Update to version 20260918.01
+  * Update SR-IOV udev rule for idpf network devices.
+- from version 20260916.00
+  * nic-naming: Fix IDPF VF device rename
+- from version 20260915.00
+  * Remove build.sh file
+- from version 20260914.00
+  * set_multiqueue: stop setting XPS at all on a4x/a5x
+- from version 20260911.00
+  * No public description
+- from version 20260910.00
+  * set_multiqueue: fix awk parsing for idpf ring len
+- from version 20260819.00
+  * set_multiqueue: Set IDPF ring length to 4096 by default
+- from version 20260804.00
+  * nic-naming: improve handling of BM IRDMA devices
+
+-------------------------------------------------------------------

Old:
----
  google-guest-configs-20260729.00.tar.gz

New:
----
  google-guest-configs-20260918.01.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ google-guest-configs.spec ++++++
--- /var/tmp/diff_new_pack.e8POjd/_old  2026-09-21 12:13:54.901954466 +0200
+++ /var/tmp/diff_new_pack.e8POjd/_new  2026-09-21 12:13:54.904954592 +0200
@@ -23,7 +23,7 @@
 %define _udevdir %(pkg-config --variable udev_dir udev)
 %endif
 Name:           google-guest-configs
-Version:        20260729.00
+Version:        20260918.01
 Release:        0
 Summary:        Google Cloud Guest Configs
 License:        Apache-2.0

++++++ google-guest-configs-20260729.00.tar.gz -> 
google-guest-configs-20260918.01.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-configs-20260729.00/snap/hooks/configure 
new/guest-configs-20260918.01/snap/hooks/configure
--- old/guest-configs-20260729.00/snap/hooks/configure  1970-01-01 
01:00:00.000000000 +0100
+++ new/guest-configs-20260918.01/snap/hooks/configure  2026-09-18 
20:07:29.000000000 +0200
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -e
+
+echo "basic-snap-test: running configure hook..."
+
+STATE_DIR="${SNAP_DATA:-/tmp}"
+mkdir -p "${STATE_DIR}"
+echo "basic-snap-test configured at $(date)" >> "${STATE_DIR}/install.log"
+
+echo "basic-snap-test: configure hook completed successfully."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-configs-20260729.00/snap/hooks/install 
new/guest-configs-20260918.01/snap/hooks/install
--- old/guest-configs-20260729.00/snap/hooks/install    1970-01-01 
01:00:00.000000000 +0100
+++ new/guest-configs-20260918.01/snap/hooks/install    2026-09-18 
20:07:29.000000000 +0200
@@ -0,0 +1,64 @@
+#!/bin/bash
+set -e
+
+# Copies files from basic-snap-test:src/ into `/`
+# and enables any necessary systemd units
+
+CONFIGS="${SNAP}/src"
+STATE_DIR="${SNAP_DATA:-/tmp}"
+ENABLED_UNITS="${STATE_DIR}/enabled-units"
+LOGFILE="${STATE_DIR}/install.log"
+
+mkdir --parents "${STATE_DIR}"
+echo "basic-snap-test installed at $(date)" > "${LOGFILE}"
+
+copy_config_files() {
+  if [[ ! -d "${CONFIGS}" ]]; then
+    echo "No files found in ${CONFIGS}" >&2
+    return 0
+  fi
+
+  local tar_opts=("-xpf" "-")
+  if tar --help 2>/dev/null | grep -q -- '--same-owner'; then
+    tar_opts+=("--same-owner")
+  fi
+  if tar --help 2>/dev/null | grep -q -- '--keep-directory-symlink'; then
+    tar_opts+=("--keep-directory-symlink")
+  fi
+
+  tar -C "${CONFIGS}" -cpf - . | tar -C / "${tar_opts[@]}"
+}
+
+enable_systemd_units() {
+  : > "${ENABLED_UNITS}"
+
+  if [[ ! -d "${CONFIGS}" ]]; then
+    return 0
+  fi
+
+  systemctl daemon-reload
+
+  # Collect (unique) unit files' names and pipe into the array `units`
+  pushd "${CONFIGS}" >/dev/null
+  mapfile -d '' units < <(
+    find . -type f \( -name '*.service' -o -name '*.timer' -o -name '*.path' 
\) \
+      -printf '%f\0' 2>/dev/null | sort -zu || true
+  )
+  popd >/dev/null
+
+  for unit in "${units[@]-}"; do
+    [[ -z "${unit:-}" ]] && continue
+    if systemctl list-unit-files -- "${unit}" >/dev/null 2>&1; then
+      if systemctl enable --now -- "${unit}" >>"${LOGFILE}" 2>&1; then
+        echo "${unit}" >> "${ENABLED_UNITS}"
+      else
+        echo "WARNING! Failed to enable ${unit}..." >>"${LOGFILE}"
+      fi
+    fi
+  done
+}
+
+copy_config_files
+enable_systemd_units
+
+echo "basic-snap-test: install hook completed successfully." >> "${LOGFILE}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-configs-20260729.00/snap/hooks/post-refresh 
new/guest-configs-20260918.01/snap/hooks/post-refresh
--- old/guest-configs-20260729.00/snap/hooks/post-refresh       1970-01-01 
01:00:00.000000000 +0100
+++ new/guest-configs-20260918.01/snap/hooks/post-refresh       2026-09-18 
20:07:29.000000000 +0200
@@ -0,0 +1,63 @@
+#!/bin/bash
+set -e
+
+# Recopy all the config files and re-enable
+# the systemd units after a `snap refresh`
+
+CONFIGS="${SNAP}/src"
+STATE_DIR="${SNAP_DATA:-/tmp}"
+ENABLED_UNITS="${STATE_DIR}/enabled-units"
+LOGFILE="${STATE_DIR}/post-refresh.log"
+
+mkdir --parents "${STATE_DIR}"
+echo "basic-snap-test refreshed at $(date)" > "${LOGFILE}"
+
+recopy_config_files() {
+  if [[ ! -d "${CONFIGS}" ]]; then
+    return 0
+  fi
+
+  local tar_opts=("-xpf" "-")
+  if tar --help 2>/dev/null | grep -q -- '--same-owner'; then
+    tar_opts+=("--same-owner")
+  fi
+  if tar --help 2>/dev/null | grep -q -- '--keep-directory-symlink'; then
+    tar_opts+=("--keep-directory-symlink")
+  fi
+
+  tar -C "${CONFIGS}" -cpf - . | tar -C / "${tar_opts[@]}"
+}
+
+refresh_systemd_units() {
+  : > "${ENABLED_UNITS}"
+
+  if [[ ! -d "${CONFIGS}" ]]; then
+    return 0
+  fi
+
+  systemctl daemon-reload
+
+  # Collect the (unique) unit files' names and pipe into the array `units`
+  pushd "${CONFIGS}" >/dev/null
+  mapfile -d '' units < <(
+    find . -type f \( -name '*.service' -o -name '*.timer' -o -name '*.path' 
\) \
+      -printf '%f\0' 2>/dev/null | sort -zu || true
+  )
+  popd >/dev/null
+
+  for unit in "${units[@]-}"; do
+    [[ -z "${unit:-}" ]] && continue
+    if systemctl list-unit-files -- "${unit}" >/dev/null 2>&1; then
+      if systemctl enable --now -- "${unit}" >>"${LOGFILE}" 2>&1; then
+        echo "${unit}" >> "${ENABLED_UNITS}"
+      else
+        echo "WARNING! Failed to enable ${unit}..." >>"${LOGFILE}"
+      fi
+    fi
+  done
+}
+
+recopy_config_files
+refresh_systemd_units
+
+echo "basic-snap-test: post-refresh hook completed successfully." >> 
"${LOGFILE}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-configs-20260729.00/snap/hooks/remove 
new/guest-configs-20260918.01/snap/hooks/remove
--- old/guest-configs-20260729.00/snap/hooks/remove     1970-01-01 
01:00:00.000000000 +0100
+++ new/guest-configs-20260918.01/snap/hooks/remove     2026-09-18 
20:07:29.000000000 +0200
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -e
+
+# Disable and clean up any systemd units that were enabled during installation
+
+STATE="${SNAP_DATA:-/tmp}/enabled-units"
+
+if [[ -f "${STATE}" ]]; then
+  while IFS= read -r unit; do
+    [[ -z "${unit:-}" ]] && continue
+    systemctl disable --now "${unit}" 2>/dev/null || true
+  done < "${STATE}"
+  rm -f "${STATE}"
+fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-configs-20260729.00/snap/snapcraft.yaml 
new/guest-configs-20260918.01/snap/snapcraft.yaml
--- old/guest-configs-20260729.00/snap/snapcraft.yaml   1970-01-01 
01:00:00.000000000 +0100
+++ new/guest-configs-20260918.01/snap/snapcraft.yaml   2026-09-18 
20:07:29.000000000 +0200
@@ -0,0 +1,23 @@
+name: basic-snap-test
+version: '0.1'
+summary: Basic test snap for Kokoro and Cloud Build CI
+description: Test snap package to validate automated build, GCS staging, and 
Daisy image baking.
+confinement: classic
+grade: devel
+base: core24
+
+platforms:
+  amd64:
+    build-on: [amd64]
+    build-for: [amd64]
+
+apps:
+  basic-snap-test:
+    command: src/usr/bin/google_set_hostname
+
+parts:
+  guest-configs:
+    plugin: dump
+    source: .
+    stage:
+      - src/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/guest-configs-20260729.00/src/lib/udev/rules.d/75-gce-network.rules 
new/guest-configs-20260918.01/src/lib/udev/rules.d/75-gce-network.rules
--- old/guest-configs-20260729.00/src/lib/udev/rules.d/75-gce-network.rules     
2026-07-29 18:33:03.000000000 +0200
+++ new/guest-configs-20260918.01/src/lib/udev/rules.d/75-gce-network.rules     
2026-09-18 20:07:29.000000000 +0200
@@ -14,10 +14,8 @@
 # Must import here to make ID_NET_NAME_PATH available to program
 IMPORT{builtin}="net_id"
 
-SUBSYSTEM=="pci", ENV{PCI_ID}=="8086:1452", TAG+="enable_sriov"
-
-# Enable max number of VFs for all 'enable_sriov' tagged devices.
-TAG=="enable_sriov", TEST=="sriov_numvfs", 
ATTR{sriov_numvfs}="$attr{sriov_totalvfs}"
+# Enable max number of VFs for Intel IDPF PF (8086:1452) FIRST
+SUBSYSTEM=="net", ACTION=="add", DRIVERS=="idpf", ATTRS{vendor}=="0x8086", 
ATTRS{device}=="0x1452", ATTR{device/sriov_numvfs}=="0", 
ATTR{device/sriov_numvfs}="$attr{device/sriov_totalvfs}"
 
 # Rule to rename Mellanox devices
 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="mlx5_core", 
PROGRAM="/usr/bin/gce-nic-naming", NAME="%c"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-configs-20260729.00/src/usr/bin/gce-nic-naming 
new/guest-configs-20260918.01/src/usr/bin/gce-nic-naming
--- old/guest-configs-20260729.00/src/usr/bin/gce-nic-naming    2026-07-29 
18:33:03.000000000 +0200
+++ new/guest-configs-20260918.01/src/usr/bin/gce-nic-naming    2026-09-18 
20:07:29.000000000 +0200
@@ -45,6 +45,7 @@
 
 # Array of devices by with vendor info
 declare -a ethernet_devices
+declare -a irdma_devices
 declare -a gpu_nic_devices
 declare -a accelerator_devices
 
@@ -142,18 +143,19 @@
 #     relevant to intent based naming
 #   GPU_DEVICES_VENDORS: Array of gpu device vendors relevant to intent based
 #     naming
+#   IRDMA_DEVICES_VENDORS: Array of irdma device vendors relevant to intent
+#     based naming
+#   RDMA_TEST_FOLDER: Folder name to test for RDMA devices
 #   ethernet_devices: Array of ethernet devices
 #   gpu_nic_devices: Array of gpu nic devices
 #   accelerator_devices: Array of processor devices
-# Arguments:
-#   $1: Name reference to the array of ethernet devices
-#   $2: Name reference to the array of processor devices
-#   $@: Paths to search for devices
 ###############################
 function list_devices() {
   local -n ethernet_map="$1"
-  local -n gpu_nic_map="$2"
-  local -n accelerator_map="$3"
+  local -n irdma_map="$2"
+  local -n gpu_nic_map="$3"
+  local -n accelerator_map="$4"
+  shift
   shift
   shift
   shift
@@ -162,6 +164,8 @@
   info "Generating for paths: ${paths[*]}"
   unset IFS
 
+  local rdma_folder="${RDMA_TEST_FOLDER:-infiniband}"
+
   # Walks the pci device bus and looks for any relevant devices
   for pci_device in ${paths}; do
     # Example: 0000:00:04.0
@@ -174,7 +178,9 @@
     vendor="${vendor#0x}"
     device="${device#0x}"
     device_id="${vendor}:${device}"
-    if [[ " ${ETHERNET_DEVICES_VENDORS[*]} " =~ 
[[:space:]]${device_id}[[:space:]] ]]; then
+    if [[ " ${IRDMA_DEVICES_VENDORS[*]} " =~ 
[[:space:]]${device_id}[[:space:]] ]] && [[ -d "${pci_device}/${rdma_folder}" 
]]; then
+      irdma_map[${int_id}]=${device_id}
+    elif [[ " ${ETHERNET_DEVICES_VENDORS[*]} " =~ 
[[:space:]]${device_id}[[:space:]] ]]; then
       ethernet_map[${int_id}]=${device_id}
     fi
     if [[ " ${GPU_NIC_DEVICES_VENDORS[*]} " =~ 
[[:space:]]${device_id}[[:space:]] ]]; then
@@ -194,6 +200,8 @@
   done
   debug $(printf "Generated ethernet_devices_map: %s %s" "${!ethernet_map[*]}" 
\
     "${ethernet_map[*]}")
+  debug $(printf "Generated irdma_devices_map: %s %s" "${!irdma_map[*]}" \
+    "${irdma_map[*]}")
   debug $(printf "Generated gpu_nic_devices_map: %s %s" "${!gpu_nic_map[*]}" \
     "${gpu_nic_map[*]}")
   debug $(printf "Generated accelerator_devices_map: %s %s" 
"${!accelerator_map[*]}" \
@@ -218,9 +226,11 @@
 
   # Clear the arrays
   unset bus_specific_ethernet_device_map
+  unset bus_specific_irdma_device_map
   unset bus_specific_gpu_nic_device_map
   unset bus_specific_accelerator_device_map
   declare -ga bus_specific_ethernet_device_map
+  declare -ga bus_specific_irdma_device_map
   declare -ga bus_specific_gpu_nic_device_map
   declare -ga bus_specific_accelerator_device_map
 
@@ -245,7 +255,7 @@
   if [[ ${line_count} -gt 1 ]]; then
     # build array
     # NOTE: Calling in a $() will not modify the array in this instance
-    list_devices bus_specific_ethernet_device_map 
bus_specific_gpu_nic_device_map bus_specific_accelerator_device_map "${output}"
+    list_devices bus_specific_ethernet_device_map 
bus_specific_irdma_device_map bus_specific_gpu_nic_device_map 
bus_specific_accelerator_device_map "${output}"
 
     if [[ ${#bus_specific_gpu_nic_device_map[@]} -ne 0 ]] && [[ 
${#bus_specific_accelerator_device_map[@]} -ne 0 ]]; then
 
@@ -491,49 +501,46 @@
 #   $2: Index of the ethernet device in ethernet_devices array
 #   $3: Device path of the ethernet device
 # Outputs:
-#   Name of the device (eth0, eth2, rdma4, etc.)
+#   Name of the device (eth0, eth2, etc.)
 #################################
 function generate_ethernet_name() {
   local int_id=$1
   local eth_index=$2
   local device_path=$3
 
-  local eth_device_vendor="${ethernet_devices[${int_id}]}"
-  local name_builder=""
-
   # Diorite NIC
-  if [[ ${eth_device_vendor} == "8086:1452" ]]; then
-    # Pass the array of keys to find index of this device
-    local -i eth_index=$(get_index ${int_id} "${!ethernet_devices[@]}")
-    local old_name=$(basename ${device_path})
-    local new_name="eth${eth_index}"
-    name_builder="$new_name"
-
-    # Temporarily rename to avoid naming collisions: udev will overwrite the
-    # temporary name with the correct, final name
-    if [[ "$new_name" != "$old_name" ]]; then # IDPF NIC
-      notice "Renaming ${old_name} to ${new_name}"
-      run_ip_cmd link set $new_name name "${new_name}tmp"
-    fi
-  elif [[ " ${IRDMA_DEVICES_VENDORS[*]} " =~ 
[[:space:]]${eth_device_vendor}[[:space:]] ]]; then # RDMA NIC
-    if [[ "${SUBSYSTEM}" == "net" ]] && [[ -d 
"${device_path}/device/${RDMA_TEST_FOLDER}" ]]; then
-      name_builder="rdma${eth_index}"
-    elif [[ "${SUBSYSTEM}" == "net" ]] && [[ -d "${device_path}/device" ]]; 
then
-      # If this is a VF device and not an RDMA we do not want this device
-      # to claim the eth0 name so give it a PCI path based name instead.
-      #
-      notice "Non RDMA VF NIC. Setting name to path name"
-           name_builder=$ID_NET_NAME_PATH
-    else
-      # If device path is empty it indicates other changes happening so this 
script will skip
-      error_and_exit "DEVPATH provided is empty, skipping naming. 
Path:${device_path}"
-    fi
-  else
-    error_and_exit "Ethernet device is not for intent based name: "\
-    "Device vendors: eth:${eth_device_vendor}"
+  local old_name=$(basename ${device_path})
+  local new_name="eth${eth_index}"
+
+  # Temporarily rename to avoid naming collisions: udev will overwrite the
+  # temporary name with the correct, final name
+  if [[ "$new_name" != "$old_name" ]]; then # IDPF NIC
+    notice "Renaming ${old_name} to ${new_name}"
+    run_ip_cmd link set $new_name name "${new_name}tmp"
   fi
 
-  notice "eth nic name: ${name_builder} for device_path: ${device_path}"
+  notice "ethernet nic name: ${new_name} for device_path: ${device_path}"
+  echo ${new_name}
+}
+
+#################################
+# Generate the irdma name of the device based on the vendor
+#
+# Arguments:
+#   $1: Vendor of the irdma device
+#   $2: Index of the irdma device in irdma_devices array
+#   $3: Device path of the irdma device
+# Outputs:
+#   Name of the device (rdma0, rdma1, etc.)
+#################################
+function generate_irdma_name() {
+  local int_id=$1
+  local irdma_index=$2
+  local device_path=$3
+
+  local name_builder="rdma${irdma_index}"
+
+  notice "irdma nic name: ${name_builder} for device_path: ${device_path}"
   echo ${name_builder}
 }
 
@@ -652,6 +659,13 @@
     return
   fi
 
+  local -i irdma_index=$(get_index ${int_id} "${!irdma_devices[@]}")
+  debug "irdma device index: ${irdma_index}"
+  if [[ ${irdma_index} -ne -1 ]]; then
+    echo $(generate_irdma_name ${int_id} ${irdma_index} ${device_path})
+    return
+  fi
+
   local -i gpu_nic_index=$(get_index ${int_id} "${!gpu_nic_devices[@]}")
   debug "gpu_nic device index: ${gpu_nic_index}"
   if [[ ${gpu_nic_index} -ne -1 ]]; then
@@ -683,10 +697,10 @@
     notice "Triggered for non Net Device"
   fi
   # Note can not use "" around ls path here or it errors out
-  list_devices ethernet_devices gpu_nic_devices accelerator_devices "$(ls -d 
"${PCI_BUS_PATH}"/*)"
+  list_devices ethernet_devices irdma_devices gpu_nic_devices 
accelerator_devices "$(ls -d "${PCI_BUS_PATH}"/*)"
 
     # Check if any devices were found
-  if [[ "${gpu_nic_devices[*]}" == "" && "${ethernet_devices[*]}" == "" ]]; 
then
+  if [[ "${gpu_nic_devices[*]}" == "" && "${ethernet_devices[*]}" == "" && 
"${irdma_devices[*]}" == "" ]]; then
     error_and_exit "No network devices found"
   fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/guest-configs-20260729.00/src/usr/bin/google_set_multiqueue 
new/guest-configs-20260918.01/src/usr/bin/google_set_multiqueue
--- old/guest-configs-20260729.00/src/usr/bin/google_set_multiqueue     
2026-07-29 18:33:03.000000000 +0200
+++ new/guest-configs-20260918.01/src/usr/bin/google_set_multiqueue     
2026-09-18 20:07:29.000000000 +0200
@@ -52,17 +52,22 @@
 }
 
 A4X_ALL_CPUS_MASK="0000ffff,ffffffff,ffffffff,ffffffff,ffffffff"
-A4X_RX_RING_LENGTH="2048"
-A4X_TX_RING_LENGTH="1024"
+IDPF_RX_RING_LENGTH="4096"
+IDPF_TX_RING_LENGTH="4096"
+IDPF_DEFAULT_RING_LENGTH="512"
 
 function is_decimal_int() {
   [ "${1}" -eq "${1}" ] > /dev/null 2>&1
 }
 
-function set_channels() {
+function set_combined_channels() {
   ethtool -L "${1}" combined "${2}" > /dev/null 2>&1
 }
 
+function set_rx_tx_ring_length() {
+  ethtool -G "${1}" rx "${2}" tx "${3}" > /dev/null 2>&1
+}
+
 function set_irq_range_idpf() {
   local -r nic="$1"
   local bind_cores_index="$2"
@@ -183,8 +188,8 @@
   || "$machine_type" == *"a3-edgegpu-8g"* \
   || "$machine_type" == *"a3-ultragpu-"* \
   || "$machine_type" == *"a4-highgpu-"* \
-  || "$machine_type" == *"a4x-highgpu-"* \
-  || "$machine_type" == *"a4x-maxgpu-"* \
+  || "$machine_type" == *"a4x-"* \
+  || "$machine_type" == *"a5x-"* \
   || "$machine_type" == *"c4n-"* \
   || "$machine_type" == *"c4x-"* ]] || return 1
   return 0
@@ -331,6 +336,12 @@
   local numa="$1"
   local cpus=("${@:2}")
 
+  if [[ "$machine_type" == *"a4x-maxgpu-"* || "$machine_type" == *"a5x-"* ]]; 
then
+    # We find that setting XPS on these platforms degrades performance.
+    echo "skipping set_xps_affinity"
+    return
+  fi
+
   total_vcpus=${#cpus[@]}
   nics_string=$(get_network_interfaces)
 
@@ -339,6 +350,7 @@
     tx_queue_count=$(ls -1 ${ROOT_DIR}sys/class/net/"$nic"/queues/ | grep tx | 
wc -l)
 
     if [[ "$machine_type" == *"a4x-"* ]]; then
+      # Implicitly excluding a4x-maxgpu- due to earlier check.
       # All queues on a4x get the full mask.
       for (( queue=0; queue<tx_queue_count; queue++ )); do
         echo "${A4X_ALL_CPUS_MASK}" > 
"${ROOT_DIR}sys/class/net/$nic/queues/tx-$queue/xps_cpus"
@@ -396,8 +408,102 @@
   done
 }
 
+function try_set_idpf_channels() {
+  local -r eth_dev="$1"
+  if ! errormsg=$(ethtool -l "$eth_dev" 2>&1); then
+      echo "\`ethtool -l\` failed for $eth_dev: $errormsg."
+    return 1
+  fi
+
+  # Sample output follows.
+  #
+  # Channel parameters for eth0:
+  #  Pre-set maximums:
+  #  RX:               16
+  #  TX:               16
+  #  Other:            1
+  #  Combined: 16
+  #  Current hardware settings:
+  #  RX:               0
+  #  TX:               0
+  #  Other:            1
+  #  Combined: 16
+
+  num_max_channels=$(ethtool -l "$eth_dev" | grep -m 1 Combined | awk '{print 
$NF}')
+  if [[ -z "${num_max_channels}" || "${num_max_channels}" -eq "1" ]]; then
+    echo "num_max_channels is n/a, skipping set channels for $eth_dev"
+    return 1
+  fi
+  if ! is_decimal_int "$num_max_channels"; then
+    echo "Setting channels for $eth_dev: $num_max_channels is not a decimal 
int."
+    return 1
+  fi
+  if ! set_combined_channels "$eth_dev" "$num_max_channels"; then
+    echo "Failed to set channels for $eth_dev to $num_max_channels."
+    return 1
+  fi
+  echo "Set channels for $eth_dev to $num_max_channels."
+  return 0
+}
+
+function try_set_idpf_ring_length() {
+  local -r eth_dev="$1"
+  if ! errormsg=$(ethtool -g "$eth_dev" 2>&1); then
+    echo "\`ethtool -g\` failed for $eth_dev: $errormsg."
+    return 1
+  fi
+  local -r ethtool_output=$(ethtool -g "$eth_dev")
+  # Matching assumes that max is listed first, then current, and that there
+  # are no other matches in the output.
+  # Sample output follows.
+  #
+  # Ring parameters for eth0:
+  # Pre-set maximums:
+  # RX:                        8128
+  # RX Mini:           n/a
+  # RX Jumbo:          n/a
+  # TX:                        8160
+  # TX push buff len:  n/a
+  # Current hardware settings:
+  # RX:                        512
+  # RX Mini:           n/a
+  # RX Jumbo:          n/a
+  # TX:                        512
+  # RX Buf Len:                n/a
+  # CQE Size:          n/a
+  # TX Push:           off
+  # RX Push:           off
+  # TX push buff len:  n/a
+  # TCP data split:            on
+
+  local -r max_rx=$(echo $"$ethtool_output" | awk '/RX:/{print $2; exit}')
+  local -r max_tx=$(echo $"$ethtool_output" | awk '/TX:/{print $2; exit}')
+  local -r current_rx=$(echo $"$ethtool_output" | awk '/RX:/{last=$2} 
END{print last}')
+  local -r current_tx=$(echo $"$ethtool_output" | awk '/TX:/{last=$2} 
END{print last}')
+  if [[ $max_rx -lt $IDPF_RX_RING_LENGTH ]]; then
+    echo "Reported max RX ring length for $eth_dev is $max_rx, which is less 
than the desired $IDPF_RX_RING_LENGTH."
+    return 1
+  fi
+  if [[ $max_tx -lt $IDPF_TX_RING_LENGTH ]]; then
+    echo "Reported max TX ring length for $eth_dev is $max_tx, which is less 
than the desired $IDPF_TX_RING_LENGTH."
+    return 1
+  fi
+  if [[ $current_rx -ne $IDPF_DEFAULT_RING_LENGTH || $current_tx -ne 
$IDPF_DEFAULT_RING_LENGTH ]]; then
+    echo "Current RX/TX ($current_rx/$current_tx) ring len for $eth_dev is not 
the default ($IDPF_DEFAULT_RING_LENGTH). Not setting ring length."
+    return 0
+  fi
+
+  if ! set_rx_tx_ring_length "$eth_dev" "$IDPF_RX_RING_LENGTH" 
"$IDPF_TX_RING_LENGTH"; then
+    echo "Failed to set ring length for $eth_dev to $IDPF_RX_RING_LENGTH (RX) 
and $IDPF_TX_RING_LENGTH (TX)."
+    return 1
+  fi
+
+  echo "Set ring length for $eth_dev to $IDPF_RX_RING_LENGTH (RX) and 
$IDPF_TX_RING_LENGTH (TX)."
+  return 0
+}
+
 # Enable max supported queue count for IDPF devices.
-function set_idpf_queue_counts() {
+function set_idpf_configs() {
   if [ ! -x "$(command -v ethtool)" ]; then
     echo "ethtool not found: unable to configure device queue counts"
     return
@@ -407,21 +513,12 @@
     if ! is_idpf "$eth_dev"; then
       continue
     fi
-    if ! errormsg=$(ethtool -l "$eth_dev" 2>&1); then
-      echo "\`ethtool -l\` failed for $eth_dev: $errormsg."
-      continue
+    if ! try_set_idpf_channels "$eth_dev"; then
+      echo "Failed to set channels for $eth_dev"
     fi
-    num_max_channels=$(ethtool -l "$eth_dev" | grep -m 1 Combined | awk 
'{print $NF}')
-    if [[ -z "${num_max_channels}" || "${num_max_channels}" -eq "1" ]]; then
-      echo "num_max_channels is n/a, skipping set channels for $eth_dev"
-      continue
+    if ! try_set_idpf_ring_length "$eth_dev"; then
+      echo "Failed to set ring length for $eth_dev"
     fi
-    if ! is_decimal_int "$num_max_channels"; then
-      echo "Could not set channels for $eth_dev to $num_max_channels."
-      continue
-    fi
-    set_channels "$eth_dev" "$num_max_channels"
-    echo "Set channels for $eth_dev to $num_max_channels."
   done
 }
 
@@ -480,7 +577,7 @@
 is_multinic_accelerator_platform
 IS_MULTINIC_ACCELERATOR_PLATFORM=$?
 
-set_idpf_queue_counts
+set_idpf_configs
 
 for dev in $VIRTIO_NET_DEVS
 do
@@ -574,12 +671,6 @@
       continue
     fi
 
-    # For IDPF at least, we need to reconfigure ring size before setting IRQ 
affinity,
-    # since adjusting the ring size destroys the IRQ affinity settings.
-    if [[ $machine_type == *"a4x-maxgpu-"* ]]; then
-      ethtool -G "$nic_name" rx "$A4X_RX_RING_LENGTH" tx "$A4X_TX_RING_LENGTH"
-    fi
-
     # For non-gvnic/idpf devices (e.g. mlx5), the IRQ bindings will be handled 
by the device's driver.
     if is_gvnic "$nic_name"; then
       bind_cores_index=$(set_irq_range_gve "$nic_name" "$bind_cores_index" 
"${node_irq_ranges[@]}")

Reply via email to