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 0E77E2772E 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=1781409660; cv=none; b=BGulZNux1AnuR+esAjSgLi/3d3/SyIfwCmkTKhNIQ2Y5yUWibWjtpWAsqhNMlNVkXBSRQLjtAkvfLywhaqGwHnI82waRdbFy5gRf6u5ME0/Jj6NhCu+fpPe+12c0jb/A9TbIFnXqnPx3LOGhqdfHAdPIT6xe64QU+1cQlZUeuDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781409660; c=relaxed/simple; bh=APT6um1Gw37K7BhotudONjWhazcoIfn8CWJ3A7ulKkI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VfpEZxgblQUKHypfuBJxlQlRtptNvyCwwPJMVs/81iPGzB9pEAHXSqlXxMPaJtodHfsErH7v8ZIGU7sNgpacuRrqb05zAtmJr3pKjIqcepeR0TN3zIIaIxW5v9DOYngYoXtDj5sYNRpyt88tWXl4wlW9wm4ZsFMobxq10tc0SSw= 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-36b900f350fso1967351a91.0 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=fZHi8/dPBuQT6zdOg7IwUFnZ6ID82fj8lnEVzlVsuA1t2E+FGRmhBjnywmrEJdkse7 kN5jud8NjoFggRCW25E9mrPS1T0xVpMBopKdBkBdllviL/BpvmIciP/vSFaAihjIsl5F rXoBvV46cWS61j5cumOFVE0NKiNAMqXeMBVCfBSxKwnZ6QoqLHUFLLeAqdLZI9He2fzg I4/7yGjBpw5Xcju0OXAFCSUpNsoz+n8cNTrPzoqY31uay63akyKKjnRLTjUN+t0FZfE0 jweU/UtLNbQC2NIayfTmJiCyO0HFWNs2yYLNl9OHQT0mD7I85SbjcB/IskMXKTXw8PWP bPcQ== X-Gm-Message-State: AOJu0Yz+lvWx26gOel+s8ombv3s7A3mvP4yU53AfWi35XE2UUZ7yW20w n8rSA7vUt5x1/kb0wPPSPhbqEL0JKICUt/Io5PYn382ovLzzjYvFQI10GDUhHtbZ X-Gm-Gg: Acq92OGtRi+YkSo0D1o70gzbFSHryNFgzEues71VooHs4SkDCwz62l7jDn0+1KBZL1Q FyyWq+WNa3lG94trZDcrqPAZ5St0g/F3bqZ5t3JAcSpRxOqEqCVrfE4xtX5Y/xGN65EFANutvVs N19EWwf889PoGbgGGQTSbHCSxJNt1oCD9P5TyJabGN6p2Yb6cCK6Ud3a879hJc5Vq2729RYkHnE hwXq07bcfRrDovsC2rGX9nLvxlZCd03Cm5k2tHeFzcxrVk1m0C6mJbrXfdP29dw8dpAwQ6cORsG Z5nFxz7I1mnqgpRdtFABVEVf7JKPGVEAZuhjE54mvuhijVqzOTcI7ZJZKl54RiC78Hr0L5rQi8Q Jhsu9+QMvORfUWsouXQwTBUkjdizFI7RZTWeAaWHnfp7EZIThfpHmZfoIF1gi/5AVgtoKlOE4Ur hY7qED+jP3yFUt6R/Ee0vfrpOyeMRSMA== 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: netdev@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