From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next 0/3] veth: XDP stats improvement Date: Mon, 15 Oct 2018 21:58:58 -0700 (PDT) Message-ID: <20181015.215858.739156373795267540.davem@davemloft.net> References: <1539250610-2557-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, brouer@redhat.com To: makita.toshiaki@lab.ntt.co.jp Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:43270 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeJPMrd (ORCPT ); Tue, 16 Oct 2018 08:47:33 -0400 In-Reply-To: <1539250610-2557-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> Sender: netdev-owner@vger.kernel.org List-ID: From: Toshiaki Makita Date: Thu, 11 Oct 2018 18:36:47 +0900 > ndo_xdp_xmit in veth did not update packet counters as described in [1]. > Also, current implementation only updates counters on tx side so rx side > events like XDP_DROP were not collected. > This series implements the missing accounting as well as support for > ethtool per-queue stats in veth. > > Patch 1: Update drop counter in ndo_xdp_xmit. > Patch 2: Update packet and byte counters for all XDP path, and drop > counter on XDP_DROP. > Patch 3: Support per-queue ethtool stats for XDP counters. > > Note that counters are maintained on per-queue basis for XDP but not > otherwise (per-cpu and atomic as before). This is because 1) tx path in > veth is essentially lockless so we cannot update per-queue stats on tx, > and 2) rx path is net core routine (process_backlog) which cannot update > per-queue based stats when XDP is disabled. On the other hand there are > real rxqs and napi handlers for veth XDP, so update per-queue stats on > rx for XDP packets, and use them to calculate tx counters as well, > contrary to the existing non-XDP counters. > > [1] https://patchwork.ozlabs.org/cover/953071/#1967449 > > Signed-off-by: Toshiaki Makita Series applied.