From: Chengchang Tang Date: Tue, 22 Sep 2020 12:03:15 +0000 (+0800) Subject: net/hns3: add default case to switch in Rx VLAN processing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e788224747b3f8e7b19c028b545df0814b2b2d4a;p=dpdk.git net/hns3: add default case to switch in Rx VLAN processing This patch solves the static check warning as follow: "The switch statement must have a 'default' branch". Signed-off-by: Chengchang Tang Signed-off-by: Wei Hu (Xavier) --- diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index cf55d94123..6d02bad5e4 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -1618,6 +1618,9 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb, mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; mb->vlan_tci = rte_le_to_cpu_16(rxd->rx.ot_vlan_tag); return; + default: + mb->vlan_tci = 0; + return; } }