Received: by 10.223.185.116 with SMTP id b49csp5472509wrg; Wed, 7 Mar 2018 12:21:14 -0800 (PST) X-Google-Smtp-Source: AG47ELs9G3tiTVogvgtswCSuoGejx5Wwsb2Q2+jnggzBv63h/ovRlNkkawbbM2jO3OJs5G0kaUpM X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr11726217plp.319.1520454074177; Wed, 07 Mar 2018 12:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520454074; cv=none; d=google.com; s=arc-20160816; b=o90ZK8CxghTQ8oWck7TutAfaBNWMZpbOw9F7VXCol2fJjIKTaaTLHR7yDEpFmR4gT+ /107vLKK7aADr9WYgdRwV2gwFmNSOfJODMWgNrLuk10Q4IAnVvZAJDanvu11clfLJPA+ tbidlNB2XDoEc9Lucyj+ujUUoMSeOTNpndDN+40ZNhqvotqTF5qnc1to/dAkaA5PpdSQ 1eqhgO9D+9JNWRXnHian7X+SGN/+WLIABGWwrKC3UyQ1cQ7NfcsN/buJWdIiESwzXKGf yhNRRzjeq9KDMEbnZgZI1jUxBGvCH05TEiwgEScMsi5jlqrut5MbNhzDQtINjmOTNayE X01w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=B44WBYwN23NoMwWyyKnj0MhlGMPaey3O1x1oj5brrTA=; b=DTmb64dpb5kbumzqhS3fCIlf/+gkXJ8VRQTX9XpbI/VEVBH94kGFCatpgHHg6CNnmk 5tDqEsr0ZX2NEmM06MWzkAllkvMNcBn43xzZxEwEwEA0hRXd3S8izubHtwBC96XhNpZC iMjfi4GSDWqOsq4j/GHMgTtF3ItYIJ8K3QT3e/Eu4cg+IG+fQ+Vq2wqFf3ehRwJ5IyUo Gta2epDCIDARC9QVLlCvDIKtrSlpkUSA3NOvJaaKP9mx40XpyMlptcx4nTMJN+e6Xz2T YjqKuCVFmOYdKnKMfWAERC0XExamgtyPq36PTL3jN25w4lsiwcWh6hBT8Am0POpH76gV mywA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12si11756896pgq.491.2018.03.07.12.20.59; Wed, 07 Mar 2018 12:21:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965083AbeCGUUK (ORCPT + 99 others); Wed, 7 Mar 2018 15:20:10 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43454 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934875AbeCGTnp (ORCPT ); Wed, 7 Mar 2018 14:43:45 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A7658ECB; Wed, 7 Mar 2018 19:43:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoffer Dall , Jason Wang , "David S. Miller" Subject: [PATCH 4.15 076/122] tuntap: correctly add the missing XDP flush Date: Wed, 7 Mar 2018 11:38:08 -0800 Message-Id: <20180307191740.280849456@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191729.190879024@linuxfoundation.org> References: <20180307191729.190879024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jason Wang [ Upstream commit 1bb4f2e868a2891ab8bc668b8173d6ccb8c4ce6f ] We don't flush batched XDP packets through xdp_do_flush_map(), this will cause packets stall at TX queue. Consider we don't do XDP on NAPI poll(), the only possible fix is to call xdp_do_flush_map() immediately after xdp_do_redirect(). Note, this in fact won't try to batch packets through devmap, we could address in the future. Reported-by: Christoffer Dall Fixes: 761876c857cb ("tap: XDP support") Signed-off-by: Jason Wang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/tun.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1490,6 +1490,7 @@ static struct sk_buff *tun_build_skb(str get_page(alloc_frag->page); alloc_frag->offset += buflen; err = xdp_do_redirect(tun->dev, &xdp, xdp_prog); + xdp_do_flush_map(); if (err) goto err_redirect; rcu_read_unlock();