Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1658317iof; Tue, 7 Jun 2022 09:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH7qQKhoQoIFKzqTLXG4SGS2z08kvBtaGCH4T2pALCsj7OD5P+82Cdv/iXP6B7EvA1uTF2 X-Received: by 2002:a17:906:4482:b0:70a:19e3:d18a with SMTP id y2-20020a170906448200b0070a19e3d18amr26128997ejo.510.1654618878841; Tue, 07 Jun 2022 09:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654618878; cv=none; d=google.com; s=arc-20160816; b=aYG1ucMWlkgrpBSFMPBv/18u7aBB97PDk0FFFZ+JkjczuifzTG2U2yzuY43DCU+5gE ghg1rMC8Tix5QjkbN11yQHcDu9A8Gu5pBEDTHiwDPNia70e0vuFaLFh+r4o3pe8jWIDs ylYM6RpaeXLwOR6P9e9G7NciIRch8whvogoZxYVr/xuAubA6Rda7J5edmfN949fu6NA7 zsBF63Yrab9a6VkeAY3Xchrp38CEAmOlF1W9v++rQe95F1j9AM+7Sp32qyvOAaaOqQ3+ BQjswNpkuRXbeH+msTYUjrWWasymvKtYuPLkJpQTuzWFpoVsxg5dIbSYPuw5i1HbZQ3g nYXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NQtGmReL9tYs/rsUkGQnBBs2vJV7zYIMXD+HoS/Qh/o=; b=QUa29dLw8pQAG1gA9/jMV55fyQyDOxVgo9UzTVaSr9uymw87uHQSMXqRjhhPJeXVuy okrcSeUXOpJNWFT4tiVM97Db6bJOTa53e1W4JTxV8N/lt4oWa9EUscs5VMAiK16qdbs5 GYxxmUX3U9UN0jmuxfIhAvbxsVK2pn02UxXsBAv6a5n6YI+GM6XZsWo35VwW6HrE9rhi HgLY1VFYyis7yCQp2j8zLcwnuiXdkqECh3XqK/5aORGiNwXzrhzFyzQNDuoczyhkkTri kXi8uIZlBag0rpwZ4x2NvMzzsvhMw985wepUpQc3/YCqT/o91tE5SybL9sWoGR9lJZjZ gUZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kB/tK727"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j22-20020a1709066dd600b006fea036b38esi19035728ejt.310.2022.06.07.09.20.50; Tue, 07 Jun 2022 09:21:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kB/tK727"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244165AbiFGMrz (ORCPT + 99 others); Tue, 7 Jun 2022 08:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244164AbiFGMry (ORCPT ); Tue, 7 Jun 2022 08:47:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D607B101C1; Tue, 7 Jun 2022 05:47:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9A8B8B81F6E; Tue, 7 Jun 2022 12:47:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2617C3411F; Tue, 7 Jun 2022 12:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654606071; bh=NvuhODq4GKtjVjoVnfnscoVLEkUMXgKJpbwCX235sk8=; h=From:To:Cc:Subject:Date:From; b=kB/tK727Fege3K1q7uMQeqxt8E1dt+K5k5R2ZbiPVF5fFgCA/w4e09kaoEN2I9bsm 5fRIZ2GaVoQ2HVxy6xrROPYRNAUsOHvqghqOA210UhSiDnhlhupXgXEbUbgvheaBP0 BHLxSLcci60dZ9bHTpsU3tmEQ4U0rm6EPGdLAddlBr0tAmwvoEmEmclz/RXlbBZ8P3 T/kOTkl5X2CBwuiPUUwar4WF4ndtgoSYkeU5sN9duGm67YNeNYynwtiuVWUvG1ZCY+ AgfjiOGP8wkcDfMgnp6hZuo6XAeS8v8fcCqyLUBUwbZi0+kpiFUX8PMYEWRnJDFdCn 7ZNkgyJIB19xw== From: Leon Romanovsky To: Jason Gunthorpe Cc: Leon Romanovsky , Erez Shitrit , Eric Dumazet , Jakub Kicinski , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed , Yevgeny Kliteynik Subject: [PATCH mlx5-next 0/3] Add ICM header-modify-pattern RDMA API Date: Tue, 7 Jun 2022 15:47:42 +0300 Message-Id: X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky SW steering manipulates packet's header using "modifying header" actions. Many of these actions do the same operation, but use different data each time. Currently we create and keep every one of these actions, which use expensive and limited resources. Now we introduce a new mechanism - pattern and argument, which splits a modifying action into two parts: 1. action pattern: contains the operations to be applied on packet's header, mainly set/add/copy of fields in the packet 2. action data/argument: contains the data to be used by each operation in the pattern. This way we reuse same patterns with different arguments to create new modifying actions, and since many actions share the same operations, we end up creating a small number of patterns that we keep in a dedicated cache. These modify header patterns are implemented as new type of ICM memory, so the following kernel patch series add the support for this new ICM type. Thanks Yevgeny Kliteynik (3): net/mlx5: Introduce header-modify-pattern ICM properties net/mlx5: Manage ICM of type modify-header pattern RDMA/mlx5: Support handling of modify-header pattern ICM area drivers/infiniband/hw/mlx5/dm.c | 53 ++++++++++++------- drivers/infiniband/hw/mlx5/mr.c | 1 + .../net/ethernet/mellanox/mlx5/core/lib/dm.c | 42 +++++++++++++++ include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 7 ++- include/uapi/rdma/mlx5_user_ioctl_verbs.h | 1 + 6 files changed, 85 insertions(+), 20 deletions(-) -- 2.36.1