DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Vic Wang(BJ-RD)" <VicWang@zhaoxin.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] i40e_xmit_fixed_burst_vec not consider the case rte_mbuf has multiple segments
Date: Wed, 4 Mar 2020 07:18:44 +0000	[thread overview]
Message-ID: <2f84e2418c904f3b8fa56b625c6d7472@zhaoxin.com> (raw)

Hi,

When I study the code of i40e_xmit_pkts_vec in dpdk, I have some questions for the code.
The i40e_xmit_pkts_vec function calls the i40e_xmit_fixed_burst_vec.
I see it just transmits the tx_pkts one by one, but it doesn’t consider the case the tx_pkts have multiple segments.

In the receive routine, there is the i40e_recv_pkts_scattered_vec to cover the case of multiple segments. Then, if the receive packets with multiple segments forword to the tx queue, how to transmit the packet with multiple segments?
I think the i40e_xmit_pkts_vec function cannot cover it.


>uint16_t
>i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
>  uint16_t nb_pkts)
>{
>…
>txq->nb_tx_free = (uint16_t)(txq->nb_tx_free - nb_pkts);
>
>n = (uint16_t)(txq->nb_tx_desc - tx_id);
>if (nb_commit >= n) {
>tx_backlog_entry(txep, tx_pkts, n);
>
>for (i = 0; i < n - 1; ++i, ++tx_pkts, ++txdp)
>vtx1(txdp, *tx_pkts, flags);
>
>vtx1(txdp, *tx_pkts++, rs);
>
>nb_commit = (uint16_t)(nb_commit - n);
>
>tx_id = 0;
>txq->tx_next_rs = (uint16_t)(txq->tx_rs_thresh - 1);
>
>/* avoid reach the end of ring */
>txdp = &txq->tx_ring[tx_id];
>txep = &txq->sw_ring[tx_id];
>}
>
>tx_backlog_entry(txep, tx_pkts, nb_commit);
>
>vtx(txdp, tx_pkts, nb_commit, flags);
>…
}

If there is any insight for the above, thanks for your comment.


Best Regards!
Vic



保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

                 reply	other threads:[~2020-03-04  7:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2f84e2418c904f3b8fa56b625c6d7472@zhaoxin.com \
    --to=vicwang@zhaoxin.com \
    --cc=dev@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).