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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 9AC56C5478C for ; Mon, 26 Feb 2024 23:45:17 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=dZ9yY35a; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TkHKm0T3Pz30NP for ; Tue, 27 Feb 2024 10:45:16 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=dZ9yY35a; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=bootlin.com (client-ip=2001:4b98:dc4:8::240; helo=mslow1.mail.gandi.net; envelope-from=maxime.chevallier@bootlin.com; receiver=lists.ozlabs.org) Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [IPv6:2001:4b98:dc4:8::240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Th5Cz1Dzcz3c0n for ; Fri, 23 Feb 2024 21:02:38 +1100 (AEDT) Received: from relay8-d.mail.gandi.net (unknown [217.70.183.201]) by mslow1.mail.gandi.net (Postfix) with ESMTP id F0A1FC0A3F for ; Fri, 23 Feb 2024 09:56:40 +0000 (UTC) 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 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) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com X-Mailman-Approved-At: Tue, 27 Feb 2024 10:43:30 +1100 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose Abreu , Andrew Lunn , Paolo Abeni , Mengyuan Lou , netdev@vger.kernel.org, openbmc@lists.ozlabs.org, Tomer Maimon , Russell King , Jiawen Wu , Alexandre Torgue , Eric Dumazet , Jose Abreu , Jakub Kicinski , Vladimir Oltean , "David S. Miller" , linux-kernel@vger.kernel.org, Heiner Kallweit Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="dZ9yY35a" 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