diff mbox series

[net-next] ice: xsk: fix GCC version checking against pragma unroll presence

Message ID 20220307231353.56638-1-maciej.fijalkowski@intel.com (mailing list archive)
State Accepted
Commit 13d04d79701ba240969b296903de14db3734ab25
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ice: xsk: fix GCC version checking against pragma unroll presence | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: daniel@iogearbox.net; 10 maintainers not CCed: andrii@kernel.org jesse.brandeburg@intel.com kpsingh@kernel.org intel-wired-lan@lists.osuosl.org daniel@iogearbox.net john.fastabend@gmail.com kafai@fb.com songliubraving@fb.com ast@kernel.org yhs@fb.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Maciej Fijalkowski March 7, 2022, 11:13 p.m. UTC
Pragma unroll was introduced around GCC 8, whereas current xsk code in
ice that prepares loop_unrolled_for macro that is based on mentioned
pragma, compares GCC version against 4, which is wrong and Stephen
found this out by compiling kernel with GCC 5.4 [0].

Fix this mistake and check if GCC version is >= 8.

[0]: https://lore.kernel.org/netdev/20220307213659.47658125@canb.auug.org.au/

Fixes: 126cdfe1007a ("ice: xsk: Improve AF_XDP ZC Tx and use batching API")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
This code has not made it to net tree yet, hence sending it against
net-next and this time I'm not routing it via Tony's queue as it's
probably a bit urgent?

 drivers/net/ethernet/intel/ice/ice_xsk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 8, 2022, 6:30 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  8 Mar 2022 00:13:53 +0100 you wrote:
> Pragma unroll was introduced around GCC 8, whereas current xsk code in
> ice that prepares loop_unrolled_for macro that is based on mentioned
> pragma, compares GCC version against 4, which is wrong and Stephen
> found this out by compiling kernel with GCC 5.4 [0].
> 
> Fix this mistake and check if GCC version is >= 8.
> 
> [...]

Here is the summary with links:
  - [net-next] ice: xsk: fix GCC version checking against pragma unroll presence
    https://git.kernel.org/netdev/net-next/c/13d04d79701b

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.h b/drivers/net/ethernet/intel/ice/ice_xsk.h
index 0cbb5793b5b8..123bb98ebfbe 100644
--- a/drivers/net/ethernet/intel/ice/ice_xsk.h
+++ b/drivers/net/ethernet/intel/ice/ice_xsk.h
@@ -10,7 +10,7 @@ 
 
 #ifdef __clang__
 #define loop_unrolled_for _Pragma("clang loop unroll_count(8)") for
-#elif __GNUC__ >= 4
+#elif __GNUC__ >= 8
 #define loop_unrolled_for _Pragma("GCC unroll 8") for
 #else
 #define loop_unrolled_for for