From: Igor Pylypiv <hidden> Date: 2018-03-17 07:59:48
rxcsum and lro fields were deleted in commit a0d2730c9571 ("net: vmxnet3:
convert to hw_features"). With upgrading to newer version those fields were
resurrected and new code started using uninitialized lro field.
Removing rxcsum and lro fields.
Fixes: 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)")
Signed-off-by: Igor Pylypiv <redacted>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 4 +++-
drivers/net/vmxnet3/vmxnet3_int.h | 3 ---
2 files changed, 3 insertions(+), 4 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2018-03-18 00:20:33
From: Igor Pylypiv <redacted>
Date: Sat, 17 Mar 2018 00:58:52 -0700
rxcsum and lro fields were deleted in commit a0d2730c9571 ("net: vmxnet3:
convert to hw_features"). With upgrading to newer version those fields were
resurrected and new code started using uninitialized lro field.
Removing rxcsum and lro fields.
Fixes: 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)")
Signed-off-by: Igor Pylypiv <redacted>
Why are you posting this again?
I applied the copy of this patch which was part of a two part series
posted earlier.
From: Igor Pylypiv <hidden> Date: 2018-03-18 01:08:59
The 03/17/2018 20:20, David Miller wrote:
From: Igor Pylypiv <redacted>
Date: Sat, 17 Mar 2018 00:58:52 -0700
quoted
rxcsum and lro fields were deleted in commit a0d2730c9571 ("net: vmxnet3:
convert to hw_features"). With upgrading to newer version those fields were
resurrected and new code started using uninitialized lro field.
Removing rxcsum and lro fields.
Fixes: 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)")
Signed-off-by: Igor Pylypiv <redacted>
Why are you posting this again?
I applied the copy of this patch which was part of a two part series
posted earlier.
No way!!!
I know it is hard to believe but I found this bug myself.
That's really odd. I took linux-next-20180316 and patch wasn't there.
Now I see the patch in your tree.
Anyway, let me send another one to delete rxcsum at least...
From: kbuild test robot <hidden> Date: 2018-03-18 06:38:02
Hi Igor,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Igor-Pylypiv/vmxnet3-fix-LRO-feature-check/20180318-140725
config: i386-randconfig-x003-201811 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_rx_complete':
quoted
drivers/net/vmxnet3/vmxnet3_drv.c:1474:8: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
From: kbuild test robot <hidden> Date: 2018-03-18 11:24:14
Hi Igor,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Igor-Pylypiv/vmxnet3-fix-LRO-feature-check/20180318-140725
config: x86_64-randconfig-s3-03181820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:10:0,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/net//vmxnet3/vmxnet3_drv.c:27:
drivers/net//vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_rx_complete':
drivers/net//vmxnet3/vmxnet3_drv.c:1474:8: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
!adapter->netdev->features & NETIF_F_LRO) {
^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
quoted
drivers/net//vmxnet3/vmxnet3_drv.c:1473:4: note: in expansion of macro 'if'
if (!rcd->tcp ||
^~
drivers/net//vmxnet3/vmxnet3_drv.c:1474:8: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
!adapter->netdev->features & NETIF_F_LRO) {
^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
quoted
drivers/net//vmxnet3/vmxnet3_drv.c:1473:4: note: in expansion of macro 'if'
if (!rcd->tcp ||
^~
drivers/net//vmxnet3/vmxnet3_drv.c:1474:8: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
!adapter->netdev->features & NETIF_F_LRO) {
^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^~~~
quoted
drivers/net//vmxnet3/vmxnet3_drv.c:1473:4: note: in expansion of macro 'if'
Igor, I will fix this up for you. But it is clear that this patch wasn't tested
very well.
Because !adapter->netdev->features evaluates wholly before the "& NETIF_F_LRO",
the flags aren't being tested properly at all.
Igor, I will fix this up for you. But it is clear that this patch wasn't tested
very well.
Because !adapter->netdev->features evaluates wholly before the "& NETIF_F_LRO",
the flags aren't being tested properly at all.
My bad.
I have even been looking at C operator precedence table:
----------------------------
| Operator | Associativity |
|--------------------------|
| ++ -- | right-to-left |
| + - | |
| ! ~ | |
| (type) | |
| * | |
| & | |
| sizeof | |
----------------------------
According to this table '&' will be evaluated first, because it is on the right side.
But yeah, that was "Address of", not "Bitwise AND".
Igor, I will fix this up for you. But it is clear that this patch wasn't tested
very well.
Because !adapter->netdev->features evaluates wholly before the "& NETIF_F_LRO",
the flags aren't being tested properly at all.
Ronak's patch that fixes this issue has the right code, and is already
accepted in net tree (Commit: 034f405793897a3c8f642935f5494b86c340cde7).
We no longer need Igor's patch.
Thanks,
Shri
Ronak's patch that fixes this issue has the right code, and is already
accepted in net tree (Commit: 034f405793897a3c8f642935f5494b86c340cde7).
We no longer need Igor's patch.
That explains why things in my actual tree are fine.
Thanks.