From patchwork Thu Aug 4 09:18:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikas Gupta X-Patchwork-Id: 12936226 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 597C8C19F2B for ; Thu, 4 Aug 2022 09:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239082AbiHDJS5 (ORCPT ); Thu, 4 Aug 2022 05:18:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239008AbiHDJS4 (ORCPT ); Thu, 4 Aug 2022 05:18:56 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A203E3A481 for ; Thu, 4 Aug 2022 02:18:55 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id r186so17427158pgr.2 for ; Thu, 04 Aug 2022 02:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=message-id:date:subject:cc:to:from:from:to:cc; bh=mxCMEt6cNqwpKTgj5VUFOPpINOd7C8Oi7BY15j8uOPQ=; b=Q2X6LIcQ7gxV571taf2Fg/43Yu1+jgol9sR7Bo9SO2Z4kPOXJ0yfKNtXHG5sa2Hg0M P3cOiGTp7WgMVF709wG2dKLAHIHufuSkm23hBzuFzACAzzb2V8oyds29/bHEXaGEiHy6 yKSoz2wjhy3eeRukLG32QA+z4X6d+2IP117tA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=mxCMEt6cNqwpKTgj5VUFOPpINOd7C8Oi7BY15j8uOPQ=; b=Yht9z9Hqg3NNgAn7IOOxtf3TKwT461MuMkB/g8U3yX+isOhip6EUlmOjNqGRs1yL6A S6iP3neQaEI9+dj1IR4LWOlAZ7pe9GdLJ/y3WPatMucKodk+XcgSTchbiU9oDMmz6qan S2IbXEyKTuXrPV+KQoa7AzNn3yLC9R1Nc59K8iIWaOBCgf7yrhY0QkBnhgevz7QmnXzB +xKfh74kLOySdB8aRxJ9qTAeYLuuLO40vZg6L99UoDyyH1JXuhGp7ym3kPPMjfjAtCMg hqTMZsYmFUt7XoMQP6FjEtf+Y4pwNTwbsHkM1C6oehXrbXPR1Ys1pBxQN1CDE95QTfpQ HLCA== X-Gm-Message-State: ACgBeo3P2AV/z02tothshv9ZNLb/g+AG+tM2EdH3FkygcXgs3lV8L97a kvrixDmrP2wAELHiHZZCkGRR4Q== X-Google-Smtp-Source: AA6agR4ON492pT25DSxWWTBvkBUHgVG7RANfNqSk8uMVCTG+CJhV7ZXMhok4GYRl+iUSMMtVgfSjeQ== X-Received: by 2002:a63:5743:0:b0:41c:b4fc:92ba with SMTP id h3-20020a635743000000b0041cb4fc92bamr870159pgm.540.1659604734992; Thu, 04 Aug 2022 02:18:54 -0700 (PDT) Received: from rahul_yocto_ubuntu18.ibn.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o2-20020a170902d4c200b0016d6963cb12sm344773plg.304.2022.08.04.02.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 02:18:53 -0700 (PDT) From: Vikas Gupta To: jiri@nvidia.com, dsahern@kernel.org, stephen@networkplumber.org Cc: kuba@kernel.org, netdev@vger.kernel.org, edumazet@google.com, michael.chan@broadcom.com, andrew.gospodarek@broadcom.com, Vikas Gupta Subject: [PATCH iproute2-next v6 0/1] devlink: add support to run selftest Date: Thu, 4 Aug 2022 14:48:01 +0530 Message-Id: <20220804091802.36136-1-vikas.gupta@broadcom.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com Hi, This patchset adds support in devlink to run selftests. A related patchset for kernel has been merged. Below are the few examples for the commands implemented in the patchset. Examples: $ devlink dev selftests run pci/0000:03:00.0 id flash pci/0000:03:00.0: flash: status passed $ devlink dev selftests show pci/0000:03:00.0 pci/0000:03:00.0 flash changes from: v5->v6 Remove header file(devlink.h) patch in v5 as its already updated. Resolve conflicts in devlink.c due to rebase with iproute2-next but no change in implementation/functionality. v4->v5 Addressed the comments by jiri@nvidia.com. Change in json output for seltests show command. v3->v4 Updated with the UAPI kernel header and hence related implementation for selftests impacted due to reorganization of enums/attributes. v2->v3 a) Update the implementation of commands according to the latest patch set of kernel devlink patch. b) Added bash-completion. v1->v2 a) Changes required to implement command due to changes in kernel patch (under review). b) Added commands descriptions in devlink-dev man page. Thanks, Vikas Vikas Gupta (1): devlink: add support for running selftests bash-completion/devlink | 30 +++- devlink/devlink.c | 328 ++++++++++++++++++++++++++++++++++++++++ man/man8/devlink-dev.8 | 46 ++++++ 3 files changed, 403 insertions(+), 1 deletion(-)