From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 72EA3A0A0F; Wed, 30 Jun 2021 09:05:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FA6B41236; Wed, 30 Jun 2021 09:05:18 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2054.outbound.protection.outlook.com [40.107.94.54]) by mails.dpdk.org (Postfix) with ESMTP id 488CE41235 for ; Wed, 30 Jun 2021 09:05:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RZ/4d42VLHKkKGkAK5f6UaOzcXXOoy646g2rFFovdbhfFO/m/571/u34N34/O+JA3+m1Y2ldyCCMd5sonhv3vxIT2Dy+St5E3F3XZMUwbFad7LcNltL+c6TYFQKixIqORMmt16eq+c6oSSam9NCc4yL6eNRkBJPLmStqc6j3ctIw90xThxMJfS95Odu+i0fXzMLTz0eFkyyJwpfm3Sl8vyq4M8EyBBbMKFtceEDtPiOqJB1WUwUNzD9O98qrKZCwpbCrqB+CS1BKaeaJqk3hcsq47Px95rceRG8HAvywtP5UKvWPzbFGNhgXqFWaFre98l8nTTfv48ZKdqb+8KWf8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0rg62N37rlGUuVvRDv87Xc7GvN2Q0Itl3207vt95nkQ=; b=Yq/0+w2SY5LDD2t/1pA2PiMtjH1CZsROsAodNpBwFDRSE/Ga2fsfa2RIFVFM4Mod9uYQCyiy26BaerLnr+A5H5nqz4Uh9tU2OTfetmUIiVrr+C+HjjcjyfD7PnjyhcxWGTkeWoDX35xcQQFxFWQbBgU8ITcoexgogKFZxG0AEvELOPZaLlYUPJDc6F/IzXncTzL2BBSDzfU9jcILyF4wG1iQUccF+APhAzGToE/zjFU/qakyc6TQHg3VfKv3enqaYuv9hQxuMMRCLmc/g+Ii+2vNlvOEee7yUU0enigJeOBQF59iSFXk1FjudILO6AlmYDsd8Xidli8gbtAeBJS0PQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0rg62N37rlGUuVvRDv87Xc7GvN2Q0Itl3207vt95nkQ=; b=q0FxJ8cM84Uha9EMx489NDWtKwZvrMvkdxm/B9O3T287Bo60fvCXXUlERtMyHgl0s0QNJDGNjNJmA9TnKoe3ERQ3+obNBUnfb7DxSOiWLBylUXWB+z1rVmN6tcwn6ziw19G34khIuk9mB381h+g5elnPUaCGjo83nEJkiasqaJE6kjw6+Q+NV8PGGWnhCA8QDhjiwhJX1ZcJNSWHqAMDl+Fr10c/WBbRAVelYnEmbV4z56WXwR33Fb3NXRa+PPEpYjz3LYcTC+rRlWctuFkt0gIraQerbjA1seIE+0TwbavjWk6Im4Hwtj/iQM7tUEQewIk/Yo+oncUVVyqAUodqyg== Received: from DM6PR02CA0102.namprd02.prod.outlook.com (2603:10b6:5:1f4::43) by CY4PR1201MB0007.namprd12.prod.outlook.com (2603:10b6:903:d4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Wed, 30 Jun 2021 07:05:15 +0000 Received: from DM6NAM11FT040.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::4f) by DM6PR02CA0102.outlook.office365.com (2603:10b6:5:1f4::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 30 Jun 2021 07:05:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT040.mail.protection.outlook.com (10.13.173.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 30 Jun 2021 07:05:15 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 07:05:11 +0000 From: Gregory Etelson To: CC: , , , Viacheslav Ovsiienko , Shahaf Shuler Date: Wed, 30 Jun 2021 10:04:50 +0300 Message-ID: <20210630070452.14055-2-getelson@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630070452.14055-1-getelson@nvidia.com> References: <20210630070452.14055-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4d34e1ec-1739-4e49-4e48-08d93b956951 X-MS-TrafficTypeDiagnostic: CY4PR1201MB0007: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2657; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N5dUQEu3C9w4q7y8LktyNw52p+VLTGHmzbzTAx+/UjPVqJLknWkx6oYjqwoxF8IQMDbfnx7XqQ4ZMz0j1R89OKxmtjWLckQ7gNKuIP9mItdarUEsJ6WBXcsJ4Q98Bq/Ko/kAjN86s1LTPE0xCTe/HZ0vPBSlM3epTsaOB+TJWHo1GF/uJp4e35xSXw1Tf9OSL0drzzp0XAzMlzhuAvErclWfAubv/aLuwdME5cF3dbOPpKLxBAbSG3OAieVIFDgcv1s1CgaaVu5PNjbiI1UlJUTnu+cq2Puq8fweyaFecfNE03py3/1KF6sWDmNCu7DymATj4Vd2cOXifGprmO8JtPoElpiJioNMONmUXFTaDl6qX3U1mejuglp2gx7WqNPjvIkTIUzgxMswBIaHudNlV+p2PALGqYj82XaiTlQJq4lQXiOSV5q5SqmXKNnXOPYJgmu/SpAtUq7gqRMxqiAtPEOjCLruchMB+Ob21cON7PR38ZFfkXjOktAOSRdQ5UrOiSyYuWH/MRWPK70iSpo06pxVaM81/axJsT0asVpq/moXigbvZO8+y4fIYFLhWpaRuJZLXf/OLqTxH+OLA5x7lNo8oPaHKacUHNnwRGL6w72rHMYCkKbkFjM2k6zYLYulA8qH8Ny+JVr/DfGTVarkN7v5J22gOwAAjavlgt2zmxd+ev3DccSpN22z6OCllLn5bOlXc4SHAguYLQXM+MY1Qw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(376002)(39860400002)(36840700001)(46966006)(5660300002)(1076003)(356005)(26005)(36756003)(70586007)(8676002)(70206006)(316002)(6286002)(82310400003)(7636003)(6666004)(426003)(55016002)(2906002)(107886003)(54906003)(86362001)(83380400001)(2616005)(7696005)(4326008)(478600001)(186003)(16526019)(47076005)(36860700001)(6916009)(82740400003)(8936002)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 07:05:15.1618 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d34e1ec-1739-4e49-4e48-08d93b956951 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT040.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0007 Subject: [dpdk-dev] [PATCH 1/3] common/mlx5: query for hardware capability to offload IPv4 IHL field X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The patch queries MLX5 port hardware if it is capable to offload IPv4 IHL field. Signed-off-by: Gregory Etelson Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_devx_cmds.c | 6 ++++++ drivers/common/mlx5/mlx5_devx_cmds.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index f5914bce32..9070691332 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -948,6 +948,12 @@ mlx5_devx_cmd_query_hca_attr(void *ctx, (flow_table_nic_cap, hcattr, flow_table_properties_nic_receive.log_max_ft_sampler_num); attr->pkt_integrity_match = mlx5_devx_query_pkt_integrity_match(hcattr); + attr->inner_ipv4_ihl = MLX5_GET + (flow_table_nic_cap, hcattr, + ft_field_support_2_nic_receive.inner_ipv4_ihl); + attr->outer_ipv4_ihl = MLX5_GET + (flow_table_nic_cap, hcattr, + ft_field_support_2_nic_receive.outer_ipv4_ihl); /* Query HCA offloads for Ethernet protocol. */ memset(in, 0, sizeof(in)); memset(out, 0, sizeof(out)); diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h index f8a17b886b..034c40b49c 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.h +++ b/drivers/common/mlx5/mlx5_devx_cmds.h @@ -148,6 +148,8 @@ struct mlx5_hca_attr { uint32_t crypto_login:1; /* General obj type CRYPTO_LOGIN supported. */ uint32_t regexp_num_of_engines; uint32_t log_max_ft_sampler_num:8; + uint32_t inner_ipv4_ihl:1; + uint32_t outer_ipv4_ihl:1; uint32_t geneve_tlv_opt; uint32_t cqe_compression:1; uint32_t mini_cqe_resp_flow_tag:1; -- 2.31.1