From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C96EC46AE7; Thu, 3 Jul 2025 18:51:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83A4640267; Thu, 3 Jul 2025 18:51:14 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 1DF6C40264 for ; Thu, 3 Jul 2025 18:51:13 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 1811146AE8; Thu, 3 Jul 2025 18:51:13 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [DPDK/ethdev Bug 1739] net/cnxk: identincal code in branches Date: Thu, 03 Jul 2025 16:51:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: stephen@networkplumber.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: multipart/alternative; boundary=17515614720.0EfcF.1301070 Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --17515614720.0EfcF.1301070 Date: Thu, 3 Jul 2025 18:51:12 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All https://bugs.dpdk.org/show_bug.cgi?id=3D1739 Bug ID: 1739 Summary: net/cnxk: identincal code in branches Product: DPDK Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: minor Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: stephen@networkplumber.org Target Milestone: --- Enabling compiler flag to detect identical branches in conditional finds: [228/3418] Compiling C object drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_cpt.c.o ../drivers/common/cnxk/roc_cpt.c: In function =E2=80=98cpt_get_blkaddr=E2= =80=99: ../drivers/common/cnxk/roc_cpt.c:677:12: warning: this condition has identi= cal branches [-Wduplicated-branches] 677 | if (dev_is_vf(dev)) | ^ uint64_t cpt_get_blkaddr(struct dev *dev) { uint64_t reg; uint64_t off; /* Reading the discovery register to know which CPT is the LF * attached to. Assume CPT LF's of only one block are attached * to a pffunc. */ if (dev_is_vf(dev)) off =3D RVU_VF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_CPT1); else off =3D RVU_PF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_CPT1); And many more. [243/3418] Compiling C object drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_nix_inl_dev.c.o ../drivers/common/cnxk/roc_nix_inl_dev.c: In function =E2=80=98nix_inl_nix_= setup=E2=80=99: ../drivers/common/cnxk/roc_nix_inl_dev.c:833:17: warning: this condition has identical branches [-Wduplicated-branches] 833 | else if (roc_model_is_cn10k()) | ^ [246/3418] Compiling C object drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_nix_inl.c.o ../drivers/common/cnxk/roc_nix_inl.c: In function =E2=80=98nix_inl_inb_ipsec_sa_tbl_setup=E2=80=99: ../drivers/common/cnxk/roc_nix_inl.c:426:17: warning: this condition has identical branches [-Wduplicated-branches] 426 | else if (roc_model_is_cn10k()) | ^ ../drivers/common/cnxk/roc_nix_inl.c: In function =E2=80=98nix_inl_eng_caps= _get=E2=80=99: ../drivers/common/cnxk/roc_nix_inl.c:1215:12: warning: this condition has identical branches [-Wduplicated-branches] 1215 | if (roc_model_is_cn9k() || roc_model_is_cn10k()) | ^ ../drivers/common/cnxk/roc_nix_inl.c: In function =E2=80=98roc_nix_inl_outb= _init=E2=80=99: ../drivers/common/cnxk/roc_nix_inl.c:1616:17: warning: this condition has identical branches [-Wduplicated-branches] 1616 | else if (roc_model_is_cn10k()) | ^ [260/3418] Compiling C object drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_nix_queue.c.o ../drivers/common/cnxk/roc_nix_queue.c: In function =E2=80=98roc_nix_cq_ini= t=E2=80=99: ../drivers/common/cnxk/roc_nix_queue.c:1290:90: warning: this condition has identical branches [-Wduplicated-branches] 1290 | cq_ctx->lbp_frac =3D force_tail_drop ? NIX_CQ_LBP_THRESH_FRAC_REF1 : | --=20 You are receiving this mail because: You are the assignee for the bug.= --17515614720.0EfcF.1301070 Date: Thu, 3 Jul 2025 18:51:12 +0200 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All
Bug ID 1739
Summary net/cnxk: identincal code in branches
Product DPDK
Version unspecified
Hardware All
OS All
Status UNCONFIRMED
Severity minor
Priority Normal
Component ethdev
Assignee dev@dpdk.org
Reporter stephen@networkplumber.org
Target Milestone ---

Enabling compiler flag to detect i=
dentical branches in conditional finds:

[228/3418] Compiling C object
drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_cpt.c.o
../drivers/common/cnxk/roc_cpt.c: In function =E2=80=98cpt_get_blkaddr=E2=
=80=99:
../drivers/common/cnxk/roc_cpt.c:677:12: warning: this condition has identi=
cal
branches [-Wduplicated-branches]
  677 |         if (dev_is_vf(dev))
      |            ^


uint64_t
cpt_get_blkaddr(struct dev *dev)
{
        uint64_t reg;
        uint64_t off;

        /* Reading the discovery register to know which CPT is the LF
         * attached to. Assume CPT LF's of only one block are attached
         * to a pffunc.
         */
        if (dev_is_vf(dev))
                off =3D RVU_VF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_CPT1);
        else
                off =3D RVU_PF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_CPT1);

And many more.


[243/3418] Compiling C object
drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_nix_inl_dev.c.o
../drivers/common/cnxk/roc_nix_inl_dev.c: In function =E2=80=98nix_inl_nix_=
setup=E2=80=99:
../drivers/common/cnxk/roc_nix_inl_dev.c:833:17: warning: this condition has
identical branches [-Wduplicated-branches]
  833 |         else if (roc_model_is_cn10k())
      |                 ^
[246/3418] Compiling C object
drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_nix_inl.c.o
../drivers/common/cnxk/roc_nix_inl.c: In function
=E2=80=98nix_inl_inb_ipsec_sa_tbl_setup=E2=80=99:
../drivers/common/cnxk/roc_nix_inl.c:426:17: warning: this condition has
identical branches [-Wduplicated-branches]
  426 |         else if (roc_model_is_cn10k())
      |                 ^
../drivers/common/cnxk/roc_nix_inl.c: In function =E2=80=98nix_inl_eng_caps=
_get=E2=80=99:
../drivers/common/cnxk/roc_nix_inl.c:1215:12: warning: this condition has
identical branches [-Wduplicated-branches]
 1215 |         if (roc_model_is_cn9k() || roc_model_is_cn10k())
      |            ^
../drivers/common/cnxk/roc_nix_inl.c: In function =E2=80=98roc_nix_inl_outb=
_init=E2=80=99:
../drivers/common/cnxk/roc_nix_inl.c:1616:17: warning: this condition has
identical branches [-Wduplicated-branches]
 1616 |         else if (roc_model_is_cn10k())
      |                 ^
[260/3418] Compiling C object
drivers/libtmp_rte_common_cnxk.a.p/common_cnxk_roc_nix_queue.c.o
../drivers/common/cnxk/roc_nix_queue.c: In function =E2=80=98roc_nix_cq_ini=
t=E2=80=99:
../drivers/common/cnxk/roc_nix_queue.c:1290:90: warning: this condition has
identical branches [-Wduplicated-branches]
 1290 |                         cq_ctx->lbp_frac =3D force_tail_drop ?
NIX_CQ_LBP_THRESH_FRAC_REF1 :
      |
          


You are receiving this mail because:
  • You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
= --17515614720.0EfcF.1301070--