Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2270793rdg; Sun, 15 Oct 2023 21:01:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEl1t5GOvNJBUuZAA67+og09SjfIAh2zf0oK4h+lhNCJoDXkG6nv5Pyw6XnonNo8/ARt9/l X-Received: by 2002:a05:6a00:3695:b0:68e:2c2a:aa1d with SMTP id dw21-20020a056a00369500b0068e2c2aaa1dmr9040981pfb.11.1697428866804; Sun, 15 Oct 2023 21:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697428866; cv=none; d=google.com; s=arc-20160816; b=Cyfsc4A8tCOeE79ZmEkiwvTcB9kYNcmZxKpMUXd83RUDnXvEp4OUwJIoiqRJbRoNy0 xYhEdlCszpcDgC6M/Av+dcorPSJmqRfJvZlpX9CoyYZ0GJr2Mx3mk2F1HXLuUymHwvJb kf2uFzaDyIZv9rcxQjYpUE0jhwIZMiiRJigy28o6oVTx01Kr8KdaiGcL5rsNoChS0VJJ pCMSq3WeCvuL85s18K8UxPmalCDQxWku4UDIcBIAD779Q0kc8qya4SE89/+httjj4K/F NasU1jGGmHmmQQBqoSiZBQRB9xA48cWXtqEqfnb9/PZleqWLNvNdNI2wbjqqMDidM40o bzNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kL9vRKZWkxdmpBYxrVOOiXDRyOSSPaW0P3GH4wQ9cEk=; fh=hqiA8Ms9Q0JVosifsmOwCyirqfz92DIOqnsqxf7d32U=; b=0khi5NpVwsodteBcz7CK4kNZ7+/0ASFLPFZ03urtJYqOoi03W3nm3Bh/vM/EKfZSeL m2e03QG5MeuOZFrQO1RrQAf2ewLwotSdldLGcrFrlX9dIeniuGoqmRea5eomUJr6jnro 3gEhVM7KBqE1h4gTPMZCmjwwGcY+7C850tS104uz4l1SZ3wsaZ9sNEey6/eftMl5hQAJ II7wJBm/DzsyUMcXLY3ZB53iRarNaAgdNsbcK2gQ2Rt1iNMWYKbrHKKgjPvQaaRrmkmF PzPsINv/DvNoIku23ZFWXfecAV+LwI+pizoKredSyZ0vwym4pqjYzFO4HlW2fvhQL8p2 8YRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mhq42raT; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id y62-20020a638a41000000b005ab1f1ef721si6767032pgd.888.2023.10.15.21.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 21:01:06 -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=@gmail.com header.s=20230601 header.b=mhq42raT; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4A6B38077934; Sun, 15 Oct 2023 21:00:23 -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 S229623AbjJPDyW (ORCPT + 99 others); Sun, 15 Oct 2023 23:54:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbjJPDyU (ORCPT ); Sun, 15 Oct 2023 23:54:20 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 285DEAD; Sun, 15 Oct 2023 20:54:17 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-3513c435465so9510535ab.0; Sun, 15 Oct 2023 20:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697428456; x=1698033256; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kL9vRKZWkxdmpBYxrVOOiXDRyOSSPaW0P3GH4wQ9cEk=; b=mhq42raTGwJn9yXLL3Ru0L3K1S2lpdnQjnTg/eYfYw8vEPofywb7Mlv7QWuKSCJQm7 ZIp7jszwzB8go5LtqKkfXiuNI0LC2U69h1m5gTDof86+iGcD6zDjrIJ9ITqsljpSmm/S TCG1ejjmuUgHMGGg7NAM4G+wRvCtf0DZoO6Q9fDPg4ssNWLOv98PbBeGWVGBc5V9pL5w j7WpZv35At48Ydcaan77wy8nL48V+dCfFzmgD++yU9gWrUxGm6LdL4jP+RXAtZyF6vRR F6x2vOcGtL2XqDstOr1Y2667QGJuRvmchv09onKxeMsJdN60g9zXAadqx2C8XM7ebReO cbcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697428456; x=1698033256; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kL9vRKZWkxdmpBYxrVOOiXDRyOSSPaW0P3GH4wQ9cEk=; b=m4Mw5/Mu40VPxn5kz3TBfkpW6lIKwMaKWg2IG7YLZ1IGdfnS0SUBhGOWwert6kidal Ez0xIvQQjN1Y2BUKLiqqXw34URcspbqnEEBWXuJwHdP7gI6yrs0+E+vSkGIOsxx86p0E Mvl7Eu95T4ix1LAxixC81iZcCkR7G+qLiMBtAJmzaXu9/g9OuYLt6Ui26JsW6tS6AtXO JouX8YwQ8WgIDJzolWj+NUQPJgjUtQWgQmFFltuRke5FJrMf2CLWO4NULWL6+xD34TdH NIsSP9viwBonSoelxERHgDDD3sCIstrz5CXvCdKM5lAKCYEUrR1SjgyKxFotVooamv29 mbiA== X-Gm-Message-State: AOJu0Yxw7tI3ei1nyNFugrOW/JAjNgScEvX+n6FDLLQ72+hEa5YtwxSL bPWgVmNfGKE8Ae9yi8RBV5gCfzlfpWQ= X-Received: by 2002:a92:d1d1:0:b0:34f:7e2f:b837 with SMTP id u17-20020a92d1d1000000b0034f7e2fb837mr4305115ilg.2.1697428456487; Sun, 15 Oct 2023 20:54:16 -0700 (PDT) Received: from ?IPV6:2601:282:1e82:2350:6964:515b:e2e1:e1eb? ([2601:282:1e82:2350:6964:515b:e2e1:e1eb]) by smtp.googlemail.com with ESMTPSA id z16-20020a92d6d0000000b00351268dfbd5sm3113192ilp.57.2023.10.15.20.54.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Oct 2023 20:54:15 -0700 (PDT) Message-ID: Date: Sun, 15 Oct 2023 21:54:14 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2 iproute2-next 2/2] rdma: Add support to dump SRQ resource in raw format To: Junxian Huang , jgg@ziepe.ca, leon@kernel.org, stephen@networkplumber.org Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org References: <20231010075526.3860869-1-huangjunxian6@hisilicon.com> <20231010075526.3860869-3-huangjunxian6@hisilicon.com> Content-Language: en-US From: David Ahern In-Reply-To: <20231010075526.3860869-3-huangjunxian6@hisilicon.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 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 21:00:23 -0700 (PDT) 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); > + > + return MNL_CB_OK; > +} > + > static int res_srq_line(struct rd *rd, const char *name, int idx, > struct nlattr **nla_line) > {