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=-8.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 29E0AC433E2 for ; Tue, 21 Jul 2020 23:23:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CE122073A for ; Tue, 21 Jul 2020 23:23:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728456AbgGUXXc (ORCPT ); Tue, 21 Jul 2020 19:23:32 -0400 Received: from correo.us.es ([193.147.175.20]:56108 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgGUXXc (ORCPT ); Tue, 21 Jul 2020 19:23:32 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id D18DB2EFEA5 for ; Wed, 22 Jul 2020 01:23:30 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id C40B1DA798 for ; Wed, 22 Jul 2020 01:23:30 +0200 (CEST) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id B9028DA722; Wed, 22 Jul 2020 01:23:30 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 635D4DA722; Wed, 22 Jul 2020 01:23:28 +0200 (CEST) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Wed, 22 Jul 2020 01:23:28 +0200 (CEST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from us.es (unknown [90.77.255.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 1984lsi) by entrada.int (Postfix) with ESMTPSA id 299974265A2F; Wed, 22 Jul 2020 01:23:28 +0200 (CEST) Date: Wed, 22 Jul 2020 01:23:27 +0200 X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: Julian Anastasov Cc: guodeqing , wensong@linux-vs.org, horms@verge.net.au, kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org Subject: Re: [PATCH,v2] ipvs: fix the connection sync failed in some cases Message-ID: <20200721232327.GA6430@salvia> References: <1594887128-7453-1-git-send-email-geffrey.guo@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Virus-Scanned: ClamAV using ClamSMTP Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Sun, Jul 19, 2020 at 09:08:39AM +0300, Julian Anastasov wrote: > > Hello, > > On Thu, 16 Jul 2020, guodeqing wrote: > > > The sync_thread_backup only checks sk_receive_queue is empty or not, > > there is a situation which cannot sync the connection entries when > > sk_receive_queue is empty and sk_rmem_alloc is larger than sk_rcvbuf, > > the sync packets are dropped in __udp_enqueue_schedule_skb, this is > > because the packets in reader_queue is not read, so the rmem is > > not reclaimed. > > > > Here I add the check of whether the reader_queue of the udp sock is > > empty or not to solve this problem. > > > > Fixes: 2276f58ac589 ("udp: use a separate rx queue for packet reception") > > Reported-by: zhouxudong > > Signed-off-by: guodeqing > > Looks good to me, thanks! > > Acked-by: Julian Anastasov > > Simon, Pablo, this patch should be applied to the nf tree. Applied, thanks. > As the reader_queue appears in 4.13, this patch can be backported > to 4.14, 4.19, 5.4, etc, they all have skb_queue_empty_lockless. The Fixes: tag should help -stable maintainer pull this into the next batch. Otherwise, feel free to drop a line to stable@vger.kernel.org to request inclusion after this patch hits Linus' tree. Thanks.