From: "Qiu, Michael" <michael.qiu@intel.com>
To: "Chen, Jing D" <jing.d.chen@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "He, Shaopeng" <shaopeng.he@intel.com>
Subject: Re: [dpdk-dev] [PATCH 3/6] fm10k: Fix data integrity issue with multi-segment frame
Date: Tue, 16 Jun 2015 12:07:19 +0000 [thread overview]
Message-ID: <533710CFB86FA344BFBF2D6802E602860469C48C@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1432887044-24777-4-git-send-email-jing.d.chen@intel.com>
Tested-by: Michael Qiu <michael.qiu@intel.com>
- OS: Fedora20 3.11.10-301
- GCC: gcc version 4.8.3 2014911
- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
- NIC: Ethernet controller: Intel Corporation Device 15a4 (rev 01)
- Default x86_64-native-linuxapp-gcc configuration
- Total 5 cases, 5 passed, 0 failed
- Case: Normal frames with no jumbo frame support
- Case: Jumbo frames with no jumbo frame support
- Case: Normal frames with jumbo frame support
- Case: Jumbo frames with jumbo frame support
- Case: Frames bigger than jumbo frames, wwith jumbo frame support
On 5/29/2015 4:11 PM, Chen, Jing D wrote:
> From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>
>
> In TX side, bit FM10K_TXD_FLAG_LAST in TX descriptor only is set
> in the last descriptor for multi-segment packets. But current
> implementation didn't set all the fields of TX descriptor, which
> will cause descriptors processed now to re-use fields set in last
> scroll. If FM10K_TXD_FLAG_LAST bit was set in the last round and
> it happened this is not the last descriptor of a multi-segnment
> packet, HW will send out the incomplete packet out and leads to
> data intergrity issue.
>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
> ---
> drivers/net/fm10k/fm10k_rxtx.c | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
> index 56df6cd..f5d1ad0 100644
> --- a/drivers/net/fm10k/fm10k_rxtx.c
> +++ b/drivers/net/fm10k/fm10k_rxtx.c
> @@ -402,9 +402,9 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)
> q->nb_used = q->nb_used + mb->nb_segs;
> }
>
> - q->hw_ring[last_id].flags = flags;
> q->nb_free -= mb->nb_segs;
>
> + q->hw_ring[q->next_free].flags = 0;
> /* set checksum flags on first descriptor of packet. SCTP checksum
> * offload is not supported, but we do not explicitly check for this
> * case in favor of greatly simplified processing. */
> @@ -415,16 +415,27 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)
> if (mb->ol_flags & PKT_TX_VLAN_PKT)
> q->hw_ring[q->next_free].vlan = mb->vlan_tci;
>
> + q->sw_ring[q->next_free] = mb;
> + q->hw_ring[q->next_free].buffer_addr =
> + rte_cpu_to_le_64(MBUF_DMA_ADDR(mb));
> + q->hw_ring[q->next_free].buflen =
> + rte_cpu_to_le_16(rte_pktmbuf_data_len(mb));
> + if (++q->next_free == q->nb_desc)
> + q->next_free = 0;
> +
> /* fill up the rings */
> - for (; mb != NULL; mb = mb->next) {
> + for (mb = mb->next; mb != NULL; mb = mb->next) {
> q->sw_ring[q->next_free] = mb;
> q->hw_ring[q->next_free].buffer_addr =
> rte_cpu_to_le_64(MBUF_DMA_ADDR(mb));
> q->hw_ring[q->next_free].buflen =
> rte_cpu_to_le_16(rte_pktmbuf_data_len(mb));
> + q->hw_ring[q->next_free].flags = 0;
> if (++q->next_free == q->nb_desc)
> q->next_free = 0;
> }
> +
> + q->hw_ring[last_id].flags = flags;
> }
>
> uint16_t
next prev parent reply other threads:[~2015-06-16 12:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 8:10 [dpdk-dev] [PATCH 0/6] fm10k: A series of bug fixes Chen Jing D(Mark)
2015-05-29 8:10 ` [dpdk-dev] [PATCH 1/6] fm10k: Fix improper RX buffer size assignment Chen Jing D(Mark)
2015-06-16 11:55 ` Qiu, Michael
2015-05-29 8:10 ` [dpdk-dev] [PATCH 2/6] fm10k: Fix jumbo frame issue Chen Jing D(Mark)
2015-06-12 1:15 ` Qiu, Michael
2015-05-29 8:10 ` [dpdk-dev] [PATCH 3/6] fm10k: Fix data integrity issue with multi-segment frame Chen Jing D(Mark)
2015-06-16 12:07 ` Qiu, Michael [this message]
2015-05-29 8:10 ` [dpdk-dev] [PATCH 4/6] fm10k: Fix issue that MAC addr can't be set to silicon Chen Jing D(Mark)
2015-06-09 16:23 ` Qiu, Michael
2015-06-10 5:34 ` Chen, Jing D
2015-06-12 2:03 ` Qiu, Michael
2015-05-29 8:10 ` [dpdk-dev] [PATCH 5/6] fm10k: Do sanity check on mac address Chen Jing D(Mark)
2015-06-16 12:08 ` Qiu, Michael
2015-05-29 8:10 ` [dpdk-dev] [PATCH 6/6] fm10k: Add default mac/vlan filter to SM Chen Jing D(Mark)
2015-06-08 2:39 ` [dpdk-dev] [PATCH 0/6] fm10k: A series of bug fixes He, Shaopeng
2015-06-09 15:21 ` Qiu, Michael
2015-06-22 13:55 ` Thomas Monjalon
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=533710CFB86FA344BFBF2D6802E602860469C48C@SHSMSX101.ccr.corp.intel.com \
--to=michael.qiu@intel.com \
--cc=dev@dpdk.org \
--cc=jing.d.chen@intel.com \
--cc=shaopeng.he@intel.com \
/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).