From patchwork Sun Nov 15 13:42:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 11906413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BC68C55ABD for ; Sun, 15 Nov 2020 13:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B9FF22447 for ; Sun, 15 Nov 2020 13:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727130AbgKONnT (ORCPT ); Sun, 15 Nov 2020 08:43:19 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:41357 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726438AbgKONnS (ORCPT ); Sun, 15 Nov 2020 08:43:18 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from tariqt@nvidia.com) with SMTP; 15 Nov 2020 15:43:13 +0200 Received: from dev-l-vrt-206-005.mtl.labs.mlnx (dev-l-vrt-206-005.mtl.labs.mlnx [10.234.206.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AFDhDYP028844; Sun, 15 Nov 2020 15:43:13 +0200 From: Tariq Toukan To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Saeed Mahameed , Moshe Shemesh , Tariq Toukan , Tariq Toukan Subject: [PATCH net-next 0/2] TLS TX HW offload for Bond Date: Sun, 15 Nov 2020 15:42:49 +0200 Message-Id: <20201115134251.4272-1-tariqt@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Hi, This series opens TLS TX HW offload for bond interfaces. This allows bond interfaces to benefit from capable slave devices. The first patch adds real_dev field in TLS context structure, and aligns usages in TLS module and supporting drivers. The second patch opens the offload for bond interfaces. For the configuration above, SW kTLS keeps picking the same slave To keep simple track of the HW and SW TLS contexts, we bind each socket to a specific slave for the socket's whole lifetime. This is logically valid (and similar to the SW kTLS behavior) in the following bond configuration, so we restrict the offload support to it: ((mode == balance-xor) or (mode == 802.3ad)) and xmit_hash_policy == layer3+4. Regards, Tariq Tariq Toukan (2): net/tls: Add real_dev field to TLS context bond: Add TLS TX offload support drivers/net/bonding/bond_main.c | 203 +++++++++++++++++- drivers/net/bonding/bond_options.c | 10 +- .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 2 +- .../mellanox/mlx5/core/en_accel/tls_rxtx.c | 2 +- include/net/bonding.h | 4 + include/net/tls.h | 1 + net/tls/tls_device.c | 2 + net/tls/tls_device_fallback.c | 2 +- 8 files changed, 216 insertions(+), 10 deletions(-)