All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [DPDK] net/ice/base: adjust code order and cleanup coding style
@ 2020-07-13 11:05 Junfeng Guo
  2020-07-13 13:54 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Junfeng Guo @ 2020-07-13 11:05 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, stable, ferruh.yigit, junfeng.guo

Previous logic in removing RSS for GTPU was added in incorrect lines.
The adjustment in this patch will correct the code order so that RSS
for GTPU can be removed successfully.

We also delete the redundant print statement and cleanup the coding
style in this patch.

Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist")
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Cc: stable@dpdk.org
---
 drivers/net/ice/base/ice_flow.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index d1b8a0534..9a17d956b 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -3559,10 +3559,8 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 
 	/* don't do RSS for GTPU outer */
 	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
-	    (segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)) {
-		printf("ignore gtpu\n");
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
 		return ICE_SUCCESS;
-	}
 
 	/* Search for a flow profile that has matching headers, hash fields
 	 * and has the input VSI associated to it. If found, no further
@@ -3714,16 +3712,16 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	if (!segs)
 		return ICE_ERR_NO_MEMORY;
 
-	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
-	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
-		return ICE_SUCCESS;
-
 	/* Construct the packet segment info from the hashed fields */
 	status = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds,
 					   addl_hdrs);
 	if (status)
 		goto out;
 
+	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
+		return ICE_SUCCESS;
+
 	prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
 					vsi_handle,
 					ICE_FLOW_FIND_PROF_CHK_FLDS);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [DPDK] net/ice/base: adjust code order and cleanup coding style
  2020-07-13 11:05 [dpdk-dev] [DPDK] net/ice/base: adjust code order and cleanup coding style Junfeng Guo
@ 2020-07-13 13:54 ` Ferruh Yigit
  2020-07-15  2:23   ` Guo, Junfeng
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2020-07-13 13:54 UTC (permalink / raw)
  To: Junfeng Guo, qi.z.zhang; +Cc: dev, stable

On 7/13/2020 12:05 PM, Junfeng Guo wrote:
> Previous logic in removing RSS for GTPU was added in incorrect lines.
> The adjustment in this patch will correct the code order so that RSS
> for GTPU can be removed successfully.
> 
> We also delete the redundant print statement and cleanup the coding
> style in this patch.
> 
> Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist")
> Cc: stable@dpdk.org
>
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.


Thanks Junfeng for catching this,
This was already fixed in next-net-intel, somehow seems lost in the next-net,
fixed now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [DPDK] net/ice/base: adjust code order and cleanup coding style
  2020-07-13 13:54 ` Ferruh Yigit
@ 2020-07-15  2:23   ` Guo, Junfeng
  0 siblings, 0 replies; 3+ messages in thread
From: Guo, Junfeng @ 2020-07-15  2:23 UTC (permalink / raw)
  To: Yigit, Ferruh, Zhang, Qi Z; +Cc: dev, stable

Thank you, Ferruh!

> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Monday, July 13, 2020 21:55
> To: Guo, Junfeng <junfeng.guo@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [DPDK] net/ice/base: adjust code order and cleanup coding style
> 
> On 7/13/2020 12:05 PM, Junfeng Guo wrote:
> > Previous logic in removing RSS for GTPU was added in incorrect lines.
> > The adjustment in this patch will correct the code order so that RSS
> > for GTPU can be removed successfully.
> >
> > We also delete the redundant print statement and cleanup the coding
> > style in this patch.
> >
> > Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6
> > co-exist")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Applied to dpdk-next-net/master, thanks.
> 
> 
> Thanks Junfeng for catching this,
> This was already fixed in next-net-intel, somehow seems lost in the next-net,
> fixed now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-15  2:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 11:05 [dpdk-dev] [DPDK] net/ice/base: adjust code order and cleanup coding style Junfeng Guo
2020-07-13 13:54 ` Ferruh Yigit
2020-07-15  2:23   ` Guo, Junfeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.