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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 0E4AEC43218 for ; Fri, 26 Apr 2019 08:00:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D98E2206BA for ; Fri, 26 Apr 2019 08:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725985AbfDZIAh (ORCPT ); Fri, 26 Apr 2019 04:00:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53725 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfDZIAh (ORCPT ); Fri, 26 Apr 2019 04:00:37 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 661073086272; Fri, 26 Apr 2019 08:00:37 +0000 (UTC) Received: from [10.72.12.130] (ovpn-12-130.pek2.redhat.com [10.72.12.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A0951001E7C; Fri, 26 Apr 2019 08:00:30 +0000 (UTC) Subject: Re: virtio_net: suspicious RCU usage with xdp To: Jesper Dangaard Brouer , "Michael S. Tsirkin" Cc: Toshiaki Makita , David Ahern , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , "netdev@vger.kernel.org" References: <20190424132533-mutt-send-email-mst@kernel.org> <20190425130319-mutt-send-email-mst@kernel.org> <20190425194117.66093851@carbon> From: Jason Wang Message-ID: <8bcd6aba-ea18-7e20-b883-3b926b9a2c07@redhat.com> Date: Fri, 26 Apr 2019 16:00:28 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190425194117.66093851@carbon> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 26 Apr 2019 08:00:37 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019/4/26 上午1:41, Jesper Dangaard Brouer wrote: > It does sound like my commit 5d053f9da431 ("bpf: devmap prepare xdp > frames for bulking") introduced this issue. I guess we can add the RCU > section to xdp_do_flush_map(), and then also verify that the devmap > (and cpumap) take-down code also have appropriate RCU sections (which > they should have). > > Another requirement for calling .ndo_xdp_xmit is running under NAPI > protection, May I know the reason for this? I'm asking since if the packet was redirected from tuntap, ndo_xdp_xmit()  won't be called under the protection of NAPI (but bh is disabled). Thanks > is that still satisifed for veth? > (even when invoked via xdp_do_flush_map()).