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 9F82643252; Tue, 31 Oct 2023 17:09:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70430402D7; Tue, 31 Oct 2023 17:09:12 +0100 (CET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id CFAFE40284 for ; Tue, 31 Oct 2023 17:09:10 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2802c41b716so2427057a91.1 for ; Tue, 31 Oct 2023 09:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1698768550; x=1699373350; 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=okDt5hQ+dmLkjA4g+cbDtY8kd113lK7yytnxWtEBO3E=; b=Etfnf4I32Mz1ZUIL7zQWoZFH5l0UQInJWHfyS0qGapxF0Ze+DfTcSFoBlzVNtZCh3o 9bZPFYtTuxI+lCBhP4Y2fI1eK6CVELEiydGh7y9mt5TZz7UYwFwpGxgwfr9GQMaybN54 39IZieNjcAdr6hMnXv6FNjU8fRPPcA4sz2LktnfdAmzKZ2vxAcA0yd2acalJ4ylyZs1V UMve3uhZAFtFFiDvYAfkn6YO41MoHcqfOmO8CzAhXZYVx3cp3eN6wAvwGZKI5lndYHOu F4rxXQ9yU0nzRp8e9oOz7X9PU/bwSWqFhVi2LVKdMMaSnFVhV/37cDt/UX6B0GKVL3b5 NPnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698768550; x=1699373350; 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=okDt5hQ+dmLkjA4g+cbDtY8kd113lK7yytnxWtEBO3E=; b=QbaHnnZLo9G57Rk1DXt108gTtkqH4AFe18C83lHvEAIsDMB1jrpTMSFNrGw3f9baah NDaOiLHuY2GUKs+8DZbWwM6SQsA7vf5CKan1hXdowXFvm1r98T/dyTHu05qxKkWNEG3A D6JyscpaXiVz4JhfEGsVVlUFfaMYMQT5Q8i4Rf+NiVHwRvqfYBU5l0Dpqppw9NZiJQoZ UWjjWGtA5XAIR86R6dUuMmayio4L5If+trJXNgltRydS+J7835abcRE2/Av3Dq8PJPRz Qe/Tik6CmUG4tmHtOkNn2jFEanY2cUtGXUlhs1zPaSFVFXXAKCh0R4FNTNXuQHNYuTxv 1czQ== X-Gm-Message-State: AOJu0YzMNPi4iJ+zH67JtWnoprvOXAcLZaMupO6YDVNhJNA35f6BR0w/ nR8jXjbaWhLinsEl9K2hetiKQg== X-Google-Smtp-Source: AGHT+IGSG2/We2YowZ4YFcjQxoraltdfJ/p6PMmAWIuLkhnCbQ2LU6A6RdOjmjVKJsFPkZ/fkT+s0g== X-Received: by 2002:a17:90a:1b8e:b0:27f:fcdb:89c1 with SMTP id w14-20020a17090a1b8e00b0027ffcdb89c1mr9632785pjc.41.1698768549804; Tue, 31 Oct 2023 09:09:09 -0700 (PDT) Received: from fedora ([38.142.2.14]) by smtp.gmail.com with ESMTPSA id gq9-20020a17090b104900b002609cadc56esm1297478pjb.11.2023.10.31.09.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 09:09:09 -0700 (PDT) Date: Tue, 31 Oct 2023 09:09:05 -0700 From: Stephen Hemminger To: Dariusz Sosnowski Cc: Matan Azrad , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , , Raslan Darawsheh Subject: Re: [PATCH 4/8] net/mlx5: add sysfs check for Multiport E-Switch Message-ID: <20231031090905.7cf14956@fedora> In-Reply-To: <20231031142733.2009166-5-dsosnowski@nvidia.com> References: <20231031142733.2009166-1-dsosnowski@nvidia.com> <20231031142733.2009166-5-dsosnowski@nvidia.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) 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 Tue, 31 Oct 2023 16:27:29 +0200 Dariusz Sosnowski wrote: > + MKSTR(sysfs_if_path, "/sys/class/net/%s", ifname); > + if (mlx5_get_pci_addr(sysfs_if_path, &if_pci_addr)) > + continue; > + if (pci_addr->domain != if_pci_addr.domain || > + pci_addr->bus != if_pci_addr.bus || > + pci_addr->devid != if_pci_addr.devid || > + pci_addr->function != if_pci_addr.function) > + continue; > + MKSTR(sysfs_mpesw_path, > + "/sys/class/net/%s/compat/devlink/lag_port_select_mode", ifname); There are lots of DPDK code that reads sysfs, but eal and each driver ends up coding there own way of handling this. Would be good to have common helpers in EAL.