From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:46298 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686AbeBVHyc (ORCPT ); Thu, 22 Feb 2018 02:54:32 -0500 Received: by mail-lf0-f67.google.com with SMTP id r80so6060914lfe.13 for ; Wed, 21 Feb 2018 23:54:32 -0800 (PST) Subject: Re: [PATCH net v2 2/2] tuntap: correctly add the missing xdp flush To: Jason Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mst@redhat.com, christoffer.dall@linaro.org References: <1519280658-4918-1-git-send-email-jasowang@redhat.com> <1519280658-4918-2-git-send-email-jasowang@redhat.com> From: Sergei Shtylyov Message-ID: <0bb9796e-5f52-dc9a-b7c2-6628bca712ed@cogentembedded.com> Date: Thu, 22 Feb 2018 10:54:30 +0300 MIME-Version: 1.0 In-Reply-To: <1519280658-4918-2-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: Hello! On 2/22/2018 9:24 AM, Jason Wang wrote: > Commit 762c330d670e ("tuntap: add missing xdp flush") tries to fix the > devmap stall caused by missed xdp flush by counting the pending xdp > redirected packets and flush when it exceeds NAPI_POLL_WEIGHT or > MSG_MORE is clear. This may lead BUG() since xdp_do_flush() was Lead to BUG(). > called under process context with preemption enabled. Simply disable s/under/in the/? > preemption may silent the warning but be not enough since process may Silence. > move between different CPUS during a batch which cause xdp_do_flush() > misses some CPU where the process run previously. Consider the several > fallouts, that commit was reverted. To fix the issue correctly, we can > simply calling xdp_do_flush() immediately after xdp_do_redirect(), Call. > a side effect is that this removes any possibility of batching which > could be addressed in the future. > > Reported-by: Christoffer Dall > Fixes: 762c330d670e ("tuntap: add missing xdp flush") > Signed-off-by: Jason Wang [...] MBR, Sergei