DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] i40e_xmit_fixed_burst_vec not consider the case rte_mbuf has multiple segments
@ 2020-03-04  7:18 Vic Wang(BJ-RD)
  0 siblings, 0 replies; only message in thread
From: Vic Wang(BJ-RD) @ 2020-03-04  7:18 UTC (permalink / raw)
  To: dev

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-04  7:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04  7:18 [dpdk-dev] i40e_xmit_fixed_burst_vec not consider the case rte_mbuf has multiple segments Vic Wang(BJ-RD)

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