Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp98184rdb; Sun, 21 Jan 2024 19:41:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGp0z+GLn62gFDta65DpQuJpZA3HDcttzE7I+hnOWh+Etc82nOW2ieFLJ0SOGCyrBqNN2m+ X-Received: by 2002:a17:906:7183:b0:a26:d98d:74d7 with SMTP id h3-20020a170906718300b00a26d98d74d7mr2988074ejk.33.1705894863068; Sun, 21 Jan 2024 19:41:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705894863; cv=pass; d=google.com; s=arc-20160816; b=rDR7b+DxQVwtY8NVkYugtEoYlJEYL0maZJn/F/UQd6GEl6gAlkCqDxRXZRneQtHDaQ 89MrcvS0To4VnNAYBjxxqsi/0mFZTA6G8TDDPa029wK3eac5ddcBj/Iy5unCvn4IrZpl eFgZHYOMg66icx69HprCbwiPKF1uuibDPUznnDKMHCi7UcJn8YRfCAdL5/rPIHfyxbKD vydrkXmEpF9nM64oAlad1FXs4YWiHbYUEUlRurusXLCJ5Md2EDVfDJn40dLs6B214Z3m WpPmisOC3KxOjw6xHv6geg4614ytoZ7E4s9WohiNd3wQ85XmfkFp8iXWToYquGkIoEOD tQ1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=NFDO/S9sTGJ9PBw0tPvhlSJST2+RhpttNVynn9R146U=; fh=2HlWI7Ofih2joQJnPJybCTnbA0iQu/NUOf+BfBa3weY=; b=wxLIynJwWQDFN89ZR0klvSaVw5YqIIGed6FBJ6Jdqz3Ak98mQF51SdGwS+GdyyylDF OoHvtDSrjvRqj1B+7bATDye99IOEPJsLgB0ARqLMWEhs8XOLEGgaNt5YsQQkSwjhq1gq xjTsB8n3+3BEU2xZfBmMV7fKk9X4zv9wFRY5vEJqSavoIWyDWVeg/Jq0Rhgow2+qjdBO XUzhFhQES9nojRm+dptanR7UDC5Q0Ka9K1jSjjsjqwQVceTKO428U/T5qFihGoAANH01 adWyMHm0wPC87kRjQPeKCV1Z8dGXzbiBclf8oUqe0DnBIL0asz/RiqtsVlocnITB0JVm 4Jeg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OEQa4ZDd; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-32306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p5-20020a1709061b4500b00a2d357afac6si8137883ejg.300.2024.01.21.19.41.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 19:41:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OEQa4ZDd; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-32306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A0C0F1F238E1 for ; Mon, 22 Jan 2024 03:41:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71B90522A; Mon, 22 Jan 2024 03:40:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OEQa4ZDd" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 507004C92 for ; Mon, 22 Jan 2024 03:40:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705894854; cv=none; b=BNRXVPQxqDG478AbEDf1TiNvvJm7IEsuwSGM34CfrsEHVAskn8Ltw7vSXtugO4KtMZ60DzPq81PpxAxzB9aE2Ey2cKk/mrAEnFil46qBg+H/dl43VBgTR+/+KAk7fiuoccfGCvew4mF1pieD25Yh7b0kYvZM1OdNwBeor3cklmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705894854; c=relaxed/simple; bh=NFDO/S9sTGJ9PBw0tPvhlSJST2+RhpttNVynn9R146U=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Y/0hJNwrvzVxadDst30hjwF5pJNbrlrKNAa7/b7tJgws9JhCg7FdRj0Mt+obJT50Lnz33OhWbHwxm2Wgp0IZyGDPgRhuwxgxLGJrzaL8ASYdeS1loxu6aHyBm7IDiIEVgCdhOAQBSlyvoyktKdwoSkhQygW1zfPHuWDYY4HFC5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OEQa4ZDd; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705894852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NFDO/S9sTGJ9PBw0tPvhlSJST2+RhpttNVynn9R146U=; b=OEQa4ZDdchAt5hRZmyuWVowb+Z7eGdrFeWYNQdrlZbqx/5gHPIbnOSVg66WRnezsW7yX7z /vCYA9dDvqopyheS0qkmYCoXomTddw+wpSpgvPUZ7/yzmeVbYMuRYp10vrS7UkS4KoZWU6 IUjNDFiSNKY/pXbm+z6xaRARlNDNI58= Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-eS8Elj3yN_Gx6n0dqYiOxQ-1; Sun, 21 Jan 2024 22:40:50 -0500 X-MC-Unique: eS8Elj3yN_Gx6n0dqYiOxQ-1 Received: by mail-oo1-f72.google.com with SMTP id 006d021491bc7-598e30e7e8cso2644194eaf.3 for ; Sun, 21 Jan 2024 19:40:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705894849; x=1706499649; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NFDO/S9sTGJ9PBw0tPvhlSJST2+RhpttNVynn9R146U=; b=l5Wu4dMvwvFUsuTDDdlzPzwUl+52BY1CJDblkCMmj5RHFb0J+z8nSAvh1yOi73rhxw DG8nrOTiWQs+ho+KmXQVGjeZpwPMwjAq4N0H/EDvIpvP345Wqp/XDaDHfbooDTMqaqJf gI4AmFFj13jBBCKcKZBQkd+6zWSDm5ZLWhCuQPpsYD1ourrJY1gcZUj+tu81YuqvWdWw HZbazD5uzODKf7ArUVKQ7urSrwGYd5RsAq8R4qyadXQEJy4hlWwkbw2f49kBPZSIgxmL pMYZ2aXFyfR9c7/CKjMf6xmX0xLwBNoZbmxPMf3X+cL/GS/30BzfogXi3H5Rlk82Idvv w2kg== X-Gm-Message-State: AOJu0Yyg8vbttpsDMotVO4L02XQpohHcxcpceB15oyja8DsTK/SVNihN PO0EiOzmv5/WNEMcoTaplw0yovG+/AbDWOUtKuB1rqW+GdysOFpAiRTMM02cwgYAMSCZvnZiFZc Og+pzNOS+DuujZjmW6JX+KtgdJ3LxKxGFPtBfcorSz3K3Cgs5owzKdRwl1b6UL3oFr87Bz3yUoE ndHnYBQD/ynt3NWTgxJvpi9qhQQFpe0g4Zeh2i X-Received: by 2002:a05:6358:917:b0:176:4ed4:bc64 with SMTP id r23-20020a056358091700b001764ed4bc64mr305864rwi.26.1705894849093; Sun, 21 Jan 2024 19:40:49 -0800 (PST) X-Received: by 2002:a05:6358:917:b0:176:4ed4:bc64 with SMTP id r23-20020a056358091700b001764ed4bc64mr305854rwi.26.1705894848831; Sun, 21 Jan 2024 19:40:48 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1705659776-21108-1-git-send-email-wangyunjian@huawei.com> In-Reply-To: <1705659776-21108-1-git-send-email-wangyunjian@huawei.com> From: Jason Wang Date: Mon, 22 Jan 2024 11:40:37 +0800 Message-ID: Subject: Re: [PATCH net 2/2] tun: add missing rx stats accounting in tun_xdp_act To: Yunjian Wang Cc: willemdebruijn.kernel@gmail.com, kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xudingke@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 19, 2024 at 6:23=E2=80=AFPM Yunjian Wang wrote: > > The TUN can be used as vhost-net backend, and it is necessary to > count the packets transmitted from TUN to vhost-net/virtio-net. > However, there are some places in the receive path that were not > taken into account when using XDP. It would be beneficial to also > include new accounting for successfully received bytes using > dev_sw_netstats_rx_add. > > Fixes: 761876c857cb ("tap: XDP support") > Signed-off-by: Yunjian Wang Acked-by: Jason Wang Thanks