DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Crash in FM10k - fm10k_rxtx_vec.c
@ 2017-02-09 11:42 Anthony Hart
  2017-02-09 11:49 ` Van Haaren, Harry
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony Hart @ 2017-02-09 11:42 UTC (permalink / raw)
  To: users


Found a crash in the FM10k vector driver when it tries to send a packet with a VLAN header priority (PCP) field value >= 4.  This results in the FM10k returning the following error.

testpmd> PMD: fm10k_dev_interrupt_handler_pf(): INT: find fault!
PMD: fm10k_dev_handle_fault(): THI_MAL_DIS_Q_FAULT: PF(0) Addr:0x0 Spec: 0x0

The reason is the (pkt->vlan_tci << 16) value gets sign extended and causes illegal values to be written into the TX descriptor.   The following is a patch to fix the issue.  I don’t know what the procedure is for getting this into the fix stream.


--- ./drivers/net/fm10k/fm10k_rxtx_vec.c	2016-11-13 09:28:12.000000000 -0500
+++ ./drivers/net/fm10k/fm10k_rxtx_vec.c.new	2017-02-09 06:37:00.362960064 -0500
@@ -718,7 +718,7 @@ vtx1(volatile struct fm10k_tx_desc *txdp
 		struct rte_mbuf *pkt, uint64_t flags)
 {
 	__m128i descriptor = _mm_set_epi64x(flags << 56 |
-			pkt->vlan_tci << 16 | pkt->data_len,
+                        (uint64_t)(pkt->vlan_tci) << 16 | (uint64_t)pkt->data_len,
 			MBUF_DMA_ADDR(pkt));
 	_mm_store_si128((__m128i *)txdp, descriptor);
 }

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

* Re: [dpdk-users] Crash in FM10k - fm10k_rxtx_vec.c
  2017-02-09 11:42 [dpdk-users] Crash in FM10k - fm10k_rxtx_vec.c Anthony Hart
@ 2017-02-09 11:49 ` Van Haaren, Harry
  0 siblings, 0 replies; 2+ messages in thread
From: Van Haaren, Harry @ 2017-02-09 11:49 UTC (permalink / raw)
  To: Anthony Hart, users

> -----Original Message-----
> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Anthony Hart
> Sent: Thursday, February 9, 2017 11:43 AM
> To: users@dpdk.org
> Subject: [dpdk-users] Crash in FM10k - fm10k_rxtx_vec.c

Hi Anthony,

> Found a crash in the FM10k vector driver when it tries to send a packet with a VLAN header
> priority (PCP) field value >= 4.  This results in the FM10k returning the following error.
> 
> testpmd> PMD: fm10k_dev_interrupt_handler_pf(): INT: find fault!
> PMD: fm10k_dev_handle_fault(): THI_MAL_DIS_Q_FAULT: PF(0) Addr:0x0 Spec: 0x0
> 
> The reason is the (pkt->vlan_tci << 16) value gets sign extended and causes illegal values to
> be written into the TX descriptor.   The following is a patch to fix the issue.

I'm not familiar with the fm10k pmd, but this sounds like something that should be fixed.


> I don’t know
> what the procedure is for getting this into the fix stream.

There is documentation on how to create patches, and submit them to the mailing list:
http://dpdk.org/doc/guides/contributing/patches.html#creating-patches

When sending the patch, CC the fm10k maintainer: Jing Chen <jing.d.chen@intel.com>

Hope that helps, -Harry


> --- ./drivers/net/fm10k/fm10k_rxtx_vec.c	2016-11-13 09:28:12.000000000 -0500
> +++ ./drivers/net/fm10k/fm10k_rxtx_vec.c.new	2017-02-09 06:37:00.362960064 -0500
> @@ -718,7 +718,7 @@ vtx1(volatile struct fm10k_tx_desc *txdp
>  		struct rte_mbuf *pkt, uint64_t flags)
>  {
>  	__m128i descriptor = _mm_set_epi64x(flags << 56 |
> -			pkt->vlan_tci << 16 | pkt->data_len,
> +                        (uint64_t)(pkt->vlan_tci) << 16 | (uint64_t)pkt->data_len,
>  			MBUF_DMA_ADDR(pkt));
>  	_mm_store_si128((__m128i *)txdp, descriptor);
>  }

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

end of thread, other threads:[~2017-02-09 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-09 11:42 [dpdk-users] Crash in FM10k - fm10k_rxtx_vec.c Anthony Hart
2017-02-09 11:49 ` Van Haaren, Harry

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