Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1151520rda; Mon, 23 Oct 2023 04:26:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzm+4IW0x0/zIgIFDwWjdJxXKxn5prkK/Alg6qRPiXhkdvVxh7DjpT+lxwmWl3hK7nTxAL X-Received: by 2002:a54:4504:0:b0:3ab:73a6:1469 with SMTP id l4-20020a544504000000b003ab73a61469mr9960829oil.14.1698060391347; Mon, 23 Oct 2023 04:26:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698060391; cv=pass; d=google.com; s=arc-20160816; b=r97zrjeB1GNgZcZvOCY2WxZgBhSShwQd9qoTENhXMOJ0MbQu2qzUZu8Qa7o+VP+0k1 BRbf1CQBdLuJ3N5bhqdDGTq2vVQsx+KtLmq84uGdRDS5kiulZsVgVdHSCHPb1J6+YJsn oNCizPRu4cWVskqsSUQEJc/9JWuJavuKceHKtV2sStOjQONbCHAhRBsY5bJ+uqixmevQ RYRdbOzIk0xeLYaaYNnT4hkv0VuLKKT8vweZGc40NE6/vZujMr4mJwmUXlcdEgMyDNE/ OiZoefMsPL9mlJgl3+eJj+9QishDhoUOcct2ZjWKiH8RU8ejLUuJg2jjX0wK81zeeXob Wvkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=r0UkUfOi1Jsz+x8fFtUBasbLgAP6ZOEBYnUptzLGy4E=; fh=SzUdtxNsEqKhJ2SBGJNM262YeomjWQjVA+H++NHJha0=; b=vmUAb5NWRB+edXBLkbqzhdSqXW04EWToWXgi8g6RyfIJ8qtVpmzmvXN6dQJneyJWn1 BQbNwoZNX9+k/dfKmVYAxjxe6afITU1dX/aloV+HSaqcohuVByPLKWLobWTn0O7Q+IOU +hMaWxwPOvTQU2lOMnroLDT20Mj3kFZdXQ5LueQDehxnoaSlrPp3sVMV5tVNNhRHM+Td vKKqXFF5tTZZK3re9/rnU1CjEfcNvGSMpbsc6jLQ4QJN8naTx7hCdmxPWCn3qsb1YtRr y+gN8CpG7Eahgen2VvTTfxMWUIEPF/eY5SuraPBhcW2CPdckZ/un9q7JdihG00UO6Qu5 lrdA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=cUsY+BrQ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id k18-20020aa79732000000b00690b88a9c32si6131931pfg.82.2023.10.23.04.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 04:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=cUsY+BrQ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 93E3F807D402; Mon, 23 Oct 2023 04:25:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233872AbjJWLZF (ORCPT + 99 others); Mon, 23 Oct 2023 07:25:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233900AbjJWLZC (ORCPT ); Mon, 23 Oct 2023 07:25:02 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2065.outbound.protection.outlook.com [40.107.223.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DFACFD; Mon, 23 Oct 2023 04:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfDBCNoJSKEdBdp4P/bhiVXtYMriLrM8HP5o8qoQD6U10NiJTTOp2GVIDCj4TufpoOTp5qOv8ecbf7XAmnBzj012zRzXladS1HwTIZ+iTTrmXeziwblKR9oJlEYZrQbuABGCdhZvoQJSvgd9SChw/+wLY1jeEdN8WBrSmXofJQGlbvYS3C6IJXY2m/kANPxrLCyO28aBdiNU0T04zdfNGcT3uUQvvLVpU+/z3pK2DU5mimL8lt47cndoeNW9luMKS6BkXF+3K50Aj4fiVYD+/HysqoxRCuRWVoAyPd2Ve5FkI71sd+frkMcTUurSpTd4IYrBXHJ7TqSeV5OwdyZmVw== 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=r0UkUfOi1Jsz+x8fFtUBasbLgAP6ZOEBYnUptzLGy4E=; b=B/lXaNZPyY2kJo6yszMrNlad5VHbohnTDsGy6JtrAOBplbnPa5bkZb/QX+oSza01gUTepKaroEdZye/LrH7f+eaWU0Zn8b/eDqIqEgjFO481e56NGHz1x72mC/lUgPAC7IwbQT6B90L8IBxoLAfE32lQpTAWN6I1nGcfFVQOQ3uB6Q/vR+WUUcI596IOEYGqyOGVw44YqFxacKHP2xCN7vYfPbPMsh7Xx3Ecvuvn53ikZu6jMDSJJCrd71CXst9BPYN1tasGJqw728z+2ix//sbzweABMnGlRtJiSSVe5ZYwGyY+Ky2vrokN+yFR8QuAHboB6tgdg0kpiQZJ79v8ZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=r0UkUfOi1Jsz+x8fFtUBasbLgAP6ZOEBYnUptzLGy4E=; b=cUsY+BrQbA8uHuQVgRBMMsdemWl4ORd+ovo/3i61M6qS59yFIfNDHm8oNU8CI8X6UrzDUGDTdYqB5zG6l0Tavro9ZVJNoqzWz6MTuehumyYtl2piEP03vzuimPXjO6234RQOnD2qNvNgV2lk0DE6bpp9p9hhWgupoG0vCjYLpc/DuE0YRq/I2CZcmRLa8gMKjZUbQXCXoFUAt0jSpp2SndVpL76czzElv6YYPtndgcbPiglAVc7lcpaVLTXRG17OnlAAH8T9aeigFKMwCJGBek0Z+rzXCzO8Z5wzsZxtohQuYNQqXedByUSudnjNLwcpt0sbcRI+ZFZHUVmgAWNG/w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from PH7PR12MB6660.namprd12.prod.outlook.com (2603:10b6:510:212::10) by DM4PR12MB6469.namprd12.prod.outlook.com (2603:10b6:8:b6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Mon, 23 Oct 2023 11:24:52 +0000 Received: from PH7PR12MB6660.namprd12.prod.outlook.com ([fe80::1f1d:ef30:13b2:ca9d]) by PH7PR12MB6660.namprd12.prod.outlook.com ([fe80::1f1d:ef30:13b2:ca9d%4]) with mapi id 15.20.6907.032; Mon, 23 Oct 2023 11:24:52 +0000 Message-ID: Date: Mon, 23 Oct 2023 14:24:46 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH iproute2-next 2/3] rdma: Add an option to set privileged QKEY parameter To: David Ahern , Petr Machata Cc: jgg@ziepe.ca, leon@kernel.org, stephen@networkplumber.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org, huangjunxian6@hisilicon.com, michaelgur@nvidia.com References: <20231019082138.18889-1-phaddad@nvidia.com> <20231019082138.18889-3-phaddad@nvidia.com> <87il72aiqm.fsf@nvidia.com> Content-Language: en-US From: Patrisious Haddad In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR4P281CA0085.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:cd::10) To PH7PR12MB6660.namprd12.prod.outlook.com (2603:10b6:510:212::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB6660:EE_|DM4PR12MB6469:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c2dfe58-0694-4f31-8237-08dbd3baace8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BiUEEHWKmI6GHuVL8syB8w5RIvd7Ro0n0DIyrysc+AKPMH9PpdMFeXuhd5pZe9DfUG5/BKKhSPfkLLUbZp/V53EhTJBihuISDhA6ZwfY3r8lNNJjQwasF3Nx0DXp76m6a+ZfgcPuE0jQV4IJxJWqVFVTSn2MfdnR7zQZksPX+XeyorqVdTdVZDV8K7IqGJbTU3i5Sh0ezL2nwg5lpz623guep0FCok9dmvMCcWa6BL22efp6xMb+5RD47zcy+vw0EvraybJOCpLCN4pEY9s8Bz+WGKq0+bE7X0sF1EhLlWSvRqGc58j8m5lZ1RFs1qDvvWiG0/mAqS2hrvo1HdRlLbhzDPmIOl1Q6MOo4tTqVsxKMzE0IyaJVuqKNWZlH3prAHdhgDO9qHC6/tDnZrz+al1qb1YaMJPycxL0RVjSpsS4W/EFSxr+KFTYbcYP6FffYiL4xExhtPYvjm4jHsK4B7isV3XWod9vcbPcGX360GRpQMlqQDwRbrnp8ZC8Gh9eaxY1yVCJh84a+NO+2sJzgGlaTXl1Rd75RiZAddWMyVaO89kFs0R/+Vqjy206dsoFJZs8O1092EYYPGsdgmMJc5QCkf+r6tcVtu1HteZoVjUbhzQxJ63WgB6aal9ntbthiEneeGQaJQdQertivB0izw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB6660.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(376002)(366004)(39860400002)(346002)(136003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(53546011)(6512007)(478600001)(36756003)(6506007)(6486002)(6666004)(86362001)(41300700001)(26005)(66946007)(107886003)(66556008)(2906002)(316002)(110136005)(6636002)(8936002)(66476007)(5660300002)(8676002)(4326008)(38100700002)(2616005)(31696002)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bUlhSzBHV1RQaEp4NC9JWUR5bi8vRGJ0K2tHUk5abVVpSUczMHlIdmhBWVFR?= =?utf-8?B?SHVEeGlNcjlyekJ2NktmNllSVUZ0ZndWanEwRjNmNnhwL0JjTGliRWFKemtF?= =?utf-8?B?VFF0bEp2UFYrZXEvczZCVFVtMGFIYWR6MzNTNEJTSzdnMG9pVWFDam9z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0Y4MG4vRjE4Z0kzWVc5dkJWZ3E0RFA0NHRZRytEMCtuOXdYT2Fu?= =?utf-8?B?WkFrQTJnUC9JS1pHSWNPMm9qZmM4OFBYU1o2NHN3TXZINWJkSXBZaStmMVE0?= =?utf-8?B?Zk4rVCtSQmI1T0lmQm5NVzZIME4zUjVwVG1xWlVEMkdiR3laYjlPMEk0UEwv?= =?utf-8?Q?DCextT8kDZgRGTxpFNeqaUgEO?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c2dfe58-0694-4f31-8237-08dbd3baace8 X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB6660.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2023 11:24:52.4391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dv46sKz++YfJE+gLoU+6vGvdtolzhTeavURABy61Uv4UhNepb5twV/X4bCHlKR29qGwEC0ImUg0UxDdbJ9Lkew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6469 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 04:25:22 -0700 (PDT) On 10/22/2023 7:48 PM, David Ahern wrote: > External email: Use caution opening links or attachments > > > On 10/22/23 1:41 AM, Patrisious Haddad wrote: >> On 10/19/2023 1:38 PM, Petr Machata wrote: >>> Patrisious Haddad writes: >>> >>>> @@ -40,6 +45,22 @@ static int sys_show_parse_cb(const struct nlmsghdr >>>> *nlh, void *data) >>>> mode_str); >>>> } >>>> + if (tb[RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE]) { >>>> + const char *pqkey_str; >>>> + uint8_t pqkey_mode; >>>> + >>>> + pqkey_mode = >>>> + >>>> mnl_attr_get_u8(tb[RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE]); >>>> + >>>> + if (pqkey_mode < ARRAY_SIZE(privileged_qkey_str)) >>>> + pqkey_str = privileged_qkey_str[pqkey_mode]; >>>> + else >>>> + pqkey_str = "unknown"; >>>> + >>>> + print_color_string(PRINT_ANY, COLOR_NONE, "privileged-qkey", >>>> + "privileged-qkey %s ", pqkey_str); >>>> + } >>>> + >>> Elsewhere in the file, you just use print_color_on_off(), why not here? >> The print_color_on_off was used for copy-on-fork which as you see has no >> set function, >> >> I was simply trying to be consistent with this file convention & style, >> whereas print_color_string was used for the other configurable value >> ("netns"), I can obviously change that if you all see it as necessary. >> >>>> if (tb[RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK]) >>>> cof = mnl_attr_get_u8(tb[RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK]); >>>> @@ -111,10 +155,25 @@ static int sys_set_netns_args(struct rd *rd) >>>> return sys_set_netns_cmd(rd, cmd); >>>> } >>>> +static int sys_set_privileged_qkey_args(struct rd *rd) >>>> +{ >>>> + bool cmd; >>>> + >>>> + if (rd_no_arg(rd) || !sys_valid_privileged_qkey_cmd(rd_argv(rd))) { >>>> + pr_err("valid options are: { on | off }\n"); >>>> + return -EINVAL; >>>> + } >>> This could use parse_on_off(). >> You are absolutely correct, but just as well was trying to maintain same >> code style as the previous configurable value we have here, but I think >> using parse_on_off here can save us some code. >>>> + >>>> + cmd = (strcmp(rd_argv(rd), "on") == 0) ? true : false; >>>> + >>>> + return sys_set_privileged_qkey_cmd(rd, cmd); >>>> +} >>>> + >>>> static int sys_set_help(struct rd *rd) >>>> { >>>> pr_out("Usage: %s system set [PARAM] value\n", rd->filename); >>>> pr_out("            system set netns { shared | exclusive }\n"); >>>> + pr_out("            system set privileged-qkey { on | off }\n"); >>>> return 0; >>>> } >>>> @@ -124,6 +183,7 @@ static int sys_set(struct rd *rd) >>>> { NULL, sys_set_help }, >>>> { "help", sys_set_help }, >>>> { "netns", sys_set_netns_args}, >>>> + { "privileged-qkey", sys_set_privileged_qkey_args}, >>>> { 0 } >>>> }; >>> The rest of the code looks sane to me, but I'm not familiar with the >>> feature. >> If no one else has any comments soon, and these two comments are >> actually considered critical I can re-send my patches with those issues >> fixed. > tools packaged with iproute2 should use common code where possible. Okay, good point, fixed both comments and sent a V2 , it actually resulted in a much cleaner code. - Thanks.