[PATCH v2] net/bnxt: remove duplicate branches and conditions
Stephen Hemminger
stephen at networkplumber.org
Mon Sep 21 17:46:40 CEST 2026
On Sun, 20 Sep 2026 20:17:11 -0600
Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com> wrote:
> From: Dakota Sicher <dakota.sicher at broadcom.com>
>
> Removed ternary operators with identical results and consolidated
> identical branches in bnxt_validate_and_parse_flow_type() and
> bnxt_start_xmit(). The NTUPLE and EM_FLOW variants of several HWRM
> enable-bit and IP address type macros resolve to identical values,
> making the use_ntuple-conditioned ternaries redundant; several
> adjacent if/else-if branches in the Tx checksum-flag dispatch were
> also textually identical (same action for a checksum-combination
> flag and each of its constituent single-flag variants) and have
> been merged.
>
> Signed-off-by: Dakota Sicher <dakota.sicher at broadcom.com>
> Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique at broadcom.com>
> ---
Better AI review flagged minor nit:
[PATCH v2] net/bnxt: remove duplicate branches and conditions
Info: the re-indent of the PKT_TX_OIP_IIP_CKSUM,
RTE_MBUF_F_TX_IP_CKSUM, OUTER_IP_CKSUM and IEEE1588 continuation
lines misaligns them. Drop the whitespace churn.
More information about the dev
mailing list