From: Helin Zhang Date: Tue, 24 May 2016 06:23:01 +0000 (+0800) Subject: net/i40e/base: fix error with mirror rule ID 0 X-Git-Tag: spdx-start~6513 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7465e2f69d6a7dc49eb5da11867e9ccb2e1854bd;p=dpdk.git net/i40e/base: fix error with mirror rule ID 0 Remove a problematic mirror rule ID check. The check returned an error if the mirror rule ID is 0, which is a valid value. Fixes: 0bf2dbbe077c ("i40e/base: support mirroring rules") Signed-off-by: Helin Zhang Acked-by: Wenzhuo Lu --- diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ace5b8498a..ef6b270c4a 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3042,10 +3042,7 @@ enum i40e_status_code i40e_aq_delete_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 *rules_used, u16 *rules_free) { /* Rule ID has to be valid except rule_type: INGRESS VLAN mirroring */ - if (rule_type != I40E_AQC_MIRROR_RULE_TYPE_VLAN) { - if (!rule_id) - return I40E_ERR_PARAM; - } else { + if (rule_type == I40E_AQC_MIRROR_RULE_TYPE_VLAN) { /* count and mr_list shall be valid for rule_type INGRESS VLAN * mirroring. For other rule_type, count and rule_type should * not matter.