From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 0E7DC1AB6F1 for ; Sun, 14 Jun 2026 04:00:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781409661; cv=none; b=ZaA5Z06m2YpDiSqOFZRKCZoEsKN8zJulgA7bphdPFCffYW3izqfm6RRgN5DIDFucM5VZOeQ1P5GEVpS2pEZhu1EyT/ct92mX8jflCPjdnsq4F75c5GGK+l4XqnJ9WpouOyPxVTC/1uMtbRrUu6ygeRZIemyJIYVP7/JRBFb3xN8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781409661; c=relaxed/simple; bh=APT6um1Gw37K7BhotudONjWhazcoIfn8CWJ3A7ulKkI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rYOJOochVhOa3nVeXz8lV+zfeO09f5xrFXvGKspbdu3emiUnwk1dKmFZroPuOfCFSL6+bSqRwk2Pd2msPC0Mand9z03yLfBj5AY0+tR5ODzamf+XM2bgDe4PbpQ/+GDt9wbeMjq3YXs/zmjSKL9pLiNWKV98K2MId9wrG66o9v8= 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=l6hGXIpg; arc=none smtp.client-ip=209.85.216.52 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="l6hGXIpg" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-36bb3551f6eso1895379a91.1 for ; Sat, 13 Jun 2026 21:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781409658; x=1782014458; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=q49mRONNBYR0JeB0FoFSRUEZksnbOzysOYCNAb9xxlY=; b=l6hGXIpgzKTgu0GF5KE5NyKQ5JIjnIu1HUFB63vTIbWIylCRvDwVFtcXv5qjskkNGI VlxbSJ0Ph6k5wT6K1ZhpRg91M3ppt3+N9x1K97VXsMzd5kXT3tUrs3zLT5bWpplR8Z1T Z0JVebbzWKLNOFqc0COJaCe9GT4XPPZRgg95BPkJgZjL2fiNsOiKD6lBLufGPFYcDY1s 7hIeQAYkCWRzRQzXjNTNAABuD9UfSjv3Hnnre8RoGdkzqsOizqiiP7n1cxpcXuoRK4rk QGLJd7AHnlSejDbPfzSCRAwGdfBjIoglW++i+AzD3snrhLjXJtsVx2yiZimGfmBD6FxC FfFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781409658; x=1782014458; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=q49mRONNBYR0JeB0FoFSRUEZksnbOzysOYCNAb9xxlY=; b=ItlcXhJ3nFxoDFhtp4mvPEhHtX79msedpHusFnXOqRNOgYU3ocwih1TaIbPS6AJe03 5l4O5KxVM1N/HgWdkEDG0LjwIbfiKB0Mg7XqXM6ptv+p9wN+qVtH6lA0OavPPV3NsWdq HwnQ3GpXw3CFszTk9CtQ/OB48akTCPJ+5EpfZ/CEedlU64QgbQr36+ye64Iu0nb5FEOS UWYVw2GMTh95jjku7g68xMUTu+I+rpokUTR6t/90oKg/E5H9rItabmEft9VC9bAwz/FD zf/wBznoIpETQH1uEbwRWlLd0z5ULRzNgAZrabYUgEG1xlH6yKoyANjolr+SZ0teu0o/ oshw== X-Forwarded-Encrypted: i=1; AFNElJ/9wD48a6hWUuongND4XeHZIOYDft37b1ptdBSBAs+ZmB5kS235WD0Ez4Hx0URZnde2N+CIq+CzRdY4pgM=@vger.kernel.org X-Gm-Message-State: AOJu0YzKBDMj/M0KeSc3OL3KTbZlh8yXoHI9IjHwTipDQQ3D3EGf4w5F q+45VRfcsfDjDgxuSlI8vWqtuozSdQc2EOW4lSu0i88Bis0kLA/o54MK X-Gm-Gg: Acq92OF46XY2/lpqDud0IVmn1tG4dJipGBi6NxoRighpmW8IBKYqf6l6B5Qz4jvw2tT T3qSN+Pl99nHGoNlmc88soU68jw3cI6/dM+AqCpchPXUOllFDLrJq7zgOlSqnFrN4jiuIS8ptLa UxWkPo6r1evzMPyNTz+8PnVVUrL74e4ynifCqGbQHtmEOaM4JFyWIQy62tWuy4CBp/C4HPvk8FO wUy6zIvqejx4LxZ5+ym2cttJv8GiFy5Hsw8i/5nn/GotXw3Nb4QLnBx6KSuvlv6gp/nVl+BZLBC pJvE8eeZT4mAMXIh3tCeSgMycFWZxqTvAzjtOhwRqamFaMLpS88FSBBnSgi2LleAswnhm09eFCq T0q52qgjV8Mx0qAvdrV2AjdmCEpXJ2jIgCgxMnMPQiLzUv8yd4Mt3YU4qXjiwjv0eFjPsiKqN0J bsOslZ1upBtelUDiOTZ+S3crldCHtR9g== X-Received: by 2002:a17:90b:5588:b0:367:d850:6a5f with SMTP id 98e67ed59e1d1-37c2bd79bc6mr5257855a91.25.1781409658385; Sat, 13 Jun 2026 21:00:58 -0700 (PDT) Received: from mincom1 ([115.4.79.42]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c8661a67603sm5676983a12.0.2026.06.13.21.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2026 21:00:57 -0700 (PDT) From: Jihong Min To: netdev@vger.kernel.org, Lorenzo Bianconi Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Simon Horman , Herbert Xu , Steffen Klassert , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, Matthias Brugger , AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Christian Marangi , Felix Fietkau , linux-kernel@vger.kernel.org, Jihong Min Subject: [RFC PATCH net-next 0/7] net: airoha: add EN7581 SOE ESP packet offload Date: Sun, 14 Jun 2026 13:00:25 +0900 Message-ID: <20260614040032.1567994-1-hurryman2212@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add Secure Offload Engine (SOE) support for the Airoha EN7581 Ethernet driver. SOE provides inline ESP packet offload for native ESP and NAT-T traffic, with the Ethernet/QDMA path used to submit packets to the SOE block and the PPE path used to bind eligible ESP flows. NETIF_F_GSO_ESP and NETIF_F_HW_ESP_TX_CSUM are intentionally left out for now and will be revisited separately for feasibility. This is posted as RFC because the code was originally developed and tested against an OpenWrt 6.18 Airoha tree, not against the current upstream net-next driver. The original OpenWrt commit used as the source for this RFC is available at: https://github.com/hurryman2212/OpenW1700k-test/commit/7c1b5e662f7790b3d23ed143beadc1dcbf6d15f7 The SOE part is intentionally linked into the airoha Ethernet module instead of being exposed as an independent crypto or platform driver. The user-visible ESP offload control is a netdev capability: xfrmdev_ops and NETIF_F_HW_ESP live on the target netdev, and the feature can be controlled through the usual netdev feature path. SOE also shares the FE/QDMA/PPE datapath, private queues, DSA conduit handling and netdev lifetime owned by airoha_eth. Patch 1 adds xdo_dev_packet_xmit() because the existing XFRM packet offload transmit path does not provide a hook for hardware whose ESP engine is reached through device-specific packet forwarding. SOE needs to consume the skb, add a hardware hop descriptor, steer it to a private QDMA path and return the final transmit status. Drivers that do not implement the optional callback keep the existing XFRM output behavior. Jihong Min (7): xfrm: allow packet offload drivers to own transmit dt-bindings: net: airoha: add EN7581 SOE arm64: dts: airoha: add EN7581 SOE node net: airoha: add SOE registers and driver state net: airoha: add QDMA support for SOE packets net: airoha: add PPE support for SOE flows net: airoha: add SOE XFRM packet offload support .../bindings/net/airoha,en7581-soe.yaml | 48 + MAINTAINERS | 1 + arch/arm64/boot/dts/airoha/en7581.dtsi | 6 + drivers/net/ethernet/airoha/Kconfig | 13 + drivers/net/ethernet/airoha/Makefile | 1 + drivers/net/ethernet/airoha/airoha_eth.c | 668 +++++- drivers/net/ethernet/airoha/airoha_eth.h | 40 + drivers/net/ethernet/airoha/airoha_ppe.c | 606 +++++- drivers/net/ethernet/airoha/airoha_regs.h | 16 + drivers/net/ethernet/airoha/airoha_soe.c | 1896 +++++++++++++++++ drivers/net/ethernet/airoha/airoha_soe.h | 126 ++ include/linux/netdevice.h | 8 + include/linux/soc/airoha/airoha_offload.h | 5 + net/xfrm/xfrm_output.c | 11 + 14 files changed, 3342 insertions(+), 103 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/airoha,en7581-soe.yaml create mode 100644 drivers/net/ethernet/airoha/airoha_soe.c create mode 100644 drivers/net/ethernet/airoha/airoha_soe.h -- 2.53.0