DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path
@ 2019-11-07  5:21 Leyi Rong
  2019-11-12  1:55 ` Zhang, Qi Z
  2019-11-12  2:42 ` [dpdk-dev] [PATCH v2] " Leyi Rong
  0 siblings, 2 replies; 5+ messages in thread
From: Leyi Rong @ 2019-11-07  5:21 UTC (permalink / raw)
  To: wenzhuo.lu, qi.z.zhang, xiaolong.ye; +Cc: dev, Leyi Rong

Fix iavf vf_checksum_sw case fail in X710/XXV710, set bit2 to 1
of CMD field in Tx descriptor of AVX Tx path according to Spec.

Fixes: af0c246a3800 ("net/iavf: enable AVX2 for iavf")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index f0c00be56..2c7375576 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -785,8 +785,9 @@ iavf_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 	volatile struct iavf_tx_desc *txdp;
 	struct iavf_tx_entry *txep;
 	uint16_t n, nb_commit, tx_id;
-	uint64_t flags = IAVF_TX_DESC_CMD_EOP;
-	uint64_t rs = IAVF_TX_DESC_CMD_RS | IAVF_TX_DESC_CMD_EOP;
+	/* bit2 is reserved and must be set to 1 according to Spec */
+	uint64_t flags = IAVF_TX_DESC_CMD_EOP | 0x04;
+	uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
 
 	/* cross rx_thresh boundary is not allowed */
 	nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path
  2019-11-07  5:21 [dpdk-dev] [PATCH] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path Leyi Rong
@ 2019-11-12  1:55 ` Zhang, Qi Z
  2019-11-12  2:42 ` [dpdk-dev] [PATCH v2] " Leyi Rong
  1 sibling, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2019-11-12  1:55 UTC (permalink / raw)
  To: Rong, Leyi, Lu, Wenzhuo, Ye, Xiaolong; +Cc: dev



> -----Original Message-----
> From: Rong, Leyi <leyi.rong@intel.com>
> Sent: Thursday, November 7, 2019 1:22 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>
> Subject: [PATCH] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path
> 
> Fix iavf vf_checksum_sw case fail in X710/XXV710, set bit2 to 1 of CMD field in
> Tx descriptor of AVX Tx path according to Spec.
> 
> Fixes: af0c246a3800 ("net/iavf: enable AVX2 for iavf")
> 
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> ---
>  drivers/net/iavf/iavf_rxtx_vec_avx2.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
> b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
> index f0c00be56..2c7375576 100644
> --- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
> +++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
> @@ -785,8 +785,9 @@ iavf_xmit_fixed_burst_vec_avx2(void *tx_queue,
> struct rte_mbuf **tx_pkts,
>  	volatile struct iavf_tx_desc *txdp;
>  	struct iavf_tx_entry *txep;
>  	uint16_t n, nb_commit, tx_id;
> -	uint64_t flags = IAVF_TX_DESC_CMD_EOP;
> -	uint64_t rs = IAVF_TX_DESC_CMD_RS | IAVF_TX_DESC_CMD_EOP;
> +	/* bit2 is reserved and must be set to 1 according to Spec */
> +	uint64_t flags = IAVF_TX_DESC_CMD_EOP | 0x04;

Better to use macro IAVF_TX_DESC_CMD_ICRC to replace 0x4

> +	uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
> 
>  	/* cross rx_thresh boundary is not allowed */
>  	nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
> --
> 2.17.1


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

* [dpdk-dev] [PATCH v2] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path
  2019-11-07  5:21 [dpdk-dev] [PATCH] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path Leyi Rong
  2019-11-12  1:55 ` Zhang, Qi Z
@ 2019-11-12  2:42 ` Leyi Rong
  2019-11-12  3:00   ` Zhang, Qi Z
  2019-11-13  2:28   ` Ye Xiaolong
  1 sibling, 2 replies; 5+ messages in thread
From: Leyi Rong @ 2019-11-12  2:42 UTC (permalink / raw)
  To: wenzhuo.lu, qi.z.zhang, xiaolong.ye; +Cc: dev, Leyi Rong

Fix iavf vf_checksum_sw case fail in X710/XXV710, set bit2 to 1
of CMD field in Tx descriptor of AVX Tx path according to Spec.

Fixes: af0c246a3800 ("net/iavf: enable AVX2 for iavf")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>

---
v2:
- Use IAVF_TX_DESC_CMD_ICRC instead of 0x04.
---
 drivers/net/iavf/iavf_rxtx_vec_avx2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index f0c00be56..a5133d8d8 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -785,8 +785,9 @@ iavf_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 	volatile struct iavf_tx_desc *txdp;
 	struct iavf_tx_entry *txep;
 	uint16_t n, nb_commit, tx_id;
-	uint64_t flags = IAVF_TX_DESC_CMD_EOP;
-	uint64_t rs = IAVF_TX_DESC_CMD_RS | IAVF_TX_DESC_CMD_EOP;
+	/* bit2 is reserved and must be set to 1 according to Spec */
+	uint64_t flags = IAVF_TX_DESC_CMD_EOP | IAVF_TX_DESC_CMD_ICRC;
+	uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
 
 	/* cross rx_thresh boundary is not allowed */
 	nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v2] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path
  2019-11-12  2:42 ` [dpdk-dev] [PATCH v2] " Leyi Rong
@ 2019-11-12  3:00   ` Zhang, Qi Z
  2019-11-13  2:28   ` Ye Xiaolong
  1 sibling, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2019-11-12  3:00 UTC (permalink / raw)
  To: Rong, Leyi, Lu, Wenzhuo, Ye, Xiaolong; +Cc: dev



> -----Original Message-----
> From: Rong, Leyi <leyi.rong@intel.com>
> Sent: Tuesday, November 12, 2019 10:42 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: dev@dpdk.org; Rong, Leyi <leyi.rong@intel.com>
> Subject: [PATCH v2] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path
> 
> Fix iavf vf_checksum_sw case fail in X710/XXV710, set bit2 to 1 of CMD field in
> Tx descriptor of AVX Tx path according to Spec.
> 
> Fixes: af0c246a3800 ("net/iavf: enable AVX2 for iavf")
> 
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>

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



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

* Re: [dpdk-dev] [PATCH v2] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path
  2019-11-12  2:42 ` [dpdk-dev] [PATCH v2] " Leyi Rong
  2019-11-12  3:00   ` Zhang, Qi Z
@ 2019-11-13  2:28   ` Ye Xiaolong
  1 sibling, 0 replies; 5+ messages in thread
From: Ye Xiaolong @ 2019-11-13  2:28 UTC (permalink / raw)
  To: Leyi Rong; +Cc: wenzhuo.lu, qi.z.zhang, dev

On 11/12, Leyi Rong wrote:
>Fix iavf vf_checksum_sw case fail in X710/XXV710, set bit2 to 1
>of CMD field in Tx descriptor of AVX Tx path according to Spec.
>
>Fixes: af0c246a3800 ("net/iavf: enable AVX2 for iavf")
>
>Signed-off-by: Leyi Rong <leyi.rong@intel.com>
>
>---
>v2:
>- Use IAVF_TX_DESC_CMD_ICRC instead of 0x04.
>---
> drivers/net/iavf/iavf_rxtx_vec_avx2.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
>index f0c00be56..a5133d8d8 100644
>--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
>+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
>@@ -785,8 +785,9 @@ iavf_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
> 	volatile struct iavf_tx_desc *txdp;
> 	struct iavf_tx_entry *txep;
> 	uint16_t n, nb_commit, tx_id;
>-	uint64_t flags = IAVF_TX_DESC_CMD_EOP;
>-	uint64_t rs = IAVF_TX_DESC_CMD_RS | IAVF_TX_DESC_CMD_EOP;
>+	/* bit2 is reserved and must be set to 1 according to Spec */
>+	uint64_t flags = IAVF_TX_DESC_CMD_EOP | IAVF_TX_DESC_CMD_ICRC;
>+	uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
> 
> 	/* cross rx_thresh boundary is not allowed */
> 	nb_pkts = RTE_MIN(nb_pkts, txq->rs_thresh);
>-- 
>2.17.1
>

Applied to dpdk-next-net-intel, Thanks.

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

end of thread, other threads:[~2019-11-13  2:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07  5:21 [dpdk-dev] [PATCH] net/iavf: set CMD bit2 to 1 in Tx Desc of AVX Tx path Leyi Rong
2019-11-12  1:55 ` Zhang, Qi Z
2019-11-12  2:42 ` [dpdk-dev] [PATCH v2] " Leyi Rong
2019-11-12  3:00   ` Zhang, Qi Z
2019-11-13  2:28   ` Ye Xiaolong

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