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 C169BA034F; Mon, 7 Feb 2022 14:30:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5736410FF; Mon, 7 Feb 2022 14:30:01 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87]) by mails.dpdk.org (Postfix) with ESMTP id E086C410EA; Mon, 7 Feb 2022 14:29:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fTIN87b4Cg2+K6Xx6OdEPkGWXLXPhbwUo84YhZxYen9tmK7Hyl547Iwa9U3vLp6fYqWaP2voB91yOsbGX2q0mxHELQsylGWFKptns5tYtCrmZ8x/JSlDy3yU6i+rzCYu1RDAIZKjsBeKAWiL9q0ZsW+KRGnkTk6Cc6cppQwG0SgI4ewkzP7x19HH7qJrh/M5cZam2+PiT/pk2lxzc1t7k/ybxu1FKQ+r8uqLpUmMBdYgF7m65p5htq/z3qz5ZmH5mEqv8awG94f1z1AFgnv8VvLQ63yo/wXu1ZF5ie3pKC3aLDtt5vu++i4eOe9TR0EoO0mk2kL2mZHcFd9Vp1wIeQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xliw303x8AA7Pg+oMjhqJW0mKybSDAeYIeMUMBFomXY=; b=O88bpeRK1UtPm4Yvwxjfnz1lBRQRIHUqJWUykEWhUlhwy3D2Tg+zpY3/ytmB/VTTxHU97nzobgZDietYBYMGos3E/ZMUvkpHVKnJFHbMwUk9nghBVgio4J8fOJi6MVpn40z7vosSRG5YQ1Vx6yuQBBj2MwhDB2UcmnMeNrLHlmt7L6YCVfoTpHBUqGsEbLRz1syQTEORKVlNhURRCgkV4PwTQraQYBN5QCdQGzJ3bNDLFDc3JaOid7dws4wE1DpTpASC2D7Qv+o8fEZ0m9d1UhaXryz83aO7zI3NacGEvxPJRu8aZrILuY29lBqcULIP7YP5tiwhnpFBD1aI76lVLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=Xliw303x8AA7Pg+oMjhqJW0mKybSDAeYIeMUMBFomXY=; b=iftSEcnSLiT+FCaSsc4PdsryMYU67KDoKvV8NJi+2b3hSvlVYXF7pvH/XtHb6L9LtU0LM894c1s4l4Tzb74gDAkJbdg08af32dpfTnfFJtvb1omRwrEAHRjFZLZuaDmtm/Bm5nhxZkp8yIOKIo4rbeylnFdrTSTuCZBCEQtliJzwxR5187XkFzI843Q/nx+OrcKGyH0ahOBMwvyMMkIFWwNrJiCOZaJwd334j+zog4hKdGQbYj2WPrXC4nk4OfYDL8I+ZuYFPEE78eGlbhH3WbDxYQtRNnfiAbXD2hMkVdfb1tw+5tEu2wJaQURd0RYJ9oPGLsOTSBqY1JX92E4WHw== Received: from BN6PR14CA0001.namprd14.prod.outlook.com (2603:10b6:404:79::11) by BY5PR12MB4854.namprd12.prod.outlook.com (2603:10b6:a03:1d1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.14; Mon, 7 Feb 2022 13:29:57 +0000 Received: from BN8NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:404:79:cafe::90) by BN6PR14CA0001.outlook.office365.com (2603:10b6:404:79::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Mon, 7 Feb 2022 13:29:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT014.mail.protection.outlook.com (10.13.177.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4951.12 via Frontend Transport; Mon, 7 Feb 2022 13:29:56 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 7 Feb 2022 13:29:56 +0000 Received: from pegasus01.mtr.labs.mlnx (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Mon, 7 Feb 2022 05:29:54 -0800 From: Alexander Kozyrev To: CC: , , , , Subject: [PATCH] net/mlx5: fix Meter capabilities reporting Date: Mon, 7 Feb 2022 15:29:41 +0200 Message-ID: <20220207132941.929213-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 542a43e8-d79e-40b0-a726-08d9ea3deee8 X-MS-TrafficTypeDiagnostic: BY5PR12MB4854:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 40xPMy/olGaTLCyGg2zWHtGub542Py2995d+6maUk9Ovrh8c5HwE3/QZYFJ2MewBopy50PhWgdk1EwnK3qTTo7V5G13BSYqcsQKgw1Yynz2KemAj6Juk/7vr2vVahw9Inb7cORgADrqE0KcYph4eyQn+1lbQipfz3z4JZyLAWDhJKCt6HLk8HelFlia7eFAY3m842i+ljznVnvJ+57N/nRKMOi1k4wEK55R3xVSWAQyyk5yn/+1idSV0Wi/GLhIEC1lFKQUPnrCB80lDOabzkf/F7AZCg1zf3ZU2nSL3Bwo7qRb8avrutU66IIhRIcGIejCItCYQkVjLD9MGeigM/xxOhrkIWUi0/SHA8LqYeOc+Pux4nQAoo8OStWaA3dWNjm1NYI5wQGhCaU1zggjGoZxV+tKrPlBSbBj5ck7/TX24+WTpDL15HE3hnxvMTnqZry1CnvowGjlv58xtxWFx5039WEMefn+3c2Ixx4mwB60tvWUPD5JzPiO6QoMCnQcAKXaMoUJG3NAbZVdhjB02SxdqzFrS5q6iaWRq/z4/NoZGL5UBoACTwCM/WmimxBK4ecIisCIAOZGyJibj7sKgbd/kVzFhphvdzlY2HdPX308rYCyEwe0kU3vb0BazhsZSvp4swE9Z9WOD0EV1RFcpq4UOo4/yZli8xPVFwnDqwjp1fM0v23JL9xoF2d6sFSOstqO1XZtmCG4Y5rRGJkKtgQ== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(4326008)(107886003)(8676002)(8936002)(81166007)(356005)(5660300002)(70206006)(70586007)(450100002)(316002)(6916009)(86362001)(508600001)(2906002)(54906003)(336012)(26005)(47076005)(36756003)(1076003)(2616005)(186003)(426003)(82310400004)(36860700001)(6666004)(16526019)(83380400001)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 13:29:56.9890 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 542a43e8-d79e-40b0-a726-08d9ea3deee8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4854 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 Meter capabilities reporting is not up to date. Mellanox NICs support RFC2698 and RFC4115 as well as RFC2697. Add these marker operations to the capabilities list. Fixes: 6bc327b94fe ("net/mlx5: fill meter capabilities using DevX") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_meter.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c index 0dc7fbfb32..d99cc61dd6 100644 --- a/drivers/net/mlx5/mlx5_flow_meter.c +++ b/drivers/net/mlx5/mlx5_flow_meter.c @@ -437,11 +437,14 @@ mlx5_flow_mtr_cap_get(struct rte_eth_dev *dev, /* 2 meters per one ASO cache line. */ cap->n_max = 1 << (qattr->log_max_num_meter_aso + 1); cap->srtcm_rfc2697_packet_mode_supported = 1; + cap->trtcm_rfc2698_packet_mode_supported = 1; + cap->trtcm_rfc4115_packet_mode_supported = 1; } else { cap->n_max = 1 << qattr->log_max_flow_meter; - cap->srtcm_rfc2697_packet_mode_supported = 0; } cap->srtcm_rfc2697_byte_mode_supported = 1; + cap->trtcm_rfc2698_byte_mode_supported = 1; + cap->trtcm_rfc4115_byte_mode_supported = 1; cap->n_shared_max = cap->n_max; cap->identical = 1; cap->shared_identical = 1; @@ -449,7 +452,10 @@ mlx5_flow_mtr_cap_get(struct rte_eth_dev *dev, /* 2M flows can share the same meter. */ cap->chaining_n_mtrs_per_flow_max = 1; /* Chaining is not supported. */ cap->meter_srtcm_rfc2697_n_max = qattr->flow_meter_old ? cap->n_max : 0; + cap->meter_trtcm_rfc2698_n_max = qattr->flow_meter_old ? cap->n_max : 0; + cap->meter_trtcm_rfc4115_n_max = qattr->flow_meter_old ? cap->n_max : 0; cap->meter_rate_max = 1ULL << 40; /* 1 Tera tokens per sec. */ + cap->meter_policy_n_max = cap->n_max; cap->stats_mask = RTE_MTR_STATS_N_BYTES_DROPPED | RTE_MTR_STATS_N_PKTS_DROPPED; return 0; -- 2.18.2