Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rshim for openSUSE:Factory checked 
in at 2023-11-02 20:23:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rshim (Old)
 and      /work/SRC/openSUSE:Factory/.rshim.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rshim"

Thu Nov  2 20:23:21 2023 rev:13 rq:1122928 version:2.0.12.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rshim/rshim.changes      2023-08-31 
13:52:09.590038093 +0200
+++ /work/SRC/openSUSE:Factory/.rshim.new.17445/rshim.changes   2023-11-02 
20:23:47.784972031 +0100
@@ -1,0 +2,7 @@
+Thu Nov  2 15:58:07 UTC 2023 - Matthias Brugger <mbrug...@suse.com>
+
+- Update to 2.0.12.1
+  * Display uptime in seconds for BF3
+  * Add fuse3 support 
+
+-------------------------------------------------------------------

Old:
----
  rshim-2.0.9.0.tar

New:
----
  rshim-2.0.12.1.tar

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

Other differences:
------------------
++++++ rshim.spec ++++++
--- /var/tmp/diff_new_pack.1U4gSl/_old  2023-11-02 20:23:48.296990871 +0100
+++ /var/tmp/diff_new_pack.1U4gSl/_new  2023-11-02 20:23:48.296990871 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           rshim
-Version:        2.0.9.0
+Version:        2.0.12.1
 Release:        0
 Summary:        User-space driver for Mellanox BlueField SoC
 License:        GPL-2.0 or BSD-3-Clause

++++++ rshim-2.0.9.0.tar -> rshim-2.0.12.1.tar ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rshim-2.0.9.0/configure.ac 
new/rshim-2.0.12.1/configure.ac
--- old/rshim-2.0.9.0/configure.ac      2023-06-17 19:58:49.000000000 +0200
+++ new/rshim-2.0.12.1/configure.ac     2023-10-30 12:34:25.000000000 +0100
@@ -2,7 +2,7 @@
 # Copyright (C) 2019 Mellanox Technologies. All Rights Reserved.
 #
 
-AC_INIT([rshim], [2.0.9])
+AC_INIT([rshim], [2.0.12])
 AC_CONFIG_AUX_DIR(config)
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_LANG(C)
@@ -85,8 +85,12 @@
   if test $backend = freebsd; then
     AC_CHECK_LIB(cuse, cuse_dev_create)
   else
-    PKG_CHECK_MODULES(fuse, fuse, [], [AC_MSG_ERROR([Can't find fuse])])
+    PKG_CHECK_MODULES(fuse, fuse, [], PKG_CHECK_MODULES(fuse, fuse3, 
[use_fuse3=yes], [AC_MSG_ERROR([Can't find fuse])]))
+  if test $use_fuse3 = yes; then
     AC_SUBST(CPPFLAGS, "$CPPFLAGS -DFUSE_USE_VERSION=30")
+  else
+    AC_SUBST(CPPFLAGS, "$CPPFLAGS -DFUSE_USE_VERSION=29")
+  fi
 fi
 ])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rshim-2.0.9.0/debian/changelog 
new/rshim-2.0.12.1/debian/changelog
--- old/rshim-2.0.9.0/debian/changelog  2023-06-17 19:58:49.000000000 +0200
+++ new/rshim-2.0.12.1/debian/changelog 2023-10-30 12:34:25.000000000 +0100
@@ -1,3 +1,22 @@
+rshim (2.0.12) UNRELEASED; urgency=low
+
+  * BF3: Add UPTIME display in seconds
+
+ -- Liming Sun <limi...@nvidia.com>  Mon, 23 Oct 2023 13:05:32 -0400
+
+rshim (2.0.11) UNRELEASED; urgency=low
+
+  * bfb-install: Return failure code
+  * Remove version 0 support for NIC FW_RESET
+
+ -- Liming Sun <limi...@nvidia.com>  Tue, 26 Sep 2023 08:37:32 -0400
+
+rshim (2.0.10) UNRELEASED; urgency=low
+
+  * Fix interrupt handling for NIC FW_RESET
+
+ -- Liming Sun <limi...@nvidia.com>  Mon, 18 Sep 2023 08:54:22 -0400
+
 rshim (2.0.9) UNRELEASED; urgency=low
 
   * rshim/usb/bf3: fix timeout logic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rshim-2.0.9.0/rhel/rshim.spec.in 
new/rshim-2.0.12.1/rhel/rshim.spec.in
--- old/rshim-2.0.9.0/rhel/rshim.spec.in        2023-06-17 19:58:49.000000000 
+0200
+++ new/rshim-2.0.12.1/rhel/rshim.spec.in       2023-10-30 12:34:25.000000000 
+0100
@@ -54,6 +54,16 @@
 %{_mandir}/man8/rshim.8.gz
 
 %changelog
+* Mon Oct 23 2023 Liming Sun <limi...@nvidia.com> - 2.0.12
+- BF3: Add UPTIME display in seconds
+
+* Tue Sep 26 2023 Liming Sun <limi...@nvidia.com> - 2.0.11
+- Remove version 0 support for NIC FW_RESET
+- bfb-install: Return failure code
+
+* Mon Sep 18 2023 Liming Sun <limi...@nvidia.com> - 2.0.10
+- Fix interrupt handling for NIC FW_RESET
+
 * Sat Jun 17 2023 Liming Sun <limi...@nvidia.com> - 2.0.9
 - rshim/usb/bf3: fix timeout logic
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rshim-2.0.9.0/rshim.spec.in 
new/rshim-2.0.12.1/rshim.spec.in
--- old/rshim-2.0.9.0/rshim.spec.in     2023-06-17 19:58:49.000000000 +0200
+++ new/rshim-2.0.12.1/rshim.spec.in    2023-10-30 12:34:25.000000000 +0100
@@ -13,13 +13,14 @@
 Source0: 
https://github.com/mellanox/rshim-user-space/archive/%{name}-%{version}.tar.gz
 
 BuildRequires: gcc, autoconf, automake, pkgconfig, make
-BuildRequires: pkgconfig(libpci), pkgconfig(libusb-1.0), pkgconfig(fuse)
+BuildRequires: pkgconfig(libpci), pkgconfig(libusb-1.0), fuse > 2
 
 %if (0%{?rhel} >= 8 || 0%{?fedora} > 0) && "0%{?ctyunos}" == "0"
 Requires: kernel-modules-extra
 %endif
 
 %global with_systemd %(if (test -d "%{_unitdir}" > /dev/null); then echo -n 
'1'; else echo -n '0'; fi)
+%global debug_package %{nil}
 
 %description
 This is the user-space driver to access the BlueField SoC via the rshim
@@ -95,6 +96,16 @@
 %{_mandir}/man8/bfb-install.8.gz
 
 %changelog
+* Mon Oct 23 2023 Liming Sun <limi...@nvidia.com> - 2.0.12
+- BF3: Add UPTIME display in seconds
+
+* Tue Sep 26 2023 Liming Sun <limi...@nvidia.com> - 2.0.11
+- Remove version 0 support for NIC FW_RESET
+- bfb-install: Return failure code
+
+* Mon Sep 18 2023 Liming Sun <limi...@nvidia.com> - 2.0.10
+- Fix interrupt handling for NIC FW_RESET
+
 * Sat Jun 17 2023 Liming Sun <limi...@nvidia.com> - 2.0.9
 - rshim/usb/bf3: fix timeout logic
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rshim-2.0.9.0/scripts/bfb-install 
new/rshim-2.0.12.1/scripts/bfb-install
--- old/rshim-2.0.9.0/scripts/bfb-install       2023-06-17 19:58:49.000000000 
+0200
+++ new/rshim-2.0.12.1/scripts/bfb-install      2023-10-30 12:34:25.000000000 
+0100
@@ -104,7 +104,7 @@
 RETVAL=$?
 if [ $RETVAL -ne 0 ]; then
   echo "Failed to push BFB"
-  exit
+  exit $RETVAL
 fi
 
 # Print the rshim log.
@@ -117,7 +117,7 @@
   RETVAL=$?
   if [ $RETVAL -ne 0 ]; then
     echo "Failed to read ${rshim}/misc"
-    exit
+    exit $RETVAL
   fi
   cur_len=${#cur}
 
@@ -151,3 +151,5 @@
     break;
   fi
 done
+
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rshim-2.0.9.0/src/rshim_fuse.c 
new/rshim-2.0.12.1/src/rshim_fuse.c
--- old/rshim-2.0.9.0/src/rshim_fuse.c  2023-06-17 19:58:49.000000000 +0200
+++ new/rshim-2.0.12.1/src/rshim_fuse.c 2023-10-30 12:34:25.000000000 +0100
@@ -19,8 +19,13 @@
 #include <sys/timerfd.h>
 
 #ifdef __linux__
+#if FUSE_USE_VERSION >= 30
+#include <fuse3/cuse_lowlevel.h>
+#include <fuse3/fuse_opt.h>
+#else
 #include <fuse/cuse_lowlevel.h>
 #include <fuse/fuse_opt.h>
+#endif
 #include <unistd.h>
 #elif defined(__FreeBSD__)
 #include <termios.h>
@@ -41,6 +46,9 @@
     [RSH_DEV_TYPE_MISC] = "misc",
 };
 
+/* BF3 ref clock. */
+#define BF3_REF_CLK_IN_HZ 200000000
+
 #ifdef __linux__
 static void rshim_fuse_boot_open(fuse_req_t req, struct fuse_file_info *fi)
 {
@@ -698,6 +706,16 @@
     len -= n;
   }
 
+  if (bd->ver_id == RSHIM_BLUEFIELD_3) {
+    rc = bd->read_rshim(bd, RSHIM_CHANNEL, bd->regs->uptime,
+                        &value, RSHIM_REG_SIZE_8B);
+    if (!rc) {
+      n = snprintf(p, len, "%-16s%ld(s)\n", "UP_TIME", 
value/BF3_REF_CLK_IN_HZ);
+      p += n;
+      len -= n;
+    }
+  }
+
   if (bd->display_level == 1) {
     gettimeofday(&tp, NULL);
 
@@ -1286,6 +1304,7 @@
   for (i = 0; i < RSH_DEV_TYPES; i++) {
 #ifdef __linux__
     static const char * const argv[] = {"./rshim", "-f"};
+    int multithreaded = 0;
 
     name = rshim_dev_minor_names[i];
 
@@ -1307,7 +1326,7 @@
       continue;
     bd->fuse_session[i] = cuse_lowlevel_setup(sizeof(argv)/sizeof(char *),
                                       (char **)argv,
-                                      &ci, ops[i], NULL, bd);
+                                      &ci, ops[i], &multithreaded, bd);
     if (!bd->fuse_session[i]) {
       RSHIM_ERR("Failed to setup CUSE %s\n", name);
       return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rshim-2.0.9.0/src/rshim_pcie.c 
new/rshim-2.0.12.1/src/rshim_pcie.c
--- old/rshim-2.0.9.0/src/rshim_pcie.c  2023-06-17 19:58:49.000000000 +0200
+++ new/rshim-2.0.12.1/src/rshim_pcie.c 2023-10-30 12:34:25.000000000 +0100
@@ -85,7 +85,8 @@
 enum {
   RSHIM_PCIE_RST_REPLY_NONE,
   RSHIM_PCIE_RST_REPLY_ACK,
-  RSHIM_PCIE_RST_REPLY_NACK
+  RSHIM_PCIE_RST_REPLY_NACK,
+  RSHIM_PCIE_RST_START_ACK,
 };
 
 /* Reset type stored in scratchpad6. */
@@ -95,6 +96,9 @@
   RSHIM_PCIE_RST_TYPE_NIC_RESET
 };
 
+/* Min delay in seconds after RSHIM_PCIE_RST_START_ACK */
+#define RSHIM_PCIE_RST_START_MIN_DELAY    2
+
 /* Interrupt information between NIC_FW and rshim driver. */
 typedef union {
   struct {
@@ -754,7 +758,7 @@
 {
   rshim_pcie_intr_info_t info = {.word = 0};
   rshim_backend_t *bd = &dev->bd;
-  int rc, drop_mode;
+  int rc, drop_mode, delay;
   time_t t;
 
   /* Add some protection for interrupt flooding. */
@@ -787,7 +791,8 @@
     (info.rst_type == RSHIM_PCIE_RST_TYPE_NIC_RESET) ? "NIC" :
     ((info.rst_type == RSHIM_PCIE_RST_TYPE_DPU_RESET) ? "DPU" : ""));
 
-  if (info.rst_reply == RSHIM_PCIE_RST_REPLY_NONE) {
+  switch (info.rst_state) {
+  case RSHIM_PCIE_RST_STATE_REQUEST:
     RSHIM_INFO("NIC reset ACK\n");
     info.rst_reply = RSHIM_PCIE_RST_REPLY_ACK;
     dev->nic_reset = true;
@@ -796,21 +801,22 @@
                     info.word, RSHIM_REG_SIZE_8B);
     sleep(RSHIM_PCIE_NIC_RESET_WAIT);
     dev->nic_reset = false;
-  }
-
-  rc = bd->read_rshim(bd, RSHIM_CHANNEL, bd->regs->scratchpad6,
-                      &info.word, RSHIM_REG_SIZE_8B);
-  if (rc || RSHIM_BAD_CTRL_REG(info.word)) {
-    RSHIM_WARN("Failed to read irq request\n");
-    goto intr_done;
-  }
+    break;
 
-  if (info.rst_state == RSHIM_PCIE_RST_STATE_ABORT) {
+  case RSHIM_PCIE_RST_STATE_ABORT:
     RSHIM_INFO("NIC reset ABORT\n");
     info.word &= 0xFFFFFFFFUL;
     bd->write_rshim(bd, RSHIM_CHANNEL, bd->regs->scratchpad6,
                     info.word, RSHIM_REG_SIZE_8B);
-  } else if (info.rst_type == RSHIM_PCIE_RST_TYPE_DPU_RESET) {
+    break;
+
+  case RSHIM_PCIE_RST_STATE_START:
+    RSHIM_INFO("NIC reset START\n");
+
+    info.rst_reply = RSHIM_PCIE_RST_START_ACK;
+    bd->write_rshim(bd, RSHIM_CHANNEL, bd->regs->scratchpad6,
+                    info.word, RSHIM_REG_SIZE_8B);
+
     /*
      * Both NIC and ARM reset.
      * - Set drop_mode to prevent further read/write;
@@ -821,8 +827,15 @@
     drop_mode = bd->drop_mode;
     bd->drop_mode = 1;
     rshim_fifo_reset(bd);
-    sleep(2);
+    delay = (info.rst_downtime * 10 + 999) / 1000;
+    if (delay < RSHIM_PCIE_RST_START_MIN_DELAY)
+      delay = RSHIM_PCIE_RST_START_MIN_DELAY;
+    sleep(delay);
     bd->drop_mode = drop_mode;
+    break;
+
+  default:
+    break;
   }
 
   if (!bd->drop_mode)

Reply via email to