From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5CBCBA3160 for ; Wed, 9 Oct 2019 19:26:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34D5C1E85D; Wed, 9 Oct 2019 19:26:14 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 649D41C1B8 for ; Wed, 9 Oct 2019 19:26:12 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id b8so1816301pgm.13 for ; Wed, 09 Oct 2019 10:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/t+me8OjrSWD+MJI3q0kX2x0yrnQn+NAvv8eZ5rZtsc=; b=mTavlYvQV6ei2swVFI5B0cqme02+oGAHWTuWxBWWrVMyXvezd8r3yfFB3hZrFdMy0h vsM5L6hUSThqXtClY8ZNycIWPhWmTQvyNYKYVNrobu9tfkZqkxGBFc0lzIxB2Wg+t00V cLljpfMuACJ/lJCao9agswmhkIrj4VEZmuGHgSeBeExuYsncmMh7gs+NxpRbfIzO7oyp oHIZOVG3WKugpJwcbq0eFYtgZKSM7IvKa7e2oPQf09zcpYvMquwcK5n2UIJlHhdhlGQ4 kgPpLF7fSSBWiUOjEM/QJlEHx5HhJi+tA1o/qAib9wa77D2Rq4UE9fc08LUuTdNPLWRm hLeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/t+me8OjrSWD+MJI3q0kX2x0yrnQn+NAvv8eZ5rZtsc=; b=ugMpTuLe9eYLWPZ/To+nV89F2QPd/3/K3kJ/GZ3lHFF+ph8SuWx5cMgfwdddCNZG2p qECrBS3GaPY6E1SrIfaSw9aoAf7clo7l2LusKG8DM/sHmvfs/meWX0LdTeSqYJETxJ3f NpJiCZn2HEMZTmrsa0JXhe1AUruvQYFkpGbZcuebu6c8LLlNRxQTzvIUfXwRqx0Y+usw VAFA5N/siCleQrAmOlSEkq0jbw55b2XQbYY32jbJmrlOKnKqgcCFtLGScJjf91al+MlO 8n+mMwx9t8vgIBYYS07c+dC2wHcmVqenEaD539nui2ejHX9htUjs/+EV6cxEHNTKuQ3R F0+A== X-Gm-Message-State: APjAAAWGRaHsXy1bC6fane3wGgX2IsOJP3d3ihzpx0XRD3tfMrUVZbXa mKBlIq5v3AlrEOGDgyzNvp6PAA== X-Google-Smtp-Source: APXvYqx3FNQmuisEPFQcd68dC2XCiyqA7/3BgzxS0tns18gC77qhTDDzZp2mnOa4kbQDdyt1TiD7CQ== X-Received: by 2002:a62:d408:: with SMTP id a8mr4923546pfh.15.1570641971639; Wed, 09 Oct 2019 10:26:11 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id x9sm3474268pje.27.2019.10.09.10.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 10:26:11 -0700 (PDT) Date: Wed, 9 Oct 2019 10:26:09 -0700 From: Stephen Hemminger To: Flavia Musatescu Cc: dev@dpdk.org, "John W. Linville" , stable@dpdk.org, ciwillia@brocade.com Message-ID: <20191009102609.2961290a@hermes.lan> In-Reply-To: <1570634949-26819-1-git-send-email-flavia.musatescu@intel.com> References: <1570634949-26819-1-git-send-email-flavia.musatescu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/af_packet: improve Tx statistics accuracy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 9 Oct 2019 16:29:09 +0100 Flavia Musatescu wrote: > + if (sendto(pkt_q->sockfd, NULL, 0, MSG_DONTWAIT, NULL, 0) == -1 && > + errno != ENOBUFS) { > + /* Error sending. > + * When sendto call fails and ENOBUFS error is being set > + * some of the packets are actually successfully transmitted. > + * There is no available count of those packets, so in order > + * to make the statistics more accurate, all of the previously > + * enqueued packets will be considered successful, even though > + * this is not entirely correct. > + */ Agree with the change, but please keep only add a small code comment. Long comments are a personal pet peeve, it also tends to standout as "some different developer who had an issue left this comment"