From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: qiming.yang@intel.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/ice/base: remove unnecessary code
Date: Wed, 8 Apr 2020 15:02:37 +0800 [thread overview]
Message-ID: <20200408070237.GA64243@intel.com> (raw)
In-Reply-To: <20200407002523.37881-1-qi.z.zhang@intel.com>
On 04/07, Qi Zhang wrote:
>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")
>Cc: stable@dpdk.org
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
> 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 b5aa5abd9..07f8efd65 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,
> 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.13.6
>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel, Thanks.
next prev parent reply other threads:[~2020-04-08 7:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 0:25 Qi Zhang
2020-04-08 7:02 ` Ye Xiaolong [this message]
2021-05-10 3:21 Qi Zhang
2021-05-10 3:23 Qi Zhang
2021-05-10 5:02 ` Yang, Qiming
2021-05-10 5:44 ` Zhang, Qi Z
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=20200408070237.GA64243@intel.com \
--to=xiaolong.ye@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@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).