From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE171C433B4 for ; Thu, 15 Apr 2021 18:00:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81BD8611BF for ; Thu, 15 Apr 2021 18:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233610AbhDOSAn (ORCPT ); Thu, 15 Apr 2021 14:00:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232759AbhDOSAl (ORCPT ); Thu, 15 Apr 2021 14:00:41 -0400 Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E3F0C061574; Thu, 15 Apr 2021 11:00:16 -0700 (PDT) Received: by mail-oo1-xc2b.google.com with SMTP id s1-20020a4ac1010000b02901cfd9170ce2so5573850oop.12; Thu, 15 Apr 2021 11:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uCTgNUtrQaN47ypy4tlXXz/Fqi8+o6qT6fOZMZagGcw=; b=nMFZ/OL7qNpHZzONQgpskAMU2rJwmvJSnPP/c3MXcgBlksmsSXUhXJOFkk0h8qujs4 MrGJeKQi3/XiGZfVsN+Id8MmIXRrpzrON5VWyhp+FXdeglX27qTnQ7h2BVrm5ptDH3fw o5iI3aB/WfBEZQaad1aiEefb3gHYH8RRxf7mdQpLGVDk/ylYKzHmkL81YEnQhAF3gKvA U4y4QsqPTGUeHW+a5t6JNjZfOs1ZBYY+PTaFtAK5USuu4YHmLRk5ksI32/2MA7/YtKk/ 1NZB+RV2itpbq/IUPx74jO0nT8Ph6h5Sfyxbn2P8AFm7ElTA+82CwbXFonQFWWd0gbHR L5bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uCTgNUtrQaN47ypy4tlXXz/Fqi8+o6qT6fOZMZagGcw=; b=IVGXGOIenZ9uW1hTfSzrP/LAiKDnVN8NB8v5X8IRyO6q7H4I9rKFwMQ2iN924ynxPL h2a+2ulCvpfP+lFFLoL1YfOZCzUUxLjYJtAjLiuOsPyI3cJmQ3WmwYXak4HiLxa/ba+1 1anxMedqu0UiynTQOcUkmpb5qqc2kd0YtYMHqP2yPKiiNrGpkGmw4xZ53hh9kVUIYk0S Qgf/xhJhfvzL86Ox8PngBS6+tNI2HqoLhjmiLErT4oHFNSWUWR+Z9xFceUWkfAEQu4DI gh9Ni8broLD9vjAfkZMIKqDf2sZuu3rfGC8bIFqeLdDkBUio57spm/S2mxbj2r418ogj Lhhw== X-Gm-Message-State: AOAM532p85rTBocD3DGAneCrC9qsfpbpcs0S7DYD+Vezb4QWKXZ20Wt3 TeQ/uVlmjJIR28RclKH/Rj1SiHReMkE= X-Google-Smtp-Source: ABdhPJzskz6SKpTG6OSI6vcbvbVbR1R20AjrI8DTmF6340xaIC58QJh0RcEsILE01IaV7XH3DZ1AOA== X-Received: by 2002:a4a:9e42:: with SMTP id w2mr330605ook.4.1618509614837; Thu, 15 Apr 2021 11:00:14 -0700 (PDT) Received: from Davids-MacBook-Pro.local ([8.45.42.70]) by smtp.googlemail.com with ESMTPSA id d17sm798298oth.19.2021.04.15.11.00.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Apr 2021 11:00:14 -0700 (PDT) Subject: Re: [PATCH v2 bpf-next] cpumap: bulk skb using netif_receive_skb_list To: Lorenzo Bianconi Cc: Daniel Borkmann , Lorenzo Bianconi , bpf@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, ast@kernel.org, brouer@redhat.com, song@kernel.org References: <252403c5-d3a7-03fb-24c3-0f328f8f8c70@iogearbox.net> <47f3711d-e13a-a537-4e0e-13c3c5ff6822@gmail.com> From: David Ahern Message-ID: <7cbba160-c56a-8ec5-b9e1-455889bacb86@gmail.com> Date: Thu, 15 Apr 2021 11:00:11 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 4/15/21 9:03 AM, Lorenzo Bianconi wrote: >> On 4/15/21 8:05 AM, Daniel Borkmann wrote: > > [...] >>>> &stats); >>> >>> Given we stop counting drops with the netif_receive_skb_list(), we >>> should then >>> also remove drops from trace_xdp_cpumap_kthread(), imho, as otherwise it >>> is rather >>> misleading (as in: drops actually happening, but 0 are shown from the >>> tracepoint). >>> Given they are not considered stable API, I would just remove those to >>> make it clear >>> to users that they cannot rely on this counter anymore anyway. >>> >> >> What's the visibility into drops then? Seems like it would be fairly >> easy to have netif_receive_skb_list return number of drops. >> > > In order to return drops from netif_receive_skb_list() I guess we need to introduce > some extra checks in the hot path. Moreover packet drops are already accounted > in the networking stack and this is currently the only consumer for this info. > Does it worth to do so? right - softnet_stat shows the drop. So the loss here is that the packet is from a cpumap XDP redirect. Better insights into drops is needed, but I guess in this case coming from the cpumap does not really aid into why it is dropped - that is more core to __netif_receive_skb_list_core. I guess this is ok to drop the counter from the tracepoint.