Content-Type: multipart/mixed; boundary="===============3061447644513574042==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [RFC v2 12/16] net: atlantic: MACSec egress offload implementation Date: Sun, 22 Mar 2020 06:51:44 +0800 Message-ID: <202003220642.IaLp7VD0%lkp@intel.com> In-Reply-To: <20200310150342.1701-13-irusskikh@marvell.com> List-Id: --===============3061447644513574042== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Igor, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on net/master] [also build test WARNING on linus/master v5.6-rc6] [cannot apply to net-next/master next-20200320] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Igor-Russkikh/net-atlantic= -MACSec-support-for-AQC-devices/20200311-042119 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 23620= 59427494b9e318161f0447a10dc5513b2c3 If you fix the issue, kindly add following tag Reported-by: kbuild test robot smatch warnings: drivers/net/ethernet/aquantia/atlantic/aq_macsec.c:697 aq_check_txsa_expira= tion() warn: unsigned 'txsc_idx' is never less than zero. vim +/txsc_idx +697 drivers/net/ethernet/aquantia/atlantic/aq_macsec.c 668 = 669 static void aq_check_txsa_expiration(struct aq_nic_s *nic) 670 { 671 u32 egress_sa_expired, egress_sa_threshold_expired; 672 struct aq_macsec_cfg *cfg =3D nic->macsec_cfg; 673 unsigned int sc_idx =3D 0, txsc_idx =3D 0; 674 struct aq_hw_s *hw =3D nic->aq_hw; 675 struct aq_macsec_txsc *aq_txsc; 676 const struct macsec_secy *secy; 677 enum aq_macsec_sc_sa sc_sa; 678 struct macsec_tx_sa *tx_sa; 679 unsigned char an =3D 0; 680 int ret; 681 int i; 682 = 683 sc_sa =3D cfg->sc_sa; 684 = 685 ret =3D aq_mss_get_egress_sa_expired(hw, &egress_sa_expired); 686 if (unlikely(ret)) 687 return; 688 = 689 ret =3D aq_mss_get_egress_sa_threshold_expired(hw, 690 &egress_sa_threshold_expired); 691 = 692 for (i =3D 0; i < AQ_MACSEC_MAX_SA; i++) { 693 if (egress_sa_expired & BIT(i)) { 694 an =3D aq_sa_from_sa_idx(sc_sa, i); 695 sc_idx =3D aq_sc_idx_from_sa_idx(sc_sa, i); 696 txsc_idx =3D aq_get_txsc_idx_from_sc_idx(sc_sa, sc_idx); > 697 if (txsc_idx < 0) 698 continue; 699 = 700 aq_txsc =3D &cfg->aq_txsc[txsc_idx]; 701 if (!(cfg->txsc_idx_busy & BIT(txsc_idx))) { 702 netdev_warn(nic->ndev, 703 "PN threshold expired on invalid TX SC"); 704 continue; 705 } 706 = 707 secy =3D aq_txsc->sw_secy; 708 if (!netif_running(secy->netdev)) { 709 netdev_warn(nic->ndev, 710 "PN threshold expired on down TX SC"); 711 continue; 712 } 713 = 714 if (unlikely(!(aq_txsc->tx_sa_idx_busy & BIT(an)))) { 715 netdev_warn(nic->ndev, 716 "PN threshold expired on invalid TX SA"); 717 continue; 718 } 719 = 720 tx_sa =3D rcu_dereference_bh(secy->tx_sc.sa[an]); 721 macsec_pn_wrapped((struct macsec_secy *)secy, tx_sa); 722 } 723 } 724 = 725 aq_mss_set_egress_sa_expired(hw, egress_sa_expired); 726 if (likely(!ret)) 727 aq_mss_set_egress_sa_threshold_expired(hw, 728 egress_sa_threshold_expired); 729 } 730 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3061447644513574042==--