From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D616AC02199 for ; Sun, 9 Feb 2025 11:13:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7BAFF820CD; Sun, 9 Feb 2025 11:13:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id et0P6lOh958p; Sun, 9 Feb 2025 11:13:21 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D9E73820C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1739099600; bh=Jqb3kU9s3g6Aw07ltF+l3vk439DBwuYGKZz1WtiKgc4=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nHTbVHhdEoObotZy3Iz7XWHceiqtGCbFkJ2yS83NS/ZJyMQRtkLRUzmfqn3ZsvZFY TR072iKOQD1AMXkfK5IVS2CmI5OqMu08sW5JzK34DpbARxOzX1pfTQ3VaFd5be7+hp Hngyj6XuRTEluiN7A14hC3IFgvEaYHTNv2ufsAKg6I1V/WKCug74FFy+siQsiGfsuD x/KoNZINFNWXllDUy1jKUJSi/nUKzNPmuQIgDAAvjuAPMt41tISfQU33bomEc/2Y30 AHeT5jmXdvIXHQvm6W/uaDCDteXzwWMrU2iYK83yJ5S4AV8FKv6DqXa6wvC3s9RDJc q9DOcDFfy23Pw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id D9E73820C3; Sun, 9 Feb 2025 11:13:20 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id CAE85C2 for ; Sun, 9 Feb 2025 11:13:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AEDED820C8 for ; Sun, 9 Feb 2025 11:13:19 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id HlBnZGrPUHCr for ; Sun, 9 Feb 2025 11:13:19 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1458F820B4 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1458F820B4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1458F820B4 for ; Sun, 9 Feb 2025 11:13:18 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 353025C57DC; Sun, 9 Feb 2025 11:12:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E11CC4CEDD; Sun, 9 Feb 2025 11:13:16 +0000 (UTC) Date: Sun, 9 Feb 2025 11:13:14 +0000 From: Simon Horman To: Jedrzej Jagielski Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, Mateusz Polchlopek Message-ID: <20250209111314.GC554665@kernel.org> References: <20250203150328.4095-1-jedrzej.jagielski@intel.com> <20250203150328.4095-2-jedrzej.jagielski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250203150328.4095-2-jedrzej.jagielski@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739099597; bh=TLYauqIxGxZkb3ojnclsL59eGEmdz8oHXimrxn4uxCw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PYTM30Cff9Q/PDKB+cwGdnmtbjN1FS0oULLRRhQkNEvEhLJh1mdXlGKxRWVQjvV/g jbWylwabaeVE7Qd91FXqHPDycO3MdWJ/FQI8EvRQfb7KXzYmqBhH/uQU1S19sgOy6M 8rNrpmdzP+7xxkDVwlstSBmk0n2Y0oQ6YBeLizzEW365m9GZ2tJiJEoqiz2HyuNKaF E3Ikxq/l2w9381+35sOvpmSvaVxynn9M2Sw+yckkcWY8lCzb/M4Jv+wjXfDBHaDk3V tB0m21DwjjhfXcXcFEdA+g96WnkvLckxHS5dNgKYwMTC4l3vwJfl54J0FK8azwKgcg 1efdjNj7EFofA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=PYTM30Cf Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1 01/13] ixgbe: add initial devlink support X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Mon, Feb 03, 2025 at 04:03:16PM +0100, Jedrzej Jagielski wrote: > Add an initial support for devlink interface to ixgbe driver. > > Similarly to i40e driver the implementation doesn't enable > devlink to manage device-wide configuration. Devlink instance > is created for each physical function of PCIe device. > > Create separate directory for devlink related ixgbe files > and use naming scheme similar to the one used in the ice driver. > > Add a stub for Documentation, to be extended by further patches. > > Reviewed-by: Mateusz Polchlopek > Signed-off-by: Jedrzej Jagielski ... > +/** > + * ixgbe_devlink_register_port - Register devlink port > + * @adapter: pointer to the device adapter structure > + * > + * Create and register a devlink_port for this physical function. > + * > + * Return: 0 on success, error code on failure. > + */ > +int ixgbe_devlink_register_port(struct ixgbe_adapter *adapter) > +{ > + struct devlink_port *devlink_port = &adapter->devlink_port; > + struct devlink *devlink = adapter->devlink; > + struct device *dev = &adapter->pdev->dev; > + struct devlink_port_attrs attrs = {}; > + int err; > + > + attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL; > + attrs.phys.port_number = adapter->hw.bus.func; > + ixgbe_devlink_set_switch_id(adapter, &attrs.switch_id); > + > + devlink_port_attrs_set(devlink_port, &attrs); > + > + err = devl_port_register(devlink, devlink_port, 0); > + if (err) { > + dev_err(dev, > + "devlink port registration failed, err %d\n", > + err); nit: I think we can fit this onto one 80 column-wide line (just!). dev_err(dev, "devlink port registration failed, err %d\n", err); > + } > + > + return err; > +} ...