Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2742405imm; Sun, 7 Oct 2018 10:40:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV63CFQ+tcvsqt1amuw+MG30CddirwlQMmzRWAWWMngIOeg9N8obDOq2YTx5+DUijwEWi9zf9 X-Received: by 2002:a63:c84c:: with SMTP id l12-v6mr17940206pgi.77.1538934005492; Sun, 07 Oct 2018 10:40:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538934005; cv=none; d=google.com; s=arc-20160816; b=GglYkUNzQiWza9STuWEV4MfGEKv+R3yMszMVu+jj1i4e2EnptoA3jvPS5mko5uPgQ6 yRkpbamNosrBP6g2wFmULfuzK9JNFSGDTTF2aQYjMB23FM5oeWOoqtD8YHb9KLCWRFdB /C12GoEBFN+nI+z+muBZFyBvDLUw3gXgIJxiLptgXf4mI8l+xY78BxxYxYQA3kaxASu2 Fel3uCBZx8v6333dZBFps10j3vP0BzCfrHoYdxeYKV7uRcohRQIvDQz3zx2psvPt1DXD v1JgbJG9G9m7f4QutwI6U0gFocQkKF9vQVxXG5DA1hzRFiUsRR17DNEHraF76VMyXf5X KLMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=OawaDZisjOyZJbCSyg5eREGwupP4lSS2MDmvQkkf5kA=; b=Tnop8LFIzghwEKB91uI25J3BTtJTIreyAxu824tbzIt+K52ubWwqoiHH/1NNfNafq/ oCAjBYITfrM6c2FzN7TG8IKU3hGjadsYrIhJt3LFTebUQJ3Ky7u4H54u2GEts93tZK+e s06k9EiMnUaKR8dOrEB7cM3s6CeTijZtCVWckv6Rm3oZwF7OyvaKP/CBluIke+qkQZun h6S5hHcAaQGEFfxiDWnRfm0afUjoMIjGpJetuy5xSE7giGwWx7lndgzcdl1gnNwNlKhQ lyr0mL2dYObgSCIsmWZzw90tjU3NzTnt2G/O/xPDNpfnv4kEjjEDsucM6wdHoiV003sM DYJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LYt1r9lX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8-v6si16090221pli.338.2018.10.07.10.39.49; Sun, 07 Oct 2018 10:40:05 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LYt1r9lX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728300AbeJHArZ (ORCPT + 99 others); Sun, 7 Oct 2018 20:47:25 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36393 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727757AbeJHArY (ORCPT ); Sun, 7 Oct 2018 20:47:24 -0400 Received: by mail-pg1-f193.google.com with SMTP id f18-v6so6804919pgv.3; Sun, 07 Oct 2018 10:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OawaDZisjOyZJbCSyg5eREGwupP4lSS2MDmvQkkf5kA=; b=LYt1r9lXV4pbw7BFZ0x08cZyPLMOUl4dOqFmuS/tc9VWRsXr8ysK0v8tm9wJ9z7LbU xusUOZFzqY1uekN8FY58g33bGG1uoliGIkT8X+LCP1TAx5Fr+J6f4DLSX9vXbSTQ89sl lw/6ejub7taz4QfwZz2S5YBiQTeabiH6UoksS0GKB/MWDZUdsVJeCXtkvj/37USHb1rH d/O/oVMjqmMolxxpAPHqn4dXIiCUGq+wYL0AOxm243NNZ8hN1WU2CvCQrzM3p5wpvIq1 l5CHLejZIiy/i72+T7AidcIhsoiZsVTSzgGgXoqFW3rCshVlMqGGbETqLJxHutjKWz2v fbsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OawaDZisjOyZJbCSyg5eREGwupP4lSS2MDmvQkkf5kA=; b=Z+q2pcWiwHRomsRxq+lH0KIwADhS6asdEm5k1+D4cd3cI9W7b+7Ee8k2ci8tuomjL0 ItWhZNjwLj/+uzArIf2aztB4vNN1963KfFtywY3nebOMLi1hEQZKgsqd1BY+lGu2whB2 ABWiMq2LCAkeImlBsejR445sCppyMDJ0PKkpJuZzbjWgn0NqyIh8LXz+0V2wjX7AxsN/ KsGMtyPlJktiLpTitFLyyMHG20+j/DMVop1rjfGIxtZ5PiAxQrDuEbKEEGmLOYfL3Joe x8vUMxUVWYxkv0ZG5sDfWm8s1M04yq54kYWIi7MivIH1ya6dUQlT2DEtfyOokxwa8he1 sD6g== X-Gm-Message-State: ABuFfogLaEwDaMEn0Q8fVdu7gjs8Bbwh29iVvppBIumI0dMJXEn5bZi2 oarbRlUPOWf3fCDjOWkBBvBkmRrz X-Received: by 2002:a62:51c6:: with SMTP id f189-v6mr21532794pfb.7.1538933964507; Sun, 07 Oct 2018 10:39:24 -0700 (PDT) Received: from [192.168.86.235] (c-67-180-167-114.hsd1.ca.comcast.net. [67.180.167.114]) by smtp.gmail.com with ESMTPSA id h6-v6sm12328066pfc.6.2018.10.07.10.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Oct 2018 10:39:23 -0700 (PDT) Subject: Re: [PATCH v2 net-next] inet: do not set backlog if listen fails To: Yafang Shao , edumazet@google.com, davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1538919405-3093-1-git-send-email-laoar.shao@gmail.com> From: Eric Dumazet Message-ID: <0652963b-90ac-06a7-3a35-50a307465cf9@gmail.com> Date: Sun, 7 Oct 2018 10:39:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1538919405-3093-1-git-send-email-laoar.shao@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/2018 06:36 AM, Yafang Shao wrote: > We don't need to set the backlog if listen fails. > The sk_max_ack_backlog will be set in the caller inet_listen() and > dccp_listen_start() if inet_csk_listen_start() return without error. > So just remove this line to avoid this unnecessary operation. > > Regarding sk_ack_backlog, we have to set it before a TCP/DCCP socket is > ready to accept new flows to avoid race, because dccp and tcp have lockless > listeners > Really could you not add irrelevant stuff in the changelog ? This patch simply removes one redundant setting, you do not have to explain about dccp/tcp being lockless and that sk_ack_backlog is not touched by this patch. Also the title is misleading, since we will still set the backlog even if the listen fails. If you really want sk_max_ack_backlog being not changed if listen() fails, then I am afraid you will need to submit a different patch.