Message ID | 20230929071621.853570-1-saikrishnag@marvell.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp4217302vqu; Fri, 29 Sep 2023 11:06:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECd+0KWrnLOLaARKjTCLB5zxhh1Z9pAr6btHnfej7F4jcqjZMcDa/F371kx/8lDT+k0aqc X-Received: by 2002:a05:6a21:197:b0:157:1b5:61ce with SMTP id le23-20020a056a21019700b0015701b561cemr6170865pzb.4.1696010807130; Fri, 29 Sep 2023 11:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696010807; cv=none; d=google.com; s=arc-20160816; b=sn+cw4faOdPgyV5hvVCbgcPB8EAGiuJXNIkLFsu7hYZdlRnfDrLfG/Fqg2+KLT1Lev u68qJaj/iajWVrpDx0nPkzSyAKUUTBWeeXb00x3CF3KJxA7WBgI5dJAKlb/FKkQu21N7 Edue7Vn+/beooB6Pg+vrcu0WRLad71nMh/bXVhO5YL8GQDSJPQoNvY09QSsniaITMH2D elmVk0MrzNth03QZaD9YnDmZrJ3hazcbuW0shHEGxxpB0bYrT7hJZOGYS0o1o7b4vjOB 0YWinMYpBsd/YUZti4z4Ehhpii+TDlLNYbPt6oIE840S1pIxOrHG2hFvG0h93B4b5jdt lH5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=94RtpFu51Ce5agGkfbtbnsnDmNdp9psxf+FTLCufXXY=; fh=OOfg4bT5sxLM4hQYqk/qWw3CyN88sNXQvu7/QqHGOPg=; b=oN2IUSsT4sPhKBdoCF3RsB4fxpwsak0zQnJwspTIOwBU+d/hvI5dvs4ojoP+6CvZD7 1vPs1caWirysP4dC/9AEQv7+eddtgCiD4li8lSHHMeQ0vLNsc1GbiMa04SldQCpSoziv U1n2AhRPmb51iw58OXpC4QMAOlTfGxhEpLDFtCjP2VJ8BKft6Z7lpME/oBfEQ/n2BxbL GQBd4ouR7DDyNVyINS/M5/zQF8G0Jpngq//8J1unTGBFLW0ixAL2uDD4xO5o8wVqYvyL RZcqigSmpGVcIR3z4sz5M2wKMBGTdqrjlBoSIYRTUAuvnNx72lc+f38jTQNyqPk7SJdv MzSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=h6keprQb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id q22-20020a056a00151600b0068a5877bfaesi23118650pfu.382.2023.09.29.11.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 11:06:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=h6keprQb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0D85B81F3303; Fri, 29 Sep 2023 00:17:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232743AbjI2HQx (ORCPT <rfc822;pwkd43@gmail.com> + 20 others); Fri, 29 Sep 2023 03:16:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232663AbjI2HQv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 29 Sep 2023 03:16:51 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2F4C1A5; Fri, 29 Sep 2023 00:16:49 -0700 (PDT) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38T273h4031713; Fri, 29 Sep 2023 00:16:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=94RtpFu51Ce5agGkfbtbnsnDmNdp9psxf+FTLCufXXY=; b=h6keprQb3WE56XxTFf55Q563E5lBPCmj/N4hihsZKRFVnagS2LtTbyq9mwX8mxiKnEht A1rUWYfPe+6ef6sWQ3xY+LkgKJ2K4s5gKECAuCjBm7fb4mME15edacpIKVIYAW/3o84X bAPuLPijcT7/L+O3prVS0UAOCyWvNkuJrKLTnAKf2i8MjTewEaib3p7u2EcBl4Q8qDGi PuD2S7+6gGeC3zPqu86SjBpnYJbeLmkMQAWP5hAbj2Y65D3dE3K6b9hyzX4aG993SJxq JVCtcVs+8eADN315gmSq8/WRlR/lmEnQDRqNFZJibG2ievX3Sp6fk0n8ow9FXZAgxAEJ jg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3td7y6v6gh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 29 Sep 2023 00:16:34 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 29 Sep 2023 00:16:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Fri, 29 Sep 2023 00:16:32 -0700 Received: from hyd1425.marvell.com (unknown [10.29.37.83]) by maili.marvell.com (Postfix) with ESMTP id 231A65B6924; Fri, 29 Sep 2023 00:16:27 -0700 (PDT) From: Sai Krishna <saikrishnag@marvell.com> To: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <sgoutham@marvell.com>, <gakula@marvell.com>, <richardcochran@gmail.com>, <lcherian@marvell.com>, <jerinj@marvell.com>, <hkelam@marvell.com>, <sbhatta@marvell.com> CC: Sai Krishna <saikrishnag@marvell.com> Subject: [net PATCH] octeontx2-af: Enable hardware timestamping for VFs Date: Fri, 29 Sep 2023 12:46:21 +0530 Message-ID: <20230929071621.853570-1-saikrishnag@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: IkEsf7q0yY4W_9T_Gnb3yaF683iI2_ke X-Proofpoint-GUID: IkEsf7q0yY4W_9T_Gnb3yaF683iI2_ke X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-29_05,2023-09-28_03,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 29 Sep 2023 00:17:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778396228121346674 X-GMAIL-MSGID: 1778396228121346674 |
Series |
[net] octeontx2-af: Enable hardware timestamping for VFs
|
|
Commit Message
Sai Krishna Gajula
Sept. 29, 2023, 7:16 a.m. UTC
Currently for VFs, mailbox returns error when hardware timestamping enable is requested. This patch fixes this issue. Fixes: 421572175ba5 ("octeontx2-af: Support to enable/disable HW timestamping") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: Sai Krishna <saikrishnag@marvell.com> --- drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Comments
On 9/29/2023 12:16 AM, Sai Krishna wrote: > Currently for VFs, mailbox returns error when hardware timestamping enable > is requested. This patch fixes this issue. > The subject title implies that this is implementing a new feature (and thus not really a good candidate for net), but the content implies this is a fix for an existing feature thats not working properly. It could use a slightly improved commit message. > Fixes: 421572175ba5 ("octeontx2-af: Support to enable/disable HW timestamping") > Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> > Signed-off-by: Sai Krishna <saikrishnag@marvell.com> Typically the author signed-off-by should go first, and then other signed-off-by are for people in the chain of patch delivery. If the other two co-authored the patch they should have Co-developed-by tag or something. Otherwise I would expect that Subbaraya Sundeepd would be the patch author since that signed-off-by is first. > --- > drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > The fix itself seems straight forward, though the comment is confusing to me. You also changed the return from -ENODEV to -EPERM which makes sense enough I suppose, but thats not called out in the change. > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > index f2b1edf1bb43..aba0c530160c 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > @@ -756,12 +756,11 @@ static int rvu_cgx_ptp_rx_cfg(struct rvu *rvu, u16 pcifunc, bool enable) > if (!is_mac_feature_supported(rvu, pf, RVU_LMAC_FEAT_PTP)) > return 0; > > - /* This msg is expected only from PFs that are mapped to CGX LMACs, > + /* This msg is expected only from PFs that are mapped to CGX/RPM LMACs, > * if received from other PF/VF simply ACK, nothing to do. > */ This comment implies to me that we wouldn't expect this message from a VF? > - if ((pcifunc & RVU_PFVF_FUNC_MASK) || > - !is_pf_cgxmapped(rvu, pf)) > - return -ENODEV; > + if (!is_pf_cgxmapped(rvu, rvu_get_pf(pcifunc))) > + return -EPERM; > > rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id); > cgxd = rvu_cgx_pdata(cgx_id, rvu);
> -----Original Message----- > From: Jacob Keller <jacob.e.keller@intel.com> > Sent: Friday, September 29, 2023 11:24 PM > To: Sai Krishna Gajula <saikrishnag@marvell.com>; davem@davemloft.net; > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Sunil Kovvuri > Goutham <sgoutham@marvell.com>; Geethasowjanya Akula > <gakula@marvell.com>; richardcochran@gmail.com; Linu Cherian > <lcherian@marvell.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; > Hariprasad Kelam <hkelam@marvell.com>; Subbaraya Sundeep Bhatta > <sbhatta@marvell.com> > Subject: Re: [net PATCH] octeontx2-af: Enable hardware timestamping > for VFs > > > On 9/29/2023 12:16 AM, Sai Krishna wrote: > > Currently for VFs, mailbox returns error when hardware timestamping > > enable is requested. This patch fixes this issue. > > > > The subject title implies that this is implementing a new feature (and thus > not really a good candidate for net), but the content implies this is a fix for an > existing feature thats not working properly. > > It could use a slightly improved commit message. Ack, I will modify the commit message in V2 > > > Fixes: 421572175ba5 ("octeontx2-af: Support to enable/disable HW > > timestamping") > > Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> > > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> > > Signed-off-by: Sai Krishna <saikrishnag@marvell.com> > > Typically the author signed-off-by should go first, and then other signed-off- > by are for people in the chain of patch delivery. If the other two co-authored > the patch they should have Co-developed-by tag or something. Otherwise I > would expect that Subbaraya Sundeepd would be the patch author since > that signed-off-by is first. Ack, I will change the author name in V2 > > > --- > > drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > The fix itself seems straight forward, though the comment is confusing to > me. You also changed the return from -ENODEV to -EPERM which makes > sense enough I suppose, but thats not called out in the change. > Ack, I will modify the commit message in V2 > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > > b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > > index f2b1edf1bb43..aba0c530160c 100644 > > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c > > @@ -756,12 +756,11 @@ static int rvu_cgx_ptp_rx_cfg(struct rvu *rvu, u16 > pcifunc, bool enable) > > if (!is_mac_feature_supported(rvu, pf, RVU_LMAC_FEAT_PTP)) > > return 0; > > > > - /* This msg is expected only from PFs that are mapped to CGX > LMACs, > > + /* This msg is expected only from PFs that are mapped to CGX/RPM > > +LMACs, > > * if received from other PF/VF simply ACK, nothing to do. > > */ > > This comment implies to me that we wouldn't expect this message from a > VF? Ack, I will modify the comment in V2 > > > - if ((pcifunc & RVU_PFVF_FUNC_MASK) || > > - !is_pf_cgxmapped(rvu, pf)) > > - return -ENODEV; > > + if (!is_pf_cgxmapped(rvu, rvu_get_pf(pcifunc))) > > + return -EPERM; > > > > rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, > &lmac_id); > > cgxd = rvu_cgx_pdata(cgx_id, rvu);
On Fri, 29 Sep 2023 12:46:21 +0530 Sai Krishna wrote: > Subject: [net PATCH] octeontx2-af: Enable hardware timestamping for VFs > Date: Fri, 29 Sep 2023 12:46:21 +0530 > X-Mailer: git-send-email 2.25.1 > > Currently for VFs, mailbox returns error when hardware timestamping enable > is requested. This patch fixes this issue. > > Fixes: 421572175ba5 ("octeontx2-af: Support to enable/disable HW timestamping") If it never worked for VFs but worked for PFs - it's not really a fix. New functionality enablement is -next material, even if the fact that it was previously disable was unintentional.
> -----Original Message----- > From: Jakub Kicinski <kuba@kernel.org> > Sent: Thursday, October 5, 2023 2:43 AM > To: Sai Krishna Gajula <saikrishnag@marvell.com> > Cc: davem@davemloft.net; edumazet@google.com; pabeni@redhat.com; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Sunil Kovvuri > Goutham <sgoutham@marvell.com>; Geethasowjanya Akula > <gakula@marvell.com>; richardcochran@gmail.com; Linu Cherian > <lcherian@marvell.com>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; > Hariprasad Kelam <hkelam@marvell.com>; Subbaraya Sundeep Bhatta > <sbhatta@marvell.com> > Subject: Re: [net PATCH] octeontx2-af: Enable hardware timestamping > for VFs > > On Fri, 29 Sep 2023 12:46:21 +0530 Sai Krishna wrote: > > Subject: [net PATCH] octeontx2-af: Enable hardware timestamping for > > VFs > > Date: Fri, 29 Sep 2023 12:46:21 +0530 > > X-Mailer: git-send-email 2.25.1 > > > > Currently for VFs, mailbox returns error when hardware timestamping > > enable is requested. This patch fixes this issue. > > > > Fixes: 421572175ba5 ("octeontx2-af: Support to enable/disable HW > > timestamping") > > If it never worked for VFs but worked for PFs - it's not really a fix. > New functionality enablement is -next material, even if the fact that it was > previously disable was unintentional. Ack, will submit the patch to net-next. > -- > pw-bot: cr
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c index f2b1edf1bb43..aba0c530160c 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c @@ -756,12 +756,11 @@ static int rvu_cgx_ptp_rx_cfg(struct rvu *rvu, u16 pcifunc, bool enable) if (!is_mac_feature_supported(rvu, pf, RVU_LMAC_FEAT_PTP)) return 0; - /* This msg is expected only from PFs that are mapped to CGX LMACs, + /* This msg is expected only from PFs that are mapped to CGX/RPM LMACs, * if received from other PF/VF simply ACK, nothing to do. */ - if ((pcifunc & RVU_PFVF_FUNC_MASK) || - !is_pf_cgxmapped(rvu, pf)) - return -ENODEV; + if (!is_pf_cgxmapped(rvu, rvu_get_pf(pcifunc))) + return -EPERM; rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id); cgxd = rvu_cgx_pdata(cgx_id, rvu);