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 3E1DF42D8A; Thu, 29 Jun 2023 11:08:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B494140EDB; Thu, 29 Jun 2023 11:08:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 6856B406B7 for ; Thu, 29 Jun 2023 11:08:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688029733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QN/WdEbfxBYTweUb78G0rC/+uXWeC3Nq0O7O5p92Dy8=; b=Ct5QLGoCiFR38Nj1cpuY91PhTe58eE+TWZlXr4wNFHeEVivuLrPp+noAkLSkmI05o1L0dB BJQyxnKd16CXKYimMVUjI9dVXpYjnMTtoMIgSU/GhQjjkI/bwS5pgKN/X5utkP1wV4pHAT 595yUPfsNUnx3/WUcwhJsPn7XDCtOEA= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-lqV40dHzMgehLP6mLxcz-Q-1; Thu, 29 Jun 2023 05:08:52 -0400 X-MC-Unique: lqV40dHzMgehLP6mLxcz-Q-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-4edb90ccaadso417771e87.3 for ; Thu, 29 Jun 2023 02:08:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688029730; x=1690621730; h=in-reply-to:references:to:from:cc:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=QN/WdEbfxBYTweUb78G0rC/+uXWeC3Nq0O7O5p92Dy8=; b=g+6ygmFpjCQ0kW7nllDYJbeZDjkmiRDb/5gkGVKPNgyK/YMRqSr2pQkdDhBLrKSKtR s+LmJRhmZs9cshlD22tXvSrFD/b/XGtnWvGMMVEoyMTQeWerCYNI4uGVGn70jTWWb5h4 nW6MdRS90syvHT08X6tF90khARkNTtiq60ZszWCfzPWw35liKHYJS9bpJ16AJjPKQjOd 1RZoHkaVKtXAijj5dKfFr/kNz4zGsBVT72JjtNslHjAZ2zhrE9oJNdyPIUdpKPm2HK2c Hekk0xiLUhjPfBHTCKrR6842bASkzG4B8lzEq7+Rzo0MeD1AKEo3Dp9s7tAB/VALWTBt ChOA== X-Gm-Message-State: AC+VfDzPXlljf31mr8a2xUfM1E7UCQAiZW0LYhHR50CrYcepyxSdLdXw F1arXlDWwudabSVi/jiwgSWfZ2kkPl7d7VS9fdE95MxWlP8fkfXHnlpnMvtWcquMEGIf37mRKoa Fkmo= X-Received: by 2002:a19:4f01:0:b0:4f9:5711:2eb6 with SMTP id d1-20020a194f01000000b004f957112eb6mr13797206lfb.28.1688029730732; Thu, 29 Jun 2023 02:08:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oAsKceoxIKK+d4jGEVtIpK6q3IgoUHmGvRGo9P2HPwf7mN1IPY9ZJsksGirI2qV829VI59g== X-Received: by 2002:a19:4f01:0:b0:4f9:5711:2eb6 with SMTP id d1-20020a194f01000000b004f957112eb6mr13797194lfb.28.1688029730416; Thu, 29 Jun 2023 02:08:50 -0700 (PDT) Received: from localhost (2a01cb000f8b9700598da2e1679e8383.ipv6.abo.wanadoo.fr. [2a01:cb00:f8b:9700:598d:a2e1:679e:8383]) by smtp.gmail.com with ESMTPSA id l21-20020a7bc455000000b003fa95c466a1sm11522151wmi.5.2023.06.29.02.08.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jun 2023 02:08:50 -0700 (PDT) Mime-Version: 1.0 Date: Thu, 29 Jun 2023 11:08:49 +0200 Message-Id: Subject: Re: [PATCH v2 0/5] net/mlx5: introduce Tx datapath tracing Cc: "dev@dpdk.org" , "Raslan Darawsheh" , "jerinj@marvell.com" , "david.marchand@redhat.com" From: "Robin Jarry" To: "Slava Ovsiienko" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" X-Mailer: aerc/0.15.2-81-g0946700f4a7c References: <20230420100803.494-1-viacheslavo@nvidia.com> <2676545.uZKlY2gecq@thomas> <2310682.ECZNHGQPT7@thomas> In-Reply-To: X-Mimecast-Spam-Score: 1 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 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 Slava Ovsiienko, Jun 29, 2023 at 09:16: > Hi, Robin > > Thank you for your courtesy about script reviewing. > Please see an attachment - the raw data gathered as a result of tracing, = and brief description. Thanks for the details. I think that most of the contents of the included pdf file should go into the docs and/or into the script help. As for the script itself, the first thing to do would be to fix all warnings reported by pylint: $ pylint --enable=3Dall mlx5_trace.py After that, I have a few general remarks: * do not use global variables except for constants * most of the time, there is no need to use sys.exit() explicitly * print errors on stderr * remember that python has exceptions, it makes error handling easier I would also advise to format your code using [black][1] so that you don't have to bother about coding style. [1]: https://github.com/psf/black Feel free to inspire from the general structure that is present in some of the scripts that I have written: * usertools/dpdk-pmdinfo.py * usertools/dpdk-rss-flows.py (not yet applied, http://patches.dpdk.org/project/dpdk/patch/20230628134748.117697-3-rjarry= @redhat.com/) Cheers, Robin