From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fm2nodo1.polito.it (fm2nodo1.polito.it [130.192.180.17]) by dpdk.org (Postfix) with ESMTP id F276A1B149 for ; Tue, 16 Oct 2018 18:23:13 +0200 (CEST) Received: from polito.it (frontmail1.polito.it [130.192.180.41]) by fm2nodo1.polito.it with ESMTP id w9GGNDwo008213-w9GGNDwq008213 (version=TLSv1.0 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=CAFAIL) for ; Tue, 16 Oct 2018 18:23:13 +0200 X-ExtScanner: Niversoft's FindAttachments (free) Received: from mail-oi1-f175.google.com (account d033818@polito.it [209.85.167.175] verified) by polito.it (CommuniGate Pro SMTP 6.2.5) with ESMTPSA id 144625954 for users@dpdk.org; Tue, 16 Oct 2018 18:23:13 +0200 Received: by mail-oi1-f175.google.com with SMTP id e17-v6so18549020oig.12 for ; Tue, 16 Oct 2018 09:23:13 -0700 (PDT) X-Gm-Message-State: ABuFfoizwK6koLK4SwRHW4exid3WuvkHcLHEvMmbX+F6u9tsoNo9jqTe KAwWVWemEuvGKXCCFxWrRnYLLQxJKpeu9bvDiS8= X-Google-Smtp-Source: ACcGV62ChTvZK7RTG1WX5xYz33hzoGYn97T8j8JxVyp9QDA8OqSCo438tk2mzhjnk8uN5P9IBrLpaZHDlDutmxHKcgQ= X-Received: by 2002:aca:4f42:: with SMTP id d63-v6mr11524287oib.255.1539706992019; Tue, 16 Oct 2018 09:23:12 -0700 (PDT) MIME-Version: 1.0 References: <20181016090107.45efe64d@xeon-e3> In-Reply-To: <20181016090107.45efe64d@xeon-e3> From: Amedeo Sapio Date: Tue, 16 Oct 2018 19:22:44 +0300 X-Gmail-Original-Message-ID: Message-ID: To: stephen@networkplumber.org Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] rte_eth_tx_burst reliability X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2018 16:23:14 -0000 Hello Stephen and thanks for your reply. I understand that the function will send less packets if the ring is full. According to the documentation, the return value is the number of packets actually stored in transmit descriptors of the transmit ring. In fact, to send all the packets, I have: do { n_pkts = rte_eth_tx_burst(dpdk_par.portid, 0, &tx_pkts_burst[sent], n_mbufs - sent); sent += n_pkts; } while (sent < n_mbufs); The problem that I am facing is that the function returns X (so X packets are inserted in the ring), but less than X packets are transmitted. --- Amedeo On Tue, Oct 16, 2018 at 7:01 PM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Tue, 16 Oct 2018 18:38:23 +0300 > Amedeo Sapio wrote: > > > Dear all, > > > > while using rte_eth_tx_burst() to send packets in batches, I see that, > > sometimes, the amount of packets that the function says are sent, are not > > actually sent. > > > > I am accumulating the return value of rte_eth_tx_burst() in a variable > and, > > at the end of the job, the value of the accumulator is greater than the > > value of "opackets" in the device "eth_stats". > > I see the same number of transmitted packets in eth_stats, eth_xstats and > > on the other side of the cable, and this number is less than the sum of > the > > values returned by rte_eth_tx_burst(). > > > > So, my question is: in what case the rte_eth_tx_burst() function returns > a > > value that does not correspond to the real number of transmitted packets? > > According to the documentation, the function is returning only the number > > of packets that have been successfully inserted in the ring, so I assumed > > the return value was reliable. > > > > Testbed: > > NIC: Intel 82599ES > > DPDK driver: igb_uio > > DPDK version: 18.05 > > Traffic: UDP packets, sized 174B, with IP and UDP checksum offload > > > > If number sent < number requested it means the transmit descriptor > ring is full. Application needs to handle this and retransmit, or drop > in that case. > > -- > > This message and its contents, including attachments are intended solely > for the original recipient. If you are not the intended recipient or have > received this message in error, please notify me immediately and delete > this message from your computer system. Any unauthorized use or > distribution is prohibited. Please consider the environment before > printing > this email. >