From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases
Date: Fri, 18 May 2018 07:39:55 -0700 [thread overview]
Message-ID: <20180518144001.24801-2-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20180518144001.24801-1-ajit.khaparde@broadcom.com>
The FALLTHROUGH comment for cascading switch cases was missing in
a few places. This patch adds that.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 1 +
drivers/net/bnxt/bnxt_ethdev.c | 3 +++
drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
drivers/net/bnxt/bnxt_rxq.c | 1 +
4 files changed, 9 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 8dde8cc0f..7b4f9a14b 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -27,6 +27,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
+ /* FALLTHROUGH */
bnxt_link_update_op(bp->eth_dev, 1);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9edcc7b7d..f7f23f75a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2432,6 +2432,7 @@ bnxt_fdir_filter(struct rte_eth_dev *dev,
switch (filter_op) {
case RTE_ETH_FILTER_ADD:
case RTE_ETH_FILTER_DELETE:
+ /* FALLTHROUGH */
filter = bnxt_get_unused_filter(bp);
if (filter == NULL) {
PMD_DRV_LOG(ERR,
@@ -2897,6 +2898,7 @@ static bool bnxt_dir_type_is_ape_bin_format(uint16_t dir_type)
case BNX_DIR_TYPE_KONG_PATCH:
case BNX_DIR_TYPE_BONO_FW:
case BNX_DIR_TYPE_BONO_PATCH:
+ /* FALLTHROUGH */
return true;
}
@@ -2915,6 +2917,7 @@ static bool bnxt_dir_type_is_other_exec_format(uint16_t dir_type)
case BNX_DIR_TYPE_ISCSI_BOOT:
case BNX_DIR_TYPE_ISCSI_BOOT_IPV6:
case BNX_DIR_TYPE_ISCSI_BOOT_IPV4N6:
+ /* FALLTHROUGH */
return true;
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d975cb87d..28aa7476d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2002,6 +2002,7 @@ static uint16_t bnxt_parse_eth_link_duplex(uint32_t conf_link_speed)
switch (conf_link_speed) {
case ETH_LINK_SPEED_10M_HD:
case ETH_LINK_SPEED_100M_HD:
+ /* FALLTHROUGH */
return HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF;
}
return hw_link_duplex;
@@ -2022,6 +2023,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed)
switch (conf_link_speed & ~ETH_LINK_SPEED_FIXED) {
case ETH_LINK_SPEED_100M:
case ETH_LINK_SPEED_100M_HD:
+ /* FALLTHROUGH */
eth_link_speed =
HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100MB;
break;
@@ -2186,6 +2188,7 @@ static uint16_t bnxt_parse_hw_link_duplex(uint16_t hw_link_duplex)
switch (hw_link_duplex) {
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH:
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_FULL:
+ /* FALLTHROUGH */
eth_link_duplex = ETH_LINK_FULL_DUPLEX;
break;
case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF:
@@ -2315,6 +2318,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp)
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0:
+ /* FALLTHROUGH */
bp->port_partition_type = resp->port_partition_type;
break;
default:
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 866fb56b1..c55ddec4b 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -77,6 +77,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
switch (dev_conf->rxmode.mq_mode) {
case ETH_MQ_RX_VMDQ_RSS:
case ETH_MQ_RX_VMDQ_ONLY:
+ /* FALLTHROUGH */
/* ETH_8/64_POOLs */
pools = conf->nb_queue_pools;
/* For each pool, allocate MACVLAN CFA rule & VNIC */
--
2.15.1 (Apple Git-101)
next prev parent reply other threads:[~2018-05-18 14:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
2018-05-18 14:39 ` Ajit Khaparde [this message]
2018-05-18 14:39 ` [dpdk-dev] [PATCH 2/7] net/bnxt: fix to initialize tx and rx burst for secondary processes Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 3/7] net/bnxt: fix rss hash configuration Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 4/7] net/bnxt: fix to use 1st completion ring for forwarding and async events Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-18 17:01 ` [dpdk-dev] [PATCH 0/7] bnxt patchset Ferruh Yigit
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: add fallthrough comment Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 2/7] net/bnxt: fix Tx and Rx burst for secondary processes Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 3/7] net/bnxt: fix RSS hash configuration Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 4/7] net/bnxt: fix to use 1st cmpl ring for fwd and async event Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
2018-05-22 18:13 ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-22 20:42 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ferruh Yigit
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=20180518144001.24801-2-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).