FS#75029 - [virtualbox] linux518 don't have netif_rx_ni.

Attached to Project: Community Packages
Opened by Masato Toyoshima (phoepsilonix) - Saturday, 11 June 2022, 06:24 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 22 June 2022, 13:10 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
020-linux518.patch is fixed.
linux518 don't have netif_rx_ni.

Additional info:
~~~diff
diff --git a/virtualbox/trunk/020-linux518.patch b/virtualbox/trunk/020-linux518.patch
index 6130cfc7..19bf6ace 100644
--- a/virtualbox/trunk/020-linux518.patch
+++ b/virtualbox/trunk/020-linux518.patch
@@ -245,15 +245,17 @@ Index: src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c (revision 151556)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c (working copy)
-@@ -2311,7 +2311,13 @@
+@@ -2310,8 +2310,15 @@
+ {
vboxNetFltDumpPacket(pSG, true, "host", (fDst & INTNETTRUNKDIR_WIRE) ? 0 : 1);
Log6(("vboxNetFltPortOsXmit: pBuf->cb dump:\n%.*Rhxd\n", sizeof(pBuf->cb), pBuf->cb));
- Log6(("vboxNetFltPortOsXmit: netif_rx_ni(%p)\n", pBuf));
+#if RTLNX_VER_MIN(5,18,0)
+ Log6(("vboxNetFltPortOsXmit: netif_rx_ni(%p)\n", pBuf));
+ local_bh_disable();
+ err = netif_rx(pBuf);
+ local_bh_enable();
+#else
++ Log6(("vboxNetFltPortOsXmit: netif_rx(%p)\n", pBuf));
err = netif_rx_ni(pBuf);
+#endif
if (err)
diff --git a/virtualbox/trunk/PKGBUILD b/virtualbox/trunk/PKGBUILD
index 21bef17e..060e1fb3 100644
--- a/virtualbox/trunk/PKGBUILD
+++ b/virtualbox/trunk/PKGBUILD
@@ -103,7 +103,7 @@ sha256sums=('9c3ce1829432e5b8374f950698587038f45fb0492147dc200e59edb9bb75eb49'
'5aac692909a0a0ec56b08bdece9e42cf7463abdca9da2f990d441ff463be6a99'
'cac5a573e9ed5aafb2f469c2e6fffb8cd4f389bbadba5a968c9f65be7a72fee3'
'25066d566042a3b3d6dee805fe783ca07fd3c3671a098db2b5f09aeb07624cd2'
- '3ea54e5a747086c388d078b12117cdb640a937e3147b71031abcff2497ff1e97')
+ 'fcb02ee903dce29dad907aeb24beb8f809c9472172de029c99b9661f1308bd3a')

prepare() {
cd "VirtualBox-$pkgver"
~~~
This task depends upon

Closed by  Christian Hesse (eworm)
Wednesday, 22 June 2022, 13:10 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Works just fine...
Comment by Masato Toyoshima (phoepsilonix) - Saturday, 11 June 2022, 09:23 GMT
The following modification allows us to build with linux 5.18 series.

```diff
#if RTLNX_VER_MIN(5,18,0)
Log6(("vboxNetFltPortOsXmit: netif_rx(%p)\n", pBuf));
local_bh_disable();
err = netif_rx(pBuf);
local_bh_enable();
#else
Log6(("vboxNetFltPortOsXmit: netif_rx_ni(%p)\n", pBuf));
err = netif_rx_ni(pBuf);
#endif
```
Comment by Christian Hesse (eworm) - Wednesday, 22 June 2022, 12:28 GMT
I do not get it.
We have virtualbox 6.1.34-4 in repositories since May 30th. That works just fine with linux 5.18.x, no?
Comment by Jonas Witschel (diabonas) - Wednesday, 22 June 2022, 13:08 GMT
Looking at the proposed patch more closely, it seems to only change the logging:

Log6(("vboxNetFltPortOsXmit: netif_rx_ni(%p)\n", pBuf));

which is currently emitted unconditionally of the kernel version, is changed to

Log6(("vboxNetFltPortOsXmit: netif_rx(%p)\n", pBuf));

for kernel versions >= 5.18. I don't think this has any real implications apart from producing slightly better logging output, so feel free to close as won't fix.

Loading...