From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (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 8751932A3E5 for ; Mon, 16 Mar 2026 04:26:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773635215; cv=none; b=css6/LoCjqBM6KVm6ElO6CRRJzQQRDu2q3kz/TY0EHvrcTTadLyl64LY0UX9YBrhOifuKF8pMRiRG75mqEDsswO3A6gAK6KjrDH73je4r0/r8OBq1nhEwYFrjzluS4A4coEpKkXUj50ghXvwp7jo2Q1mSLqU6N0KIPqIrKWjN3E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773635215; c=relaxed/simple; bh=4vs8RNGc7MDno4+X32x3Mh+tGMstn+YXEKpVY+sxySA=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=uTGer1qRJWwU/7Ywxqq31GAnKR2cm59P1t0DpVEWoswtOwDhuUAS6+Jp2SyPtp0E7OHdhPuVE5MQfRtYaumn5NXYlyEMLQBfQx2jc8AMgD1QL5wXpLRvNMHR1Q3CHF/qcnSzSvpomyT3Ql/tDKl+AntUsgBsTLbgPAJWgkHxV/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Aq51PXRO; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Aq51PXRO" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-827270d50d4so3922298b3a.3 for ; Sun, 15 Mar 2026 21:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773635212; x=1774240012; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=QG6YmZw2q5tnLzZ0HARS5dPxw6jYWbvpIUxUxyo/SI4=; b=Aq51PXROcONEBWQuUS0xKvq/C90pfpb0wxCCmfR/O8rXyGqZvYC7b7CEJXipXnqVin U6e/4qf7R6o4kIHRM2SORYgq5MHaC+l0jW/Gm+kTWK/eUpjk3G423T/YQ7TJY1kY6RDU 6ILUTqaKNz98kjuBLraijOWcIN9bj9pV1xvezm81O5Wv7qv5S2rGxZAn3NMt4L8+sDfT H0JgmVI0uThdGC2LJcMVaVvqQrlSVEFFSLCE96UF1rzJEnvBUsqrCcBEO3BWIqk1EL2r suKeuqbqCM/5N5Ai4ZJ6nggFAfM3YPBT2nokBTivZ82y51C8Ws7xDPvjNza1atbuwaED AV1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773635212; x=1774240012; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QG6YmZw2q5tnLzZ0HARS5dPxw6jYWbvpIUxUxyo/SI4=; b=psAg/Vw3DpKTBF1d4hB5fXg1stcR2NZcjY2YEKrtf9xmyFBYOh9BKIArmeP1Bchxx/ NrTk9t7uKSExLv8WI3l2q6LTwXOuxzanwTjg/da//MGMxR70YP5S0Lik9Z7i8NklKtbN 7WmbZnOmRthea6UNA3KscB08mVOGO1+STYu/6TYJ+nJgbwb2uULtm2akWeQiqn2yZLVI PfzffbbLnUDzVYpu6ITISYHgxQEPRcd0AFhFE1+Ml6kusBmER65bccpjBlZucJlUWBoa MkAeQh5qJsx84mQ25bEQGgFY5k9lgXQcVXhm2hkaE/VM3D1D5ZcnaiVGiULgIPgON/+8 U0sA== X-Forwarded-Encrypted: i=1; AJvYcCVeYXcnsaXz5+RBzxo5vxkjgeriS9gQZP4jAchAVTwnw5QlGqDVc2Qgt5IUs32gzm3oW3ujbeY88h+iDMQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yx61iRAfc/tL92ciYaHPb/Dpp6tEJnxgZuSFlsD+nbD3v8lz+qR pN2lYChTa/kZLxrfPYZCI2CuObaLy3ETgvxnOcgO0dyXr7/6QQWRMr/I X-Gm-Gg: ATEYQzxvOtS3AczTAGlnUdBzuC72hWSqGRQOxwPep2IeFBToZMZ/GKeT+CCXW+KHkAr S6skpBTxhbwuRD90J1u94bj2inGhQFpFrGW03H9Pm6PE6gf8wX6M8iKMDKEXMQp/mMSVraLoqV1 NLG4oS6CBscLo5TxIa8NNwQSWtZR2aWP44DsT6GOwckq3W2gfycgUDIT2OG7dPVDwrqsQStra4y DM6gMEWy9dNorAtLZE0o4sa/W7MMh3D53ozwzSB14dwOUGUzqQx7mLqqV6dcjw0DBYcciDm04ii IayTU3HsSqv5N4Ndxxql8dsN5eZHcG++UCPCE8+cAgOfMKfIEYF0urPGNv4fa/pB1FBuJ20LKb9 5DEM6uiCmmgQtG8qRU7a2dH44v5gSmlzwdhhXA0VoqiOZx/NrjFM0wfHxUhBCA13Dn1HHuIH5jR J0NVejI8c0CfX5tPHONs/lLekhkpE5wWhETpH5oqtvn1/Y6w0rriwrZb2mB09fV6BPCnXf X-Received: by 2002:a05:6a00:929f:b0:829:822e:cdc9 with SMTP id d2e1a72fcca58-82a1970498amr10802677b3a.2.1773635211899; Sun, 15 Mar 2026 21:26:51 -0700 (PDT) Received: from 1.0.0.127.in-addr.arpa ([240e:34c:5760:3860:bc29:deed:92d0:823c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82a0738422esm12180267b3a.55.2026.03.15.21.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2026 21:26:51 -0700 (PDT) From: Hangbin Liu Subject: [PATCH net-next v3 0/5] net: centralize master device offload feature computation Date: Mon, 16 Mar 2026 12:26:08 +0800 Message-Id: <20260316-offload_compute-v3-0-a5d4a07d86d3@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/3WN0QrCIBhGXyW8zvinbbWueo+IcPq7CZsONVmMv Xvi1SC6/Dic860koDcYyO2wEo/JBONsHvx4IHIQtkdqVN6EAWuAV0Cd1qMT6iXdNL8j0rOETmj BEBgj2Zo9arOU4oNYjNTiEskzk8GE6PynXKWq8L/VVFGgXOlLK6FF0dT3fhJmPGVeWontff7rs +xr3cmrxFrVIPf+tm1fUZn7QPgAAAA= X-Change-ID: 20260310-offload_compute-4c0bafa2e022 To: Jay Vosburgh , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jiri Pirko , Nikolay Aleksandrov , Ido Schimmel , Simon Horman , Sabrina Dubroca , Sridhar Samudrala Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux.dev, Hangbin Liu X-Mailer: b4 0.14.3 Currently, master devices (bonding, bridge, team) manually call netdev_compute_master_upper_features() scattered throughout their port add/remove operations. This approach requires each driver to remember to update features at the right times and leads to code duplication. The series adds a new ndo_update_offloads callback that is automatically invoked during feature updates when upper/lower device relationships change. This centralizes the feature computation flow and removes the burden from individual drivers. --- Changes in v3: - ndo_set_features may be skipped when no feature change, fallback to use ndo_update_offloads for offload computation (Simon Horman) - Link to v2: https://lore.kernel.org/r/20260313-offload_compute-v2-0-ffbc8ce5d50c@gmail.com Changes in v2: - Fix macsec Security Entity uninitialized issue (Sabrina Dubroca) - Tested with macsec-offload.sh, rtnetlink.sh, link_netns.py, all pssed - Link to v1: https://lore.kernel.org/r/20260310-offload_compute-v1-0-3df79c09ea65@gmail.com --- Hangbin Liu (5): net: add ndo_update_offloads for offload computation net: use ndo_update_offloads to set offload features for bonding/bridge/team macsec: move netdev_upper_dev_link() after macsec_changelink_common() failover: use ndo_update_offloads for failover offload compute net: no need to disable LRO specifically drivers/net/bonding/bond_main.c | 13 ++++---- drivers/net/macsec.c | 23 +++++++------- drivers/net/net_failover.c | 66 +++++------------------------------------ drivers/net/team/team_core.c | 14 ++++----- include/linux/netdevice.h | 7 +++++ include/net/net_failover.h | 7 ----- net/8021q/vlan.c | 2 -- net/bridge/br_device.c | 6 ++++ net/bridge/br_if.c | 6 ---- net/core/dev.c | 11 +++++-- net/hsr/hsr_slave.c | 1 - 11 files changed, 55 insertions(+), 101 deletions(-) --- base-commit: 5446b8691eb8278f10deca92048fad84ffd1e4d5 change-id: 20260310-offload_compute-4c0bafa2e022 Best regards, -- Hangbin Liu