Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp643852pxu; Fri, 23 Oct 2020 09:39:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8rQfhgEz7JGR81LOAkT+nyYROsSn16xCYJuj4o00wrJ/2PtzS+XU1JGI/GMGLAmA1buXq X-Received: by 2002:a17:906:5841:: with SMTP id h1mr2779387ejs.342.1603471188549; Fri, 23 Oct 2020 09:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603471188; cv=none; d=google.com; s=arc-20160816; b=g5+IKGRsQig0XbtT3TnJSaTTXBOOqxz2h0kktfMWE4lHaxuaUeb95Bfhup4wjG4TJd PztAeKOeV27aT+XPlkZ/ao2y686zm1RsR2eYMwSSv8QRCJz7r0d+eRG0qg9UzlVh1NDC YWIhb6TIXlYcjsWnlrAPtDwEzyUrJth1cJK0nZf2E7H39USlRpPNgAZqAg9RNU/oHzwu xzK7/dqQuFBy+VcEFYOTcYW17urmKa+1Q3LuuNE3vkSvkiPQTltc0JSiU8elD7o/1yz7 70NP8HzgSKeq8A8oDpVZWYKiat2NhKCmhZByGGvumzjkXXNIRDhZ5OxH2k3Ej42k3c2P yHXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KOj/oHfwxUuvaYgCe+uyCqY9qKTixx5oRdiXvb0Y2Lo=; b=u9D5+VQEiCw0VSy2a7JMOwp35vMdc6NlsSEor/CMxcTChdU6vzm+Esg5Xe5HIi0owJ g9xCtOAlU1U8THmQRoG9ecka41oDYgahb8pdJ5dfmptoR5O1+n8kOs0x6Dvk4d9LDxxA XZDXTn4FTbd8MM5YVIyLLhopL7vqbUStGcBZ59OTQ9HzYNrXbVFhefzxY9PtT4vREH6q bWOv/3IZkewd/qQMIBVIhNUhb6iSesF0qD5H27kFjFhO+oywzyVxzgMj4uYcyVkTWsyZ u8RNfdBphOMPKHaFE3Iiv7zP+DF5zMNKCv4eegdBJKH6aGFqLfY+ZvPn5x0g+hpTmKkE rqfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Gbrae/12"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g26si828187edr.209.2020.10.23.09.39.26; Fri, 23 Oct 2020 09:39:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Gbrae/12"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S465939AbgJWQgu (ORCPT + 99 others); Fri, 23 Oct 2020 12:36:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S464515AbgJWQgl (ORCPT ); Fri, 23 Oct 2020 12:36:41 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9F81C0613CE for ; Fri, 23 Oct 2020 09:36:41 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id z5so2537223iob.1 for ; Fri, 23 Oct 2020 09:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KOj/oHfwxUuvaYgCe+uyCqY9qKTixx5oRdiXvb0Y2Lo=; b=Gbrae/12ltjvScvPtnck8CY8F6IEdPW8r/G5bdTru4Mr495QtvKEqkx0wCOE4lldFA SHWlX0VslTR9iSEUphZvQvdMtzRWnTwBUSTSOQCNJtQrWAESJzw7fIL7AJr9kGtbZ8/f HMM2cinNOf8VUvHb41p7hJGjHIG673cq2szUmhE3kOz3xfp1UUVPbv55iYMtLZlGbcMg 2iheUBSAqcfjBWrv70lgwLHePg9f8H9Js/Omdq5aylRwapBb8j2dcsCtRwrhSnYCzJWN sta32ZfUuTVJCWy5XvjMNjk3eFd3zJKRe2SPo5ZXFGwpNAwCudtKiCk8dzg87ZaFFOIJ kCnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KOj/oHfwxUuvaYgCe+uyCqY9qKTixx5oRdiXvb0Y2Lo=; b=kVYqssWHYIsf9/UrlNYIZFzOEwDG7GtBXb/bn8f1xTzdVJLrw2OKDXSAOZ1W9Po1Sa hdXglQaF0Yy2ZgBd9ZYsTMTGmZ/Ux9/Qg3oVd9LFUyykAh2G7Jxw6ZhPIt8/EwPg0dMn g11xtObxegP/FdUHNHyJ0pDJjumc49Q18bnR9BW8uFl4V7xOmfthy7LtV/Z2L8C17nEw MZ03+qPjjZ6/UiKsW3OLBd3ntpY330OwjMLIpDnQ3XRhdxCTXP/Lsp7Ny16dVjTERbc2 3ej0VgO0fwDZg9o/TRwtiDCDRQimqCrscQwrcku/dqjq5z4vq8gvuhuZmF9feE4Tq0Yv 7k3w== X-Gm-Message-State: AOAM5335XF7xwMQRTjy/5pTFjdMkTQY16xql7eeXW9wOdwgPVRwhX4Ut ZL8iqFAF7wPNFOwhekD0QSayon1yHjtRlxaQD9sM2w== X-Received: by 2002:a5d:8e12:: with SMTP id e18mr2043995iod.99.1603471000904; Fri, 23 Oct 2020 09:36:40 -0700 (PDT) MIME-Version: 1.0 References: <20201023111352.GA289522@rdias-suse-pc.lan> <20201023155145.GA316015@rdias-suse-pc.lan> <20201023160628.GA316690@rdias-suse-pc.lan> In-Reply-To: <20201023160628.GA316690@rdias-suse-pc.lan> From: Eric Dumazet Date: Fri, 23 Oct 2020 18:36:29 +0200 Message-ID: Subject: Re: [PATCH] tcp: fix race condition when creating child sockets from syncookies To: Ricardo Dias Cc: David Miller , Jakub Kicinski , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 6:06 PM Ricardo Dias wrote: > And what about the loopback interface? Why couldn't the loopback > interface also use a single RX queue? > Loopback is using a per-cpu queue, with no crossing, for efficiency. That means : whenever a packet is sent on lo interface from CPU X, it is put on CPU X backlog queue. If the connect() and sendmsg() are run from different cpus, then the ACK (from last packet of 3WH) and the data packet might land on different queues.