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 565D445E09; Mon, 2 Dec 2024 18:01:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2691D40270; Mon, 2 Dec 2024 18:01:42 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id B9FC64025D for ; Mon, 2 Dec 2024 18:01:40 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-7fccc26ad01so1186618a12.2 for ; Mon, 02 Dec 2024 09:01:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1733158900; x=1733763700; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=y8xH7LXbt2DntWFJE3dHA+k5Tf8+32xGscJJEF4ZFPE=; b=HrMcETu5RL40W7lojxf1Uv/hHQX8BludMfOn2AhshQCvXJzQ8tYUPI0lYYWUWG6gXa xrW/NuuHE1Jb9YMMASqRgwYRsc1PK9xQhuns6qYiDJz5bF7QDvrjbXFB2/TBPptqR7Gb jBTB0umw/4Xd89gp+hPAA1tl4QrgRlE7FjXjVC67PCMnJgESERmJojHLiUy1+x2sg7nP EmmkKE1O9vH3z79eCIFzo+ClLuoJojR3mPtJylqdQcWnyHUt8S2IuUfQYccCJ5doTtAi RXsmZsu/pkxFWV0LXIxhU1C2sRP7y3z+BstXDnbv869lCKHhaWpoRx/2DpAo4A7pE/fz 7DVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733158900; x=1733763700; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y8xH7LXbt2DntWFJE3dHA+k5Tf8+32xGscJJEF4ZFPE=; b=g3hG+HSabc5JtUfEGMxwqQwnepcTJef4nV/MSyJesUaCrv4Mwca5QlgsMJicV7V9xm xnpkpAigIr3Z2q2waYXAhEN3kiq0JXNxaLS8OVfyXWkWtGSSuvUwN++b5Nw7e5AAn30f 8y8W6wUza6BZkMrRA6gh0BZUvX29kSk4FaOSNgqLXJUtuJQQtWNFPL7vMJ91byG7doxr stEHGbV+X+rH5x6dHQNf+P7uUMsG6S1y2p02ANesrss+q3lHQ1i78vcn31SdDw46EkWB zGH1/h51nmPn7mkws4gZ7Rv5MgGdTwIPiPAOpSSwADVDCsfVy9CR8Hd7gjXSfDAcSTe6 Dfdw== X-Gm-Message-State: AOJu0YzfRt9Wik0xxHA7aLl5HbSwTyJIS20Q2IcDnm6dt+OaAPgkEEDi 8R4uA4WS6xPfU+YqB2jVo5CehO9vxF5Gw/WiRBsIUEgDOHS8vo6I+Ec9x84Ck+E= X-Gm-Gg: ASbGncut2YbB/roXGMTqwNkVOYZez6QWvWzL886vLTKuh4/sBYM57myvL+6myuDVHNj y9nvAxj8qQmdam4ECiYnoEZzL/M3BnSafZKOAQvehOICM4LVvAe12KTn+ad6CpAxW9Mw6DT18sc V9pxnSSLVMQmL7VQfDgfxihBO6B10Ud5Wtm7tXldhFK3AgSUrbxgkA3g9R4i62OSF1d5dyAlWLR /QvAwnWbeREuKWPckCS4DVaEOWRET2dzdf0dL1+Y58xD9qEs2jc7G3aDLSto8ntlzBMPq+88147 1IC5BMu5nkhnsFS5vicqI2T/TAY= X-Google-Smtp-Source: AGHT+IF3BSjc9TO8MAt7x6YTdvA42r15X+wq82yx/iyGhBn2rOS9sjewZDSsUaiGgCQ8UmX8NB6Q4g== X-Received: by 2002:a05:6a20:258f:b0:1db:ed8a:a607 with SMTP id adf61e73a8af0-1e0e0b2af1bmr37078155637.11.1733158899322; Mon, 02 Dec 2024 09:01:39 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fc9c385ed5sm7023060a12.53.2024.12.02.09.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 09:01:39 -0800 (PST) Date: Mon, 2 Dec 2024 09:01:37 -0800 From: Stephen Hemminger To: Anatoly Burakov Cc: dev@dpdk.org, Robin Jarry Subject: Re: [PATCH v1 1/1] usertools/devbind: update coding style Message-ID: <20241202090137.4a02a9f6@hermes.local> In-Reply-To: <3fb9cafaad635d583e20a02610c7c2c9cb7e2771.1733151400.git.anatoly.burakov@intel.com> References: <3fb9cafaad635d583e20a02610c7c2c9cb7e2771.1733151400.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 2 Dec 2024 15:09:34 +0000 Anatoly Burakov wrote: > + # For kernels < 3.15 when binding devices to a generic driver (i.e. one that doesn't have a PCI > + # ID table) using new_id, some devices that are not bound to any other driver could be bound > + # even if no one has asked them to. hence, we check the list of drivers again, and see if some > + # of the previously-unbound devices were erroneously bound. > + if not devbind.use_driver_override: Why is tool still supporting out of date and no longer supported kernel? > + choices=[ > + "baseband", > + "compress", > + "crypto", > + "dma", > + "event", > + "mempool", > + "misc", > + "net", > + "regex", > + "ml", > + "all", > + ], Would prefer that all the types are in table/list and the help just references that list. The next time a type is added, only one place needs to change. Also, I would not trust the output format of ip route not to change. If the utility has to parse output of ip command, use json (-j) instead. This whole section of code is quite fragile: > if devices_type == network_devices: > # check what is the interface if any for an ssh connection if > # any to this host, so we can mark it later. > ssh_if = [] > route = subprocess.check_output(["ip", "-o", "route"]) > # filter out all lines for 169.254 routes > route = "\n".join(filter(lambda ln: not ln.startswith("169.254"), > route.decode().splitlines())) > rt_info = route.split() > for i in range(len(rt_info) - 1): > if rt_info[i] == "dev": > ssh_if.append(rt_info[i + 1])