From: kernel test robot <lkp@intel.com>
To: Bharat Bhushan <bbhushan2@marvell.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
hkelam@marvell.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, jerinj@marvell.com,
lcherian@marvell.com, richardcochran@gmail.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Bharat Bhushan <bbhushan2@marvell.com>
Subject: Re: [net-next,v2 5/8] cn10k-ipsec: Add SA add/delete support for outb inline ipsec
Date: Tue, 14 May 2024 16:15:06 +0800 [thread overview]
Message-ID: <202405141559.4cP9LvuS-lkp@intel.com> (raw)
In-Reply-To: <20240513105446.297451-6-bbhushan2@marvell.com>
Hi Bharat,
kernel test robot noticed the following build warnings:
[auto build test WARNING on next-20240513]
[cannot apply to linus/master horms-ipvs/master v6.9 v6.9-rc7 v6.9-rc6 v6.9]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Bharat-Bhushan/octeontx2-pf-map-skb-data-as-device-writeable/20240513-185803
base: next-20240513
patch link: https://lore.kernel.org/r/20240513105446.297451-6-bbhushan2%40marvell.com
patch subject: [net-next,v2 5/8] cn10k-ipsec: Add SA add/delete support for outb inline ipsec
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240514/202405141559.4cP9LvuS-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project b910bebc300dafb30569cecc3017b446ea8eafa0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240514/202405141559.4cP9LvuS-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405141559.4cP9LvuS-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:7:
In file included from include/net/xfrm.h:9:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:10:
In file included from include/linux/mm.h:2253:
include/linux/vmstat.h:500:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
500 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
501 | item];
| ~~~~
include/linux/vmstat.h:507:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
507 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
508 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:519:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
519 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
520 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:528:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
528 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
529 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:7:
In file included from include/net/xfrm.h:9:
In file included from include/linux/skbuff.h:28:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:93:
include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
548 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
561 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
| ^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
| ^
In file included from drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:7:
In file included from include/net/xfrm.h:9:
In file included from include/linux/skbuff.h:28:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:93:
include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
574 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
| ^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
| ^
In file included from drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:7:
In file included from include/net/xfrm.h:9:
In file included from include/linux/skbuff.h:28:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:93:
include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
585 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
595 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
605 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:693:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
693 | readsb(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:701:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
701 | readsw(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:709:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
709 | readsl(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:718:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
718 | writesb(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:727:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
727 | writesw(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:736:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
736 | writesl(PCI_IOBASE + addr, buffer, count);
| ~~~~~~~~~~ ^
>> drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:681:6: warning: variable 'pf' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
681 | if (x->xso.dir == XFRM_DEV_OFFLOAD_IN) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:721:16: note: uninitialized use occurs here
721 | mutex_unlock(&pf->ipsec.lock);
| ^~
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:681:2: note: remove the 'if' if its condition is always false
681 | if (x->xso.dir == XFRM_DEV_OFFLOAD_IN) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
682 | netdev_err(netdev, "xfrm inbound offload not supported\n");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
683 | err = -ENODEV;
| ~~~~~~~~~~~~~~
684 | } else {
| ~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:674:21: note: initialize the variable 'pf' to silence this warning
674 | struct otx2_nic *pf;
| ^
| = NULL
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c:768:33: warning: unused variable 'cn10k_ipsec_xfrmdev_ops' [-Wunused-const-variable]
768 | static const struct xfrmdev_ops cn10k_ipsec_xfrmdev_ops = {
| ^~~~~~~~~~~~~~~~~~~~~~~
19 warnings generated.
vim +681 drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c
667
668 static int cn10k_ipsec_add_state(struct xfrm_state *x,
669 struct netlink_ext_ack *extack)
670 {
671 struct net_device *netdev = x->xso.dev;
672 struct cn10k_tx_sa_s *sa_entry;
673 struct cpt_ctx_info_s *sa_info;
674 struct otx2_nic *pf;
675 int err;
676
677 err = cn10k_ipsec_validate_state(x);
678 if (err)
679 return err;
680
> 681 if (x->xso.dir == XFRM_DEV_OFFLOAD_IN) {
682 netdev_err(netdev, "xfrm inbound offload not supported\n");
683 err = -ENODEV;
684 } else {
685 pf = netdev_priv(netdev);
686 if (!mutex_trylock(&pf->ipsec.lock)) {
687 netdev_err(netdev, "IPSEC device is busy\n");
688 return -EBUSY;
689 }
690
691 if (!(pf->flags & OTX2_FLAG_INLINE_IPSEC_ENABLED)) {
692 netdev_err(netdev, "IPSEC not enabled/supported on device\n");
693 err = -ENODEV;
694 goto unlock;
695 }
696
697 sa_entry = cn10k_outb_alloc_sa(pf);
698 if (!sa_entry) {
699 netdev_err(netdev, "SA maximum limit %x reached\n",
700 CN10K_IPSEC_OUTB_MAX_SA);
701 err = -EBUSY;
702 goto unlock;
703 }
704
705 cn10k_outb_prepare_sa(x, sa_entry);
706
707 err = cn10k_outb_write_sa(pf, sa_entry);
708 if (err) {
709 netdev_err(netdev, "Error writing outbound SA\n");
710 cn10k_outb_free_sa(pf, sa_entry);
711 goto unlock;
712 }
713
714 sa_info = kmalloc(sizeof(*sa_info), GFP_KERNEL);
715 sa_info->sa_entry = sa_entry;
716 sa_info->sa_iova = cn10k_outb_get_sa_iova(pf, sa_entry);
717 x->xso.offload_handle = (unsigned long)sa_info;
718 }
719
720 unlock:
721 mutex_unlock(&pf->ipsec.lock);
722 return err;
723 }
724
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-05-14 8:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 10:54 [net-next,v2 0/8] cn10k-ipsec: Add outbound inline ipsec support Bharat Bhushan
2024-05-13 10:54 ` [net-next,v2 1/8] octeontx2-pf: map skb data as device writeable Bharat Bhushan
2024-05-13 10:54 ` [net-next,v2 2/8] octeontx2-pf: Move skb fragment map/unmap to common code Bharat Bhushan
2024-05-13 10:54 ` [net-next,v2 3/8] octeontx2-af: Disable backpressure between CPT and NIX Bharat Bhushan
2024-05-13 16:14 ` Simon Horman
2024-05-14 6:39 ` [EXTERNAL] " Bharat Bhushan
2024-05-14 10:41 ` Simon Horman
2024-05-14 11:26 ` Bharat Bhushan
2024-05-14 11:45 ` Simon Horman
2024-05-13 10:54 ` [net-next,v2 4/8] cn10k-ipsec: Initialize crypto hardware for outb inline ipsec Bharat Bhushan
2024-05-13 10:54 ` [net-next,v2 5/8] cn10k-ipsec: Add SA add/delete support " Bharat Bhushan
2024-05-13 16:51 ` Simon Horman
2024-05-14 6:52 ` [EXTERNAL] " Bharat Bhushan
2024-05-14 10:46 ` Simon Horman
2024-05-14 8:15 ` kernel test robot [this message]
2024-05-13 10:54 ` [net-next,v2 6/8] cn10k-ipsec: Process inline ipsec transmit offload Bharat Bhushan
2024-05-13 10:54 ` [net-next,v2 7/8] cn10k-ipsec: Allow inline ipsec offload for skb with SA Bharat Bhushan
2024-05-13 10:54 ` [net-next,v2 8/8] cn10k-ipsec: Enable outbound inline ipsec offload Bharat Bhushan
2024-05-13 12:22 ` [net-next,v2 0/8] cn10k-ipsec: Add outbound inline ipsec support Kalesh Anakkur Purayil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202405141559.4cP9LvuS-lkp@intel.com \
--to=lkp@intel.com \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.