Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp860094rdb; Fri, 23 Feb 2024 02:13:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVxjFBRRj8Ie9lvBPSLgdkvHsTz2dU+Cx1EcwDQNyiwhci9HzYNPHYs4Og4wR0JMJ3J2bcI+bi8PVzDjnexCPemiAh73QQvoXF5+aR40g== X-Google-Smtp-Source: AGHT+IEo35Uh29t0U2v60L8eRxJXaI2D42I0cocyQo/tCE7jq0qwRTuEgDaYIjT4hN28v6UwzjYW X-Received: by 2002:a05:6358:783:b0:17a:e013:9586 with SMTP id n3-20020a056358078300b0017ae0139586mr1168582rwj.29.1708683214865; Fri, 23 Feb 2024 02:13:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708683214; cv=pass; d=google.com; s=arc-20160816; b=lGyMgxL4t2PPDMprBHQyj3kS6oEgmMzuusg8fHAnlUuYRSsorOXiR8aTfg5loZ7uO8 Rk34h4qloPeVu/QYwj6sJOx8vwCvE2h9RoEynM4tUucrlW1HP8/+gXAjQ7+pNt39xHj5 Wo4ZO5+/BdygcM3LuJw/wgYiSSilwCL6Kheieq/MxO/qMOva5gwLBjVNxR6hUaxri58X B4xhPQUbM9hii8j8O5ZmgmLVWkHOzSVPv4BqNV+e5S+rAfBkR3OeHzx5Is1OuV60luAo rG+nkT/w8GOqLX0Yih7RKsHpTivdNh8oNYBltHbInSr/lKYsfQgIAiunYyqNv0dVZNTC EMeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=F+3ui4MTey0h3yMuAIR85kZGD6qDVbJZoIy/CfcoFU4=; fh=s3Jmx3QrrSr2KR/D0iwZXG/y7US6NNJ44fhHSEGpy0s=; b=wr949qSk9zCzkLr1CQvwkro11EiGva8W5lL3j47lcCgwH17c1wqjX5EgnToUy7+pIG jdyd1mryppGppm36dvMn9bZ0xvIW2yX5Y+z8dqEIojUCI/Bzw5jRBh8Bqmj0s8s1Wk/r kIWg5FikqMdU5Y1k0deCbMceUmqe2AzVhF1nCj+wLs7D6LoimwyVmKNRb7ArHLVNgl5z PEZMROTD0ELQdwZnEpJ6u+aw4wETxQOzLgx2RfIuRo3pe8N3XUN+vvEIzofrIj7pnxD4 BKMZ2vsxWFG1AkpG54JRXs4mNx2GQ6ikbhAha9jgqn1papIKAMGKPQk8K4zx0irVssI/ TR7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dZ9yY35a; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-78089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s14-20020a17090302ce00b001dbfebb5604si8945847plk.176.2024.02.23.02.13.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:13:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=dZ9yY35a; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-78089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 74625B26184 for ; Fri, 23 Feb 2024 09:56:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 081EF5CDCA; Fri, 23 Feb 2024 09:56:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="dZ9yY35a" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EEE71B95F; Fri, 23 Feb 2024 09:56:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708682195; cv=none; b=hU5sA6YepUZjav3j6UkB7ccYlOAjO+yilH0SVgQDuZsGz+bKkzzsAIIdldpLVdPQ9pbsjz+GXxD17bITWuKXCJiAzJJE7tyY10kwwsleYKtDtZf2yLKEnNTMRN4wtyDMV8AuJc/V+JgIYIJNOLv1yPa1ydWvzR7znIdI2Co1Z0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708682195; c=relaxed/simple; bh=H+5Q8S0fCCHH/72zW00OZ26QcIirOOQqYtSEZXPW3hE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=e9GkB62ISUtb23KvM5apZY5k6T2BQnDI5BhVNAcrTWAIBl3jOMsF3BnlsT/n1dOiWCHXIJ1LSoJzY2Us8RPP+W6pTmUZR+tp3znABCy5e4oLKC+TUrDFr/FbjQMPi26kq8YUvGpqjUSEieNbcY2OkMZg/GWPsUg73Msdd6w7nWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=dZ9yY35a; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id A86031BF20B; Fri, 23 Feb 2024 09:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708682191; 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=F+3ui4MTey0h3yMuAIR85kZGD6qDVbJZoIy/CfcoFU4=; b=dZ9yY35ac+PkpZTeHWyoX8fwl12pTM/KBK+uK5NZOMXMMwRu7nZt/nPeb4WrtkpE4kUVoG JtoC2VWAhV1v9zPBannrTy349VpaZMT8tg4VSG6Q/EWcDRZXFd/h5h7tMPZ9NIMLBVJSiG j9lgUJBiqrBPKpEofmPDCJjpVN7EZIlQ6DFjT09C/lWARcUcc2G6mRte7K9mGNRpbQt7gE a/gwK+Zv3yQWzPPNar2HVpMepeiVcmBZ7FqVUyN8gO6DdzcFP/CYUpFXIkrLEnk+DvwAsZ v47LMvVbmHF26lJbaDZqWd6im5aO9I2IbKkwcrwaomUqmRQiaKtzWnm9+wRr6w== Date: Fri, 23 Feb 2024 10:56:26 +0100 From: Maxime Chevallier To: Serge Semin Cc: Jose Abreu , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , Jakub Kicinski , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Paolo Abeni , Mengyuan Lou , Tomer Maimon , Jiawen Wu , Alexandre Torgue , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 4/4] net: pcs: xpcs: Explicitly return error on caps validation Message-ID: <20240223105626.71b2bcb2@device-28.home> In-Reply-To: <20240222175843.26919-5-fancer.lancer@gmail.com> References: <20240222175843.26919-1-fancer.lancer@gmail.com> <20240222175843.26919-5-fancer.lancer@gmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com Hello Serge, On Thu, 22 Feb 2024 20:58:23 +0300 Serge Semin wrote: > If an unsupported interface is passed to the PCS validation callback there > is no need in further link-modes calculations since the resultant array > will be initialized with zeros which will be perceived by the phylink > subsystem as error anyway (see phylink_validate_mac_and_pcs()). Instead > let's explicitly return the -EINVAL error to inform the caller about the > unsupported interface as it's done in the rest of the pcs_validate > callbacks. > > Signed-off-by: Serge Semin This looks good to me, Reviewed-by: Maxime Chevallier