DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v3] net/ice: faster bit check
@ 2019-02-15 18:13 Paul M Stillwell Jr
  2019-02-18 12:46 ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Paul M Stillwell Jr @ 2019-02-15 18:13 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Jesse Brandeburg, Paul M Stillwell Jr

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

Implement a slightly faster bit check, used for checking
descriptors in the hot path.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
---
v3: really fix checkpatch issues
v2: fixed checkpatch issues
---
 drivers/net/ice/ice_rxtx.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index c794ee8..c01fdaf 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -955,14 +955,13 @@
 static inline uint64_t
 ice_rxd_status_to_pkt_flags(uint64_t qword)
 {
-	uint64_t flags;
-
+	static const uint64_t bitcheck =
+		(ICE_RX_DESC_FLTSTAT_RSS_HASH << ICE_RX_DESC_STATUS_FLTSTAT_S);
 	/* Check if RSS_HASH */
-	flags = (((qword >> ICE_RX_DESC_STATUS_FLTSTAT_S) &
-		  ICE_RX_DESC_FLTSTAT_RSS_HASH) ==
-		 ICE_RX_DESC_FLTSTAT_RSS_HASH) ? PKT_RX_RSS_HASH : 0;
+	if ((qword & bitcheck) == bitcheck)
+		return PKT_RX_RSS_HASH;
 
-	return flags;
+	return 0;
 }
 
 /* Rx L3/L4 checksum */
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH v3] net/ice: faster bit check
  2019-02-15 18:13 [dpdk-dev] [PATCH v3] net/ice: faster bit check Paul M Stillwell Jr
@ 2019-02-18 12:46 ` Zhang, Qi Z
  2019-02-28  2:04   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Qi Z @ 2019-02-18 12:46 UTC (permalink / raw)
  To: Stillwell Jr, Paul M; +Cc: dev, Brandeburg, Jesse



> -----Original Message-----
> From: Stillwell Jr, Paul M
> Sent: Saturday, February 16, 2019 2:13 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Brandeburg, Jesse <jesse.brandeburg@intel.com>; Stillwell Jr,
> Paul M <paul.m.stillwell.jr@intel.com>
> Subject: [PATCH v3] net/ice: faster bit check
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> Implement a slightly faster bit check, used for checking descriptors in the hot
> path.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

* Re: [dpdk-dev] [PATCH v3] net/ice: faster bit check
  2019-02-18 12:46 ` Zhang, Qi Z
@ 2019-02-28  2:04   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-02-28  2:04 UTC (permalink / raw)
  To: Stillwell Jr, Paul M
  Cc: 'dev@dpdk.org', Brandeburg, Jesse, Van Haaren, Harry



> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Monday, February 18, 2019 8:47 PM
> To: Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>
> Cc: dev@dpdk.org; Brandeburg, Jesse <jesse.brandeburg@intel.com>
> Subject: RE: [PATCH v3] net/ice: faster bit check
> 
> 
> 
> > -----Original Message-----
> > From: Stillwell Jr, Paul M
> > Sent: Saturday, February 16, 2019 2:13 AM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; Brandeburg, Jesse <jesse.brandeburg@intel.com>;
> > Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>
> > Subject: [PATCH v3] net/ice: faster bit check
> >
> > From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> >
> > Implement a slightly faster bit check, used for checking descriptors
> > in the hot path.
> >
> > Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> > Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>

The patch is decided to be dropped based on Jesse and Harry's further investigation on the assembly code that compiler generated.
It is removed from dpdk-next-net-intel.

Regards.
Qi

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

end of thread, other threads:[~2019-02-28  2:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15 18:13 [dpdk-dev] [PATCH v3] net/ice: faster bit check Paul M Stillwell Jr
2019-02-18 12:46 ` Zhang, Qi Z
2019-02-28  2:04   ` Zhang, Qi Z

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).