From patchwork Fri Mar 29 15:42:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 13610729 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFEE51C0DCC for ; Fri, 29 Mar 2024 15:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711726950; cv=none; b=Oxp/A/dnNuATfg7NNfXyNjggeW3WYd86ZMzMquuER1FW/BzubLY6/tkjgXTT5Hr2n3BDZuJ8vNF44WyY9jSeNLkZz7krQpoNCjHIM7BaYPgud90mGT7hv2EZfuZNmAuFyOJRsw13eIHMcpNqcTQuRvVZc0jXGgeRLGw4sw9eJao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711726950; c=relaxed/simple; bh=Q1aIiiTvZUHCCY7f1tQ2XhaHnfGTBN/MGRGkfB9w+vY=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=j7w1vBYaXxdkfP9JnqbkN9KaJ6vDEwQ95ccjA+ESoZyFDiAPmeBNxOrwcfI3ghZQ7D7hAl01OQnu2Rw1FctNXh6YuZhwPKYlIi501WxyJSU4wFe57daET28y/2dCjS3yLJj7Zf5Uel48xKzDaP2sbCkEEXmcA8J+TrEaKxy4C8g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=xrEWWNEM; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edumazet.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xrEWWNEM" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dccc49ef73eso3042919276.2 for ; Fri, 29 Mar 2024 08:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711726947; x=1712331747; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=oIqaPdLLyO4kMv9x7Tvn3UdOtxtcOUtnCOVpVlu2/Ow=; b=xrEWWNEMFaCLLKqwNF3CXOZHCSwoyOHo/2MS57wVVWun29QyZs+GQPDxH6DL/8DtAB f6Ttjcmzow3Zu401SF28demnj0VbxezErLVQfHXNtatCmmJgKtxb1SX123k4s3rX1Tdo uBOuEe/gSLAQzdIe/P89kWtXE1PiVphAHmEuN3jEsj4S1gKReQNpK1f2buMsnDYEd/ya nXkHscLgF5IjcMUViqPMRBgP6KnIm8aeqEzr8b4JgcxVk6snc5Ku1M1w3akWMBW63N1V oh+j8RYaaRW3wq68oH4y2la48QkhJ/S0h14JBAWoRg76rj8mT2MXsdJuHgNKnhqXVD8b HoNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711726947; x=1712331747; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oIqaPdLLyO4kMv9x7Tvn3UdOtxtcOUtnCOVpVlu2/Ow=; b=Rl3kaa01lwFykhYOZfnqkyqm6i3eq75UOOFi4zqKHRSHh/4JQnWDI7KCPIK98ciKSF qrKgS2GbaKAVhgaiK7NkvdQlYPZ1wgW/geQVLwnUcASPWoxlhC0HAFjuBtPFBeYb6RHN 2rEMz7UMqIBglLaEZFa/d0DxyO8dtRNDUzKXbBlRKCRYD3PMXdQKb+6NpXSDn9Uo1cBo 7WPk5f1zy1GSi7fwVf2CJaaZwU8f3nhngw9i+E/wMwfVYcriDmTyyHcRxAI0t5nI/AIV dPHjTZRsk0RZL0ygYn8aXV/KIQN85VpIpAEFCMpzdQZ2LeUJWMfKGrdO/LO/W7ck+uWS ke1Q== X-Gm-Message-State: AOJu0Yy4JZ1W7z4zo2qN9rw+VRwTzqUvpAx5vltgycfU3znCVLvF/TX3 V6lfKFQehQYFnV5ihFXTD8ic6nZ++qIymEQn5dy1FhbKKT0hlsWRXIXbc5mDi0NpXYohiovOQ8u lLvWC0I1Qcg== X-Google-Smtp-Source: AGHT+IE07ZWs02rfl7xCds+qF202lh2RZtlg+0kLsgfWypMKttaDk3bf4rlilakIuoqg/s3H6wzEoEACW3KScw== X-Received: from edumazet1.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:395a]) (user=edumazet job=sendgmr) by 2002:a05:6902:248a:b0:dc6:dd76:34cc with SMTP id ds10-20020a056902248a00b00dc6dd7634ccmr192476ybb.1.1711726947795; Fri, 29 Mar 2024 08:42:27 -0700 (PDT) Date: Fri, 29 Mar 2024 15:42:17 +0000 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Message-ID: <20240329154225.349288-1-edumazet@google.com> Subject: [PATCH v2 net-next 0/8] net: rps: misc changes From: Eric Dumazet To: "David S . Miller" , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, Eric Dumazet X-Patchwork-Delegate: kuba@kernel.org Make RPS/RFS a bit more efficient with better cache locality and heuristics. Aso shrink include/linux/netdevice.h a bit. v2: fixed a build issue in patch 6/8 with CONFIG_RPS=n (Jakub and kernel build bots) Eric Dumazet (8): net: move kick_defer_list_purge() to net/core/dev.h net: move dev_xmit_recursion() helpers to net/core/dev.h net: enqueue_to_backlog() change vs not running device net: make softnet_data.dropped an atomic_t net: enqueue_to_backlog() cleanup net: rps: change input_queue_tail_incr_save() net: rps: add rps_input_queue_head_add() helper net: rps: move received_rps field to a better location include/linux/netdevice.h | 38 ++------------------ include/net/rps.h | 28 +++++++++++++++ net/core/dev.c | 73 ++++++++++++++++++++++----------------- net/core/dev.h | 23 ++++++++++-- net/core/net-procfs.c | 3 +- 5 files changed, 95 insertions(+), 70 deletions(-) Reviewed-by: Jason Xing