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 159A043F76; Fri, 3 May 2024 15:59:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A047040DD8; Fri, 3 May 2024 15:58:50 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by mails.dpdk.org (Postfix) with ESMTP id 42BB940DCB for ; Fri, 3 May 2024 15:58:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714744728; x=1746280728; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dePQDzWCecIc5qVMytR5k7/yBC+DFM9dedoM3jAXfY8=; b=YXTRnJjoZ8Nqyrkd6YFKIrkhw6ZploAy1xmJRn71C57yIOJx9sWIW3Dg B6bqxJB1/7RKfATE9NFsMS0G+ZXg7MnOZgeB+YolKgGA3V57nyZddlvHE LYaXcTO4GaTQtaiZq9QsfmQSqCSzfrW+nVzfYrLoFvqAnNYxqhbritNDF N7x2zPZoNpw5P+VxQtLRGgzWY9cHh8aKwtPHRE7Kda0abGkiCaz2FHYk5 uzJKentJVK65lAT+Rycfq0G91u/sJLOhtAw2XWY7LYMlfhOPr2ZwrExCK 6BFPJqOAiRSQchZo6lt/2BoduVXHvbfDZB7F+VEEQq4PIggsMNpLJVrqW A==; X-CSE-ConnectionGUID: C92xvGcUTDuH4/lyIbM7Yg== X-CSE-MsgGUID: cyLJ3Y8KR46qW1rr+9PQrg== X-IronPort-AV: E=McAfee;i="6600,9927,11063"; a="10714948" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10714948" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 06:58:47 -0700 X-CSE-ConnectionGUID: TsVhidirSWGmkrobYY7hlQ== X-CSE-MsgGUID: ccvfQohOSKKvZ47OMkoJAw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="50642013" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa002.fm.intel.com with ESMTP; 03 May 2024 06:58:46 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Piotr Skajewski , bruce.richardson@intel.com, vladimir.medvedkin@intel.com, Michael@dpdk.org, Alice Subject: [PATCH v2 13/27] net/ixgbe/base: handle -Wimplicit-fallthrough Date: Fri, 3 May 2024 14:57:44 +0100 Message-ID: <4f505a9aa0a6fcfa6ce5ecc94632ae7b1b6eb437.1714744628.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Piotr Skajewski As there have been a long list of flaws due to missing "break" statement kernel no longer allow implict fall-through and reports warning during compilation. Convert all "fall-through" comments to actual code. Signed-off-by: Piotr Skajewski Reviewed-by: Michael, Alice --- drivers/net/ixgbe/base/ixgbe_82599.c | 7 +++++-- drivers/net/ixgbe/base/ixgbe_common.c | 8 ++++++-- drivers/net/ixgbe/base/ixgbe_x550.c | 11 +++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c index 73c7766ecf..562034b242 100644 --- a/drivers/net/ixgbe/base/ixgbe_82599.c +++ b/drivers/net/ixgbe/base/ixgbe_82599.c @@ -1719,7 +1719,8 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, case 0x0000: /* mask VLAN ID */ fdirm |= IXGBE_FDIRM_VLANID; - /* fall through */ + fdirm |= IXGBE_FDIRM_VLANP; + break; case 0x0FFF: /* mask VLAN priority */ fdirm |= IXGBE_FDIRM_VLANP; @@ -2009,7 +2010,9 @@ s32 ixgbe_fdir_add_perfect_filter_82599(struct ixgbe_hw *hw, DEBUGOUT(" Error on src/dst port\n"); return IXGBE_ERR_CONFIG; } - /* fall through */ + input_mask->formatted.flow_type = IXGBE_ATR_L4TYPE_IPV6_MASK | + IXGBE_ATR_L4TYPE_MASK; + break; case IXGBE_ATR_FLOW_TYPE_TCPV4: case IXGBE_ATR_FLOW_TYPE_TUNNELED_TCPV4: case IXGBE_ATR_FLOW_TYPE_UDPV4: diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index dd8310748b..27f633bc2f 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -231,7 +231,8 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw) if (ret_val != IXGBE_SUCCESS) goto out; - /* fall through - only backplane uses autoc */ + reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA); + break; case ixgbe_media_type_fiber_qsfp: case ixgbe_media_type_fiber: reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA); @@ -4725,7 +4726,10 @@ void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw, int num_pb, u32 headroom, rxpktsize <<= IXGBE_RXPBSIZE_SHIFT; for (; i < (num_pb / 2); i++) IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize); - /* fall through - configure remaining packet buffers */ + rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT; + for (; i < num_pb; i++) + IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize); + break; case PBA_STRATEGY_EQUAL: rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT; for (; i < num_pb; i++) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index ebfc78235e..29055a818a 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -326,8 +326,7 @@ STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) /* set up for CS4227 usage */ ixgbe_setup_mux_ctl(hw); ixgbe_check_cs4227(hw); - /* Fallthrough */ - + return ixgbe_identify_sfp_module_X550em(hw); case IXGBE_DEV_ID_X550EM_A_SFP_N: return ixgbe_identify_sfp_module_X550em(hw); break; @@ -1838,7 +1837,9 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, break; } } - /* fall through */ + *speed = IXGBE_LINK_SPEED_10GB_FULL | + IXGBE_LINK_SPEED_1GB_FULL; + break; default: *speed = IXGBE_LINK_SPEED_10GB_FULL | IXGBE_LINK_SPEED_1GB_FULL; @@ -3558,7 +3559,9 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) break; } } - /* fall through */ + physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_KR | + IXGBE_PHYSICAL_LAYER_1000BASE_KX; + break; case ixgbe_phy_x550em_xfi: physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_KR | IXGBE_PHYSICAL_LAYER_1000BASE_KX; -- 2.43.0