Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2315304rdg; Sun, 15 Oct 2023 23:32:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIfsCzEftNhWi/QereJ77/brRbV0zrgnzq16DsJhCfx2mEdUfOgMBpgqz35OHLGjZwn51I X-Received: by 2002:a05:6e02:216d:b0:357:5179:6456 with SMTP id s13-20020a056e02216d00b0035751796456mr15835260ilv.21.1697437941956; Sun, 15 Oct 2023 23:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697437941; cv=none; d=google.com; s=arc-20160816; b=QTChFC17Mjp8PjBVSV21v6UHcXQ3+ct8vkw4DM9uOcK7XMKNZzYJMBPcQYNAV0Tokx yK7uQ+IisxH2E5HX7GxqioiLUs/UTUloYlaixuKudoIfFVpr0ySRBjjQk1MjSeRk8KSw Jm/sbuuVb6nai8IXXg/2om0nHm/6S+oWpwJwcpCKCdbrJximvhuMA+vFZ/tZXrmJzGqS xoLJ6ZRCG0Sm4wrNBOVJxFQlUjZvp1TubGNqm42KQqCtp4p8dkYng8ehDjc2BjY+sf1H mNJy6DSXXHK46QhxdBY9d9r9mbwA4hDyJc3Yfnn1iZkkRN6KozQVEMGzPqDHwnC91675 tuAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+dVyL/4KbxrSsuLJrIuvVPEZ14uxpiPbEreJe2W4XiY=; fh=K7hjz+IrPdllWTydAqhZCbDsp2NmXehHKyzIfL6GhGU=; b=GMd2mRw5TnEMDIuimoy8R8CkA5R9jtaNRjpr/rYyudEs9wKSJTpqdcNNFp+5/dMAH4 wU2GsWsufmTDlR4MUZ8jVi4yUay486QeBexFovJbx4LFe2+bpE+grxr0+ZzJ3PPiTfXI Wy/8ikIHem9yi5dIO1oCfgOogI5a3/b9aTdyLewZqwHNIPXkAM6s8Jyzg5yH/O/ls6SJ R6XasLbFED/T3XqyMoNZpKrY52o/ZAMECwcYV5KmN3Rhtv+A3X2df2WxfwgnacXY4a7V bU57oA8wdQMWvHbwhL91NOLtDfNlVX0gEYwuqlnKMaz6wLnUxmElYdyMShI6Wl2WAWlI aCpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rwlnOkgC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bv187-20020a632ec4000000b005acb3613baasi6214778pgb.88.2023.10.15.23.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 23:32:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rwlnOkgC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8C7CE80B19E7; Sun, 15 Oct 2023 23:32:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232422AbjJPGcD (ORCPT + 99 others); Mon, 16 Oct 2023 02:32:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232338AbjJPGb5 (ORCPT ); Mon, 16 Oct 2023 02:31:57 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3423EF7; Sun, 15 Oct 2023 23:31:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B17F5C433C8; Mon, 16 Oct 2023 06:31:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697437913; bh=20RcKOCRsPjkWUxtWVxoneCILhiaUiobXL++bhSC4Cg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rwlnOkgC6zccBetdIF/4nLVwLqjuoMzF5HWii0KFLPnswduyOzUkRYmtvzGUKe6H/ x71JAKAzBWDfT2YbB6vDhSivu/5WI9dcUj8YSbMWMFChNyCO+nYUAWtd4Z5wwKjzsK Czqi2PNjt6lzTOoyMwY8OzRwL3CnEGjua5Aqa/EcpbXlU1WyHH/8KikKyysrqW4NcF Waiizhgi2T2ftzXY7vXc8rKZ1RjUcu4YQ8qL8+PKho+32ohOwNEyNMAGM8q3qeu6HG Ail+JDmTZh7Uz+Jz/xlXQe7WtQ8reLHFKBG1VMT55zGExDAk3X5NsNf/Fej2sC/T2b 8h7eP08B+MGFA== Date: Mon, 16 Oct 2023 09:31:46 +0300 From: Leon Romanovsky To: David Ahern Cc: Junxian Huang , jgg@ziepe.ca, stephen@networkplumber.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 iproute2-next 2/2] rdma: Add support to dump SRQ resource in raw format Message-ID: <20231016063146.GA4980@unreal> References: <20231010075526.3860869-1-huangjunxian6@hisilicon.com> <20231010075526.3860869-3-huangjunxian6@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 morse.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 (morse.vger.email [0.0.0.0]); Sun, 15 Oct 2023 23:32:19 -0700 (PDT) On Sun, Oct 15, 2023 at 09:54:14PM -0600, David Ahern wrote: > On 10/10/23 1:55 AM, Junxian Huang wrote: > > @@ -162,6 +162,20 @@ out: > > return -EINVAL; > > } > > > > +static int res_srq_line_raw(struct rd *rd, const char *name, int idx, > > + struct nlattr **nla_line) > > +{ > > + if (!nla_line[RDMA_NLDEV_ATTR_RES_RAW]) > > + return MNL_CB_ERROR; > > + > > + open_json_object(NULL); > > open_json_object with no corresponding close. > > > + print_dev(rd, idx, name); > > + print_raw_data(rd, nla_line); > > + newline(rd); It is here ^^^^. 773 void newline(struct rd *rd) 774 { 775 close_json_object(); 776 print_color_string(PRINT_FP, COLOR_NONE, NULL, "\n", NULL); 777 } 778 > > + > > + return MNL_CB_OK; > > +} > > + > > static int res_srq_line(struct rd *rd, const char *name, int idx, > > struct nlattr **nla_line) > > { > >