All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:856 mlx5_fpga_ipsec_release_sa_ctx() warn: bitwise AND condition is false here
@ 2021-03-11 19:34 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-11 19:34 UTC (permalink / raw)
  To: Raed Salem
  Cc: kbuild-all, linux-kernel, Saeed Mahameed, Boris Pismenny, Huy Nguyen

[-- Attachment #1: Type: text/plain, Size: 2145 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: 7dfee4b1d79e1800818abcfb47747b162c9a2d31 net/mlx5: IPsec, Refactor SA handle creation and destruction
date:   11 months ago
config: arc-randconfig-m031-20210311 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:856 mlx5_fpga_ipsec_release_sa_ctx() warn: bitwise AND condition is false here

Old smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:711 mlx5_fpga_ipsec_create_sa_ctx() warn: bitwise AND condition is false here
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:762 mlx5_fpga_ipsec_create_sa_ctx() warn: bitwise AND condition is false here
arch/arc/include/asm/thread_info.h:65 current_thread_info() error: uninitialized symbol 'sp'.

vim +856 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c

   837	
   838	static void
   839	mlx5_fpga_ipsec_release_sa_ctx(struct mlx5_fpga_ipsec_sa_ctx *sa_ctx)
   840	{
   841		struct mlx5_fpga_device *fdev = sa_ctx->dev->fpga;
   842		struct mlx5_fpga_ipsec *fipsec = fdev->ipsec;
   843		int opcode = is_v2_sadb_supported(fdev->ipsec) ?
   844				MLX5_FPGA_IPSEC_CMD_OP_DEL_SA_V2 :
   845				MLX5_FPGA_IPSEC_CMD_OP_DEL_SA;
   846		int err;
   847	
   848		err = mlx5_fpga_ipsec_update_hw_sa(fdev, &sa_ctx->hw_sa, opcode);
   849		sa_ctx->hw_sa.ipsec_sa_v1.cmd = 0;
   850		if (err) {
   851			WARN_ON(err);
   852			return;
   853		}
   854	
   855		if (sa_ctx->fpga_xfrm->accel_xfrm.attrs.action &
 > 856		    MLX5_ACCEL_ESP_ACTION_DECRYPT)
   857			ida_simple_remove(&fipsec->halloc, sa_ctx->sa_handle);
   858	
   859		mutex_lock(&fipsec->sa_hash_lock);
   860		WARN_ON(rhashtable_remove_fast(&fipsec->sa_hash, &sa_ctx->hash,
   861					       rhash_sa));
   862		mutex_unlock(&fipsec->sa_hash_lock);
   863	}
   864	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27839 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:856 mlx5_fpga_ipsec_release_sa_ctx() warn: bitwise AND condition is false here
@ 2021-03-11 19:34 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-11 19:34 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2199 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: 7dfee4b1d79e1800818abcfb47747b162c9a2d31 net/mlx5: IPsec, Refactor SA handle creation and destruction
date:   11 months ago
config: arc-randconfig-m031-20210311 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:856 mlx5_fpga_ipsec_release_sa_ctx() warn: bitwise AND condition is false here

Old smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:711 mlx5_fpga_ipsec_create_sa_ctx() warn: bitwise AND condition is false here
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:762 mlx5_fpga_ipsec_create_sa_ctx() warn: bitwise AND condition is false here
arch/arc/include/asm/thread_info.h:65 current_thread_info() error: uninitialized symbol 'sp'.

vim +856 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c

   837	
   838	static void
   839	mlx5_fpga_ipsec_release_sa_ctx(struct mlx5_fpga_ipsec_sa_ctx *sa_ctx)
   840	{
   841		struct mlx5_fpga_device *fdev = sa_ctx->dev->fpga;
   842		struct mlx5_fpga_ipsec *fipsec = fdev->ipsec;
   843		int opcode = is_v2_sadb_supported(fdev->ipsec) ?
   844				MLX5_FPGA_IPSEC_CMD_OP_DEL_SA_V2 :
   845				MLX5_FPGA_IPSEC_CMD_OP_DEL_SA;
   846		int err;
   847	
   848		err = mlx5_fpga_ipsec_update_hw_sa(fdev, &sa_ctx->hw_sa, opcode);
   849		sa_ctx->hw_sa.ipsec_sa_v1.cmd = 0;
   850		if (err) {
   851			WARN_ON(err);
   852			return;
   853		}
   854	
   855		if (sa_ctx->fpga_xfrm->accel_xfrm.attrs.action &
 > 856		    MLX5_ACCEL_ESP_ACTION_DECRYPT)
   857			ida_simple_remove(&fipsec->halloc, sa_ctx->sa_handle);
   858	
   859		mutex_lock(&fipsec->sa_hash_lock);
   860		WARN_ON(rhashtable_remove_fast(&fipsec->sa_hash, &sa_ctx->hash,
   861					       rhash_sa));
   862		mutex_unlock(&fipsec->sa_hash_lock);
   863	}
   864	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27839 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-11 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 19:34 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:856 mlx5_fpga_ipsec_release_sa_ctx() warn: bitwise AND condition is false here kernel test robot
2021-03-11 19:34 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.