From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.evertz.com (mail.evertz.com [204.187.63.106]) by dpdk.org (Postfix) with ESMTP id 4772B68E8 for ; Wed, 12 Feb 2014 23:48:43 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Wed, 12 Feb 2014 17:50:03 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: condition for calling ixgbe_xmit_cleanup Thread-Index: Ac8oRMRm3EyOn0R6So+s5LK9yNntmA== From: "Qing Wan" To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] condition for calling ixgbe_xmit_cleanup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 22:48:43 -0000 Hi, =20 There are following code in function ixgbe_xmit_pkts, .... if ((txq->nb_tx_desc - txq->nb_tx_free) > txq->tx_free_thresh) { ixgbe_xmit_cleanup(txq); } .... My understanding is, nb_tx_desc means total number of descriptors in ring and nx_tx_free represents how many descriptors are available, so txq->nb_tx_desc - txq->nb_tx_free means how many we have used. I'm not quite understand the meaning of this comparison. Why is the condition not something like "if (txq->nb_tx_free < tx_free_thresh)".=20 =20 really appreciate if someone could help me on this. =20 Thanks Qing