From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 118DCA0093 for ; Tue, 19 May 2020 15:08:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 05A1F1D633; Tue, 19 May 2020 15:08:43 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id D193B1D633 for ; Tue, 19 May 2020 15:08:40 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id g14so2415019wme.1 for ; Tue, 19 May 2020 06:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FXTY44A3kN9qFlSS7FwrnIUz1w6oLQYYuKSWPzgeg68=; b=Vra9IQRmxpp1O4cv5owsrd9R+P5dz/lwuj4ZmuMBZ1hAI12VURGhXLMWdGmOJ28EBL xGR7qUslZKb72xzFNB2reKRvT/kLca+CgiGyoOtxEeRbP9lH+lgknNmLPN+R6Mts/D5v YbtfeRW7cOX1IFHbyQRplaVRG9K0DYXbINHWyt1D6XZ38sPZDz/0yXSOa0rgyv09o/Hw /N/Jkc2TvNoPFnLEqp8FOMk9TyT1CBwMZjKJUxP/9dzeTkTD7R4tk0HS1pKALREPsshj 1ShBiHD+6D4dhDaQk+eO4jhZ/T6X8AZoiDhXP5IUQMs4wYFj54zTnX01nJZy6+0zraP8 wm/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FXTY44A3kN9qFlSS7FwrnIUz1w6oLQYYuKSWPzgeg68=; b=tToOc8K6bVFV0Y5Kd4CZO2Re2Hjn/8cM03r3WaEZiZ875LwwQ6LJ7hEWeD5goeLd9R DHZmPhoqB1ubuxQMPsBEyfdgyZ8tOBLjYpr6uybKCwwTVZAmL4li2bJKLx9zKZYkcG6M eHUu5U9nVA5fxFWc82rtsMufDIhLlJ7rXY3mOqzHGJKVU6+W0985BMYaEwy8hA58PDSh 1cihN9HLn8/R55ILtGDVLsI3bXRbY4Sw9Fk9eEqtlo/QU0zKOzuVQBYecfhj0puu0FbG srex62WgVlTNyM6ppE+UUwVJSx6aYmu1tbIffKAs1qb7AM6XGG72wiWEXXmEWoWHifkF vv9w== X-Gm-Message-State: AOAM53218KMxFcoNUU4/LOudfV7wItBnzO2aVjFtF3zoXtANjyGh5VvI cOpCN74ZqZTMbXI2WlSue0RCBK0kQ5ZcaZna X-Google-Smtp-Source: ABdhPJwjFjEq8JgmErpZQ8MjPt+GpkHNuF4/FlNFRTCG8vmAPY1+GGIv1GDqykFzpsRkX+Ia8Ly/9A== X-Received: by 2002:a1c:2348:: with SMTP id j69mr5558719wmj.11.1589893720591; Tue, 19 May 2020 06:08:40 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v126sm4085813wmb.4.2020.05.19.06.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:08:39 -0700 (PDT) From: luca.boccassi@gmail.com To: Qi Zhang Cc: Xiaolong Ye , dpdk stable Date: Tue, 19 May 2020 14:03:10 +0100 Message-Id: <20200519130549.112823-55-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ice/base: remove unused code in switch rule' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From af84a4f27830d3355ca2ab25414a398f337e9610 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Tue, 7 Apr 2020 08:25:23 +0800 Subject: [PATCH] net/ice/base: remove unused code in switch rule [ upstream commit 3e1374f201910220bc60e1160994104d1bfc3125 ] Update a switch rule' action from "to VSI" to "to VSI List" should only happen when the same rule has been programmed with a different fwd destination. This is already handled by below code block: m_entry = ice_find_adv_rule_entry(...) if (m_entry) { ... ice_adv_add_update_vsi_list(...) } The following ice_update_pkt_fwd_rule is unnecessary and should be removed due to: 1) If a switch rule's action is still to VSI, which means, it is the first time be issued, we don't need to update it "to VSI List." 2) Actually the implementation does not match the comment, it still update the rule with "to VSI" action. Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe") Signed-off-by: Qi Zhang Acked-by: Xiaolong Ye --- drivers/net/ice/base/ice_switch.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 9c8f20eb0a..944d98522b 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -6241,24 +6241,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, sw->recp_list[rid].adv_rule = true; rule_head = &sw->recp_list[rid].filt_rules; - if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI) { - struct ice_fltr_info tmp_fltr; - - ice_memset(&tmp_fltr, 0, sizeof(tmp_fltr), ICE_NONDMA_MEM); - tmp_fltr.fltr_rule_id = - LE16_TO_CPU(s_rule->pdata.lkup_tx_rx.index); - tmp_fltr.fltr_act = ICE_FWD_TO_VSI; - tmp_fltr.fwd_id.hw_vsi_id = - ice_get_hw_vsi_num(hw, vsi_handle); - tmp_fltr.vsi_handle = vsi_handle; - /* Update the previous switch rule of "forward to VSI" to - * "fwd to VSI list" - */ - status = ice_update_pkt_fwd_rule(hw, &tmp_fltr); - if (status) - goto err_ice_add_adv_rule; + if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI) adv_fltr->vsi_count = 1; - } /* Add rule entry to book keeping list */ LIST_ADD(&adv_fltr->list_entry, rule_head); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:46.750947550 +0100 +++ 0055-net-ice-base-remove-unused-code-in-switch-rule.patch 2020-05-19 14:04:44.200648083 +0100 @@ -1,8 +1,10 @@ -From 3e1374f201910220bc60e1160994104d1bfc3125 Mon Sep 17 00:00:00 2001 +From af84a4f27830d3355ca2ab25414a398f337e9610 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Tue, 7 Apr 2020 08:25:23 +0800 Subject: [PATCH] net/ice/base: remove unused code in switch rule +[ upstream commit 3e1374f201910220bc60e1160994104d1bfc3125 ] + Update a switch rule' action from "to VSI" to "to VSI List" should only happen when the same rule has been programmed with a different fwd destination. This is already handled by below @@ -23,7 +25,6 @@ update the rule with "to VSI" action. Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe") -Cc: stable@dpdk.org Signed-off-by: Qi Zhang Acked-by: Xiaolong Ye @@ -32,10 +33,10 @@ 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c -index b5aa5abd9f..07f8efd651 100644 +index 9c8f20eb0a..944d98522b 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c -@@ -6695,24 +6695,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, +@@ -6241,24 +6241,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, sw->recp_list[rid].adv_rule = true; rule_head = &sw->recp_list[rid].filt_rules;