DPDK usage discussions
 help / color / mirror / Atom feed
From: Anthony Hart <ahart@domainhart.com>
To: users@dpdk.org
Subject: [dpdk-users] Crash in FM10k - fm10k_rxtx_vec.c
Date: Thu, 9 Feb 2017 06:42:50 -0500	[thread overview]
Message-ID: <BDFEB456-6E8A-4659-A361-FCCECB94F993@domainhart.com> (raw)


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);
 }

             reply	other threads:[~2017-02-09 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 11:42 Anthony Hart [this message]
2017-02-09 11:49 ` Van Haaren, Harry

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=BDFEB456-6E8A-4659-A361-FCCECB94F993@domainhart.com \
    --to=ahart@domainhart.com \
    --cc=users@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).