From patchwork Wed Aug 9 07:05:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Ghosh X-Patchwork-Id: 133102 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2644397vqr; Wed, 9 Aug 2023 01:26:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFafho+ewLbET27OIK3DwptK8/OJSFqjcpqwgINP7AmBdNj5AYcG2L9lWISQbXlPdQWXMHF X-Received: by 2002:a17:902:6b4b:b0:1b8:16c7:a786 with SMTP id g11-20020a1709026b4b00b001b816c7a786mr2189944plt.4.1691569578513; Wed, 09 Aug 2023 01:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691569578; cv=none; d=google.com; s=arc-20160816; b=bKjACvUmbfi2CzByRfZOunI0erCXtfFDH+2FNnpELSRl4KWPAPFqzNKDSVUvbiS2Q0 m1oHq/XvOwCg2eXNNHwsoty3FCRoDwB81T1nuvcCJ0XPmxu6Et82rXWbXLScKVg6JHAJ 11o0AA57KpyLMetau8Jb2aHDXebRrJJJ9YRhQhaMnyxCoS7KbnL9CF4KIxE0imwlKD1W ZpVp3HRQBD1wbo6iLpLjFGLLcybclEmqzBN4oJ49uoHio/9RQ8Eo1Wwhs7PwLYdwnJYw JVn65zRnv+e5m6MbMkQxTDpsmyFRFDS9jH6W2HXcoFOZ8NE/c5OkQoe7Wtx7lgw0VoRr oDCg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XByIP5J2zsR9geHAsK/CerIO4PGvyKW3M+zGye7jZX0=; fh=zaZMevJusfEyKCjkBAg52tAXDoBEUdsdtBKhQ6uTJKI=; b=BFN2Y3jLYKvDyahYCTOS1/EMNRLEPDLcT72DFgbXyN3N1SMLSniKedq63xWHX0RQN8 SgJQTWNluXLjiMAOLbq90ylzFcazy1q2bK85jyIsytqW72nnOynbF+c5i1mDcAiRZ8Li x/LVHrDj4fIbPCotm8C3OZqPGc2gs39go3uUhgUmM5B3ePWB4XHqojbKGeTCdgy6mcJK cQy+lSDYSCj5weVjwx1tIoa2rf4Aki0tHeWYGSLwsLKgT0bMdXS+QZCG8hXwDLps4S4w 2rUQlNuSIo9cZBYPoAJx42JWZ7Rs6G40lJE1g6NkzXWKgCDdtCZJheJOQiq953YrKbIR 9gKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=DMA0Y813; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a170902f20100b001b53a3fbcc3si8429242plc.328.2023.08.09.01.26.05; Wed, 09 Aug 2023 01:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=DMA0Y813; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231401AbjHIHFy (ORCPT + 99 others); Wed, 9 Aug 2023 03:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231398AbjHIHFx (ORCPT ); Wed, 9 Aug 2023 03:05:53 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 738591724; Wed, 9 Aug 2023 00:05:53 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 378Nol4U010112; Wed, 9 Aug 2023 00:05:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=XByIP5J2zsR9geHAsK/CerIO4PGvyKW3M+zGye7jZX0=; b=DMA0Y8138tLNr26BWCwVp0Tveh2Tz8ZisP4g6tDy7ErsYCmNa3mdJpdxIkZJVcMINgGm LDxC58Y53OcT2RuwZMMkJBbgu3uGAMkkvVBuEYH+t7EGFqFJ26IJeDA3Ydyps99LvQZL gplCB5MKDpbCSBBj+fe8aIp5pIfm1SiX+4oogFnDnOi35UdEds9UrJZ8yapP0gIYfprC bb+PeZzLCetxfPayeRKXiNaXHcukpQS3v8J6YrcbbDb2Trg/TOsx859o4LehgqdTGurf uXi7eyEgM5z7rCLxa87CscltQdwkDpQyVMdWU27QXXOqTD9rPbErrewhtgRx28us4Ce/ sA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3sbkntktqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 09 Aug 2023 00:05:47 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 9 Aug 2023 00:05:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 9 Aug 2023 00:05:45 -0700 Received: from localhost.localdomain (unknown [10.28.36.166]) by maili.marvell.com (Postfix) with ESMTP id 8B93E3F7063; Wed, 9 Aug 2023 00:05:41 -0700 (PDT) From: Suman Ghosh To: , , , , , , , , , , , CC: Suman Ghosh Subject: [net PATCH V2 1/4] octeontx2-pf: Update PFC configuration Date: Wed, 9 Aug 2023 12:35:29 +0530 Message-ID: <20230809070532.3252464-2-sumang@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230809070532.3252464-1-sumang@marvell.com> References: <20230809070532.3252464-1-sumang@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: X-2YEcOpcqSjBkx7SU5DU7YcnW-nYC_z X-Proofpoint-ORIG-GUID: X-2YEcOpcqSjBkx7SU5DU7YcnW-nYC_z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-09_05,2023-08-08_01,2023-05-22_02 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773739262541946818 X-GMAIL-MSGID: 1773739262541946818 As of now we are creating/deleting Tx schedulers when user is setting PFC on/off. The problem is if we have a running traffic on the interface and as we are updating the sq->smq mapping on the fly, we might loose completion interrupt for some packets. As a result of that a watchdog reset is hit from BQL. This patch solves the issue by simply calling interface off/on APIs which will reconfigure all the queues. We might loss the running traffic momentarily but that should be fine. Fixes: 99c969a83d82 ("octeontx2-pf: Add egress PFC support") Signed-off-by: Suman Ghosh --- .../net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c index ccaf97bb1ce0..d54edfa8fcc9 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c @@ -406,6 +406,7 @@ static int otx2_dcbnl_ieee_getpfc(struct net_device *dev, struct ieee_pfc *pfc) static int otx2_dcbnl_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc) { struct otx2_nic *pfvf = netdev_priv(dev); + bool if_up = netif_running(dev); int err; /* Save PFC configuration to interface */ @@ -426,14 +427,9 @@ static int otx2_dcbnl_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc) if (err) return err; - /* Request Per channel Bpids */ - if (pfc->pfc_en) - otx2_nix_config_bp(pfvf, true); - - err = otx2_pfc_txschq_update(pfvf); - if (err) { - dev_err(pfvf->dev, "%s failed to update TX schedulers\n", __func__); - return err; + if (if_up) { + otx2_stop(dev); + otx2_open(dev); } return 0; From patchwork Wed Aug 9 07:05:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Ghosh X-Patchwork-Id: 133092 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2627560vqr; Wed, 9 Aug 2023 00:43:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IET1vs0WK7/HrVWRwyDnNWGLRqRIfWr2NYGxEMYTmzUmOR+DiSHZwDfBRYZ5BqCpUIflv0e X-Received: by 2002:a17:906:2ce:b0:99c:7301:4d69 with SMTP id 14-20020a17090602ce00b0099c73014d69mr1563864ejk.20.1691567019557; Wed, 09 Aug 2023 00:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691567019; cv=none; d=google.com; s=arc-20160816; b=cYxQj9tuFEMYorG8xTJ6UMr6T2bcoex1BuR/Dk3acGHJ2mdasVaHUbhytE9oFkQSQT W4ta9x7nSbJ80fPPrkaVa0142MprFDM2ND1TKV1dAMMQh/JhMP407Sd2RtyTix0wtH7p HcmLtu/Gs4SIfa5j1beyjvP2NcbzqLqmm2gmxhFfHAa5mmoBp0Tl3F1LWbHPBnbl8EOD uh3oBYQH7tMpQ8ycHkNc0M28VpnLVBAmuUpms8mp5d5WUMHI80b/DNzH/oTtwy6iFU1s e2zPcg22OjbiiYahciiEfhnwwzsW96haqovFVfmU29A1jd9nipykzErNsH4OjVBKL92R LD5Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xslIp8z7hUP5iZF3SUe9yWaF9DhbTpnOAZfqCpddnlA=; fh=zaZMevJusfEyKCjkBAg52tAXDoBEUdsdtBKhQ6uTJKI=; b=pkpmw29f4ZS+ZkzSRFD0RJt0wOayqWje1jetk5s++B1irNdIeYXtS3eY7OkiTngH1I ophwWNk1Vdj+kzjqkgrYjyNdZdI4wTlkmKs/M9BCQ8roVsInucP6ILmqOTrYqadS1Ui8 y2dgR8nZAkGUSn+YHO3E5WMcWyLfqx2Bd6mGEaZ8Krvs0VoBsAsTbBavAHiRzk+sY9ux DL0Lb/oL+6pN2ZcJ00JOgiduapo8c3m8wKrAemrJf4XmT8/r3es6oDkSw37IIbFd0R45 3/5y08FLpDIB6rP3Q2MZswHq7ioZNS5ANBWUl3GkRNfsIB+juXIOqotf8uSoRhmMkLxc fWMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=fY9y5arF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g5-20020a17090613c500b00992c195b499si8016278ejc.765.2023.08.09.00.43.15; Wed, 09 Aug 2023 00:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=fY9y5arF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231431AbjHIHGC (ORCPT + 99 others); Wed, 9 Aug 2023 03:06:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231424AbjHIHGB (ORCPT ); Wed, 9 Aug 2023 03:06:01 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3A981FCD; Wed, 9 Aug 2023 00:05:59 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 378NlZGL005941; Wed, 9 Aug 2023 00:05:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=xslIp8z7hUP5iZF3SUe9yWaF9DhbTpnOAZfqCpddnlA=; b=fY9y5arFP3hqUcFmSbN7pxuV9CNTgZvSMcBft8w3y0KxEAxn7WtKG3jp/lNvZy9u/14c DIFxVvlq93Qin3BCI20QSxXEmGov0A0io5fjzuZ10j85G/TEumo/JZPXNuc2Hk8CX8Ki laBjn89qjUXVQYmesrao24DX6MzRmSWAnh38kruIF8/7MWeux/8zkyyl2nSbs6q2IILR V72ZGf/yx8qWmQeT5xmu5HIAC3wShGHx938hZODKXavCXPLTAjwQyJcfZm6lYk4yoC7I WX+FwnUf5MClrBmY6cpZeZgrI9R9pAJyFccRwppWlp7FMWUAd0N9o4ZbVC0M/CPhFKbE uQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3sbkntktrb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 09 Aug 2023 00:05:53 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 9 Aug 2023 00:05:51 -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; Wed, 9 Aug 2023 00:05:51 -0700 Received: from localhost.localdomain (unknown [10.28.36.166]) by maili.marvell.com (Postfix) with ESMTP id AB2B43F705B; Wed, 9 Aug 2023 00:05:47 -0700 (PDT) From: Suman Ghosh To: , , , , , , , , , , , CC: Suman Ghosh Subject: [net PATCH V2 2/4] octeontx2-pf: Fix PFC TX scheduler free Date: Wed, 9 Aug 2023 12:35:30 +0530 Message-ID: <20230809070532.3252464-3-sumang@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230809070532.3252464-1-sumang@marvell.com> References: <20230809070532.3252464-1-sumang@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: SNEZr1FjhnZKxNW0jSorBKDAmC91V7db X-Proofpoint-ORIG-GUID: SNEZr1FjhnZKxNW0jSorBKDAmC91V7db X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-09_05,2023-08-08_01,2023-05-22_02 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773736579568309437 X-GMAIL-MSGID: 1773736579568309437 During PFC TX schedulers free, flag TXSCHQ_FREE_ALL was being set which caused free up all schedulers other than the PFC schedulers. This patch fixes that to free only the PFC Tx schedulers. Fixes: 99c969a83d82 ("octeontx2-pf: Add egress PFC support") Signed-off-by: Suman Ghosh --- .../ethernet/marvell/octeontx2/nic/otx2_common.c | 1 + .../ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 15 ++++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index 77c8f650f7ac..289371b8ce4f 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -804,6 +804,7 @@ void otx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq) mutex_unlock(&pfvf->mbox.lock); } +EXPORT_SYMBOL(otx2_txschq_free_one); void otx2_txschq_stop(struct otx2_nic *pfvf) { diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c index d54edfa8fcc9..c75435bab411 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c @@ -125,19 +125,12 @@ int otx2_pfc_txschq_alloc(struct otx2_nic *pfvf) static int otx2_pfc_txschq_stop_one(struct otx2_nic *pfvf, u8 prio) { - struct nix_txsch_free_req *free_req; + int lvl; - mutex_lock(&pfvf->mbox.lock); /* free PFC TLx nodes */ - free_req = otx2_mbox_alloc_msg_nix_txsch_free(&pfvf->mbox); - if (!free_req) { - mutex_unlock(&pfvf->mbox.lock); - return -ENOMEM; - } - - free_req->flags = TXSCHQ_FREE_ALL; - otx2_sync_mbox_msg(&pfvf->mbox); - mutex_unlock(&pfvf->mbox.lock); + for (lvl = 0; lvl < pfvf->hw.txschq_link_cfg_lvl; lvl++) + otx2_txschq_free_one(pfvf, lvl, + pfvf->pfc_schq_list[lvl][prio]); pfvf->pfc_alloc_status[prio] = false; return 0; From patchwork Wed Aug 9 07:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Ghosh X-Patchwork-Id: 133086 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2623621vqr; Wed, 9 Aug 2023 00:33:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHngHct9sREUaleodMJ1PVtBu2R/kbYrKlk0NogXmi7zsFdW2I9lrpXzQNvTIIjq6ImH9U X-Received: by 2002:a17:906:739e:b0:99b:fdbb:3203 with SMTP id f30-20020a170906739e00b0099bfdbb3203mr1476690ejl.3.1691566414905; Wed, 09 Aug 2023 00:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691566414; cv=none; d=google.com; s=arc-20160816; b=vkXh2kTVAx7HB7/ogLIyHCiSq858cEzMn3+h18uUIOXiyv1LnRBxP0CcIc7Hayf289 cibSGQxoTutdV0eMUBmD9nNm4nBu7wfXriSXdVYUATws1HVHIj2A+/mwjymHBNUwA3OM 2ZJBGvH7BD3MklH978Xvm19fB1ybZuLR+99SSrrlklQIyUdCLFwOiHdgleB6J4IPoOYQ XYqLgGDe9i5FnPAtAqmMKbAZsI34d/428jt1FZBMF/skIumh5f/491WaKsnF/7IVeM69 mwvbh7o9U/FQ/93VbGMhEvfxz6kx1OMVqw81yxzIrMxKGV+8ODsKbqeOv16cRrwy2Lli +sBw== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1Y0opkK+tRx2x7Fg5xU/6zCK9jvWV6W18jQIHkasWTI=; fh=t2PLUjhSR1vjQTYzwkknYqxLhyXBsl4BfPAHuyUGafI=; b=r1T41FHYjlu+FShj8/1XNsJmND+7HjepDHtPdGUAGomE4W1wpXDXvPBT7b7ffceUn3 3NXudOohiSvyZVTV35wHFHm1FY7lSHJ2Pkwvvbfcb6VydGzDQofkECrepdfVLGeAzlZS ULsIsjyGqwzJSJVCU/P2Crac2UkQEDZmkIyerfs4FvYhqA21ihwZlZmg1b4PoOOugpX3 gjiXTyGf5NKHdtLdI2FxhwLyYW912iAMuoGkMgTJy7ZRFN52b6cREVY1Xfd7jylRmFtg X2bXGQFUuSwoaDx5xL4T1yVebos0XPvcfcjNpnX/UX7EyWfOlZdTtwOM+hpqvAhS+2T4 K28A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=R9k20ung; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gj20-20020a170906e11400b0099bcf76e4casi8039644ejb.933.2023.08.09.00.33.11; Wed, 09 Aug 2023 00:33:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=R9k20ung; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbjHIHGT (ORCPT + 99 others); Wed, 9 Aug 2023 03:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbjHIHGM (ORCPT ); Wed, 9 Aug 2023 03:06:12 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83A4A2113; Wed, 9 Aug 2023 00:06:07 -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 379661wo023098; Wed, 9 Aug 2023 00:05:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=1Y0opkK+tRx2x7Fg5xU/6zCK9jvWV6W18jQIHkasWTI=; b=R9k20ungijHcazW5H+msGBphis/iEYJ1XzdUEmXPdBgcxkZ5iZBHrwAbsYc/oYXe81I2 LNof5RPQVN9MPVstJpkfVdoTOHJQrPZdn+AM7liMEyeHSpA646jqtdoXiOp6LJYTbioT uuI4Stx3Jt312aFIUAIZvH6odGsW2Ey3b5I/jJyULN74uOCtLkcD358oImwBU545pVM/ unSIIWiNJCrwKjs1KDaae4XP6qRDbm9K8d2AOpUg1nZQAuB4c6MmS2YZ0jgw6EvuoQ9K 5WflG1Fpqyt6Mnf2GS4d9RZv91A1sgMhOTibQ3x515w8eTriqdKg2xa6igBUcbYWFtrQ dA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3sc57sg62a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 09 Aug 2023 00:05:59 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 9 Aug 2023 00:05:57 -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; Wed, 9 Aug 2023 00:05:57 -0700 Received: from localhost.localdomain (unknown [10.28.36.166]) by maili.marvell.com (Postfix) with ESMTP id C8B393F705B; Wed, 9 Aug 2023 00:05:53 -0700 (PDT) From: Suman Ghosh To: , , , , , , , , , , , Subject: [net PATCH V2 3/4] octeontx2-af: CN10KB: fix PFC configuration Date: Wed, 9 Aug 2023 12:35:31 +0530 Message-ID: <20230809070532.3252464-4-sumang@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230809070532.3252464-1-sumang@marvell.com> References: <20230809070532.3252464-1-sumang@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: T3xAGntLOpXuPAgMz2MTwSJo2fxcMDFm X-Proofpoint-ORIG-GUID: T3xAGntLOpXuPAgMz2MTwSJo2fxcMDFm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-09_04,2023-08-08_01,2023-05-22_02 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773735945529375824 X-GMAIL-MSGID: 1773735945529375824 From: Hariprasad Kelam The previous patch which added new CN10KB RPM block support, has a bug due to which PFC is not getting configured properly. This patch fixes the same. Fixes: 99c969a83d82 ("octeontx2-pf: Add egress PFC support") Signed-off-by: Hariprasad Kelam --- drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c index b4fcb20c3f4f..af21e2030cff 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c @@ -355,8 +355,8 @@ int rpm_lmac_enadis_pause_frm(void *rpmd, int lmac_id, u8 tx_pause, void rpm_lmac_pause_frm_config(void *rpmd, int lmac_id, bool enable) { + u64 cfg, pfc_class_mask_cfg; rpm_t *rpm = rpmd; - u64 cfg; /* ALL pause frames received are completely ignored */ cfg = rpm_read(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG); @@ -380,9 +380,11 @@ void rpm_lmac_pause_frm_config(void *rpmd, int lmac_id, bool enable) rpm_write(rpm, 0, RPMX_CMR_CHAN_MSK_OR, ~0ULL); /* Disable all PFC classes */ - cfg = rpm_read(rpm, lmac_id, RPMX_CMRX_PRT_CBFC_CTL); + pfc_class_mask_cfg = is_dev_rpm2(rpm) ? RPM2_CMRX_PRT_CBFC_CTL : + RPMX_CMRX_PRT_CBFC_CTL; + cfg = rpm_read(rpm, lmac_id, pfc_class_mask_cfg); cfg = FIELD_SET(RPM_PFC_CLASS_MASK, 0, cfg); - rpm_write(rpm, lmac_id, RPMX_CMRX_PRT_CBFC_CTL, cfg); + rpm_write(rpm, lmac_id, pfc_class_mask_cfg, cfg); } int rpm_get_rx_stats(void *rpmd, int lmac_id, int idx, u64 *rx_stat) @@ -605,8 +607,11 @@ int rpm_lmac_pfc_config(void *rpmd, int lmac_id, u8 tx_pause, u8 rx_pause, u16 p if (!is_lmac_valid(rpm, lmac_id)) return -ENODEV; + pfc_class_mask_cfg = is_dev_rpm2(rpm) ? RPM2_CMRX_PRT_CBFC_CTL : + RPMX_CMRX_PRT_CBFC_CTL; + cfg = rpm_read(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG); - class_en = rpm_read(rpm, lmac_id, RPMX_CMRX_PRT_CBFC_CTL); + class_en = rpm_read(rpm, lmac_id, pfc_class_mask_cfg); pfc_en |= FIELD_GET(RPM_PFC_CLASS_MASK, class_en); if (rx_pause) { @@ -635,10 +640,6 @@ int rpm_lmac_pfc_config(void *rpmd, int lmac_id, u8 tx_pause, u8 rx_pause, u16 p cfg |= RPMX_MTI_MAC100X_COMMAND_CONFIG_PFC_MODE; rpm_write(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG, cfg); - - pfc_class_mask_cfg = is_dev_rpm2(rpm) ? RPM2_CMRX_PRT_CBFC_CTL : - RPMX_CMRX_PRT_CBFC_CTL; - rpm_write(rpm, lmac_id, pfc_class_mask_cfg, class_en); return 0; From patchwork Wed Aug 9 07:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Ghosh X-Patchwork-Id: 133085 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2623614vqr; Wed, 9 Aug 2023 00:33:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvxSviAxYjz2fAVRwkZ+Nz56tAF8zTESqn6XS6t5b7L+vEhu5XQVrssShEL04Te4jxwcFh X-Received: by 2002:a05:620a:a10:b0:767:1b8b:91a1 with SMTP id i16-20020a05620a0a1000b007671b8b91a1mr2024822qka.33.1691566414644; Wed, 09 Aug 2023 00:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691566414; cv=none; d=google.com; s=arc-20160816; b=vH/M060EkWqFjgubYRThMcpUnd68nJc/30TgBCJSHynESzj58pRQXrdo7whWP/ArKe CBB8HGjkV+TevxtrpRD+as1Lo/7OHKqyTejdb9PLYNTh2b4RsPp1JY51sYN73IZpF+EF nh9zDWnpkXXyRDgeixez3AcYeV1fXa+5z+mh8d32mTQtYf4Y8nsjbW0sm4y+yCOnC5Tg ljJ9uyOeiIRtY7Z6i14c3P76f/U93qM4nhj8rgb3bgdWK600kWX71RhaOAtZv9Ce+kFD FwdfME8f0+nKCzU4ogBvJKFMbzQ1+fhNaait2OO99cELqrZHTdTVgbElcfMqTKAZhIbJ dMpQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r8ZJyNLWSASQSaMSVD7WpeYshElAlIsWDG+yRst7Bbo=; fh=zaZMevJusfEyKCjkBAg52tAXDoBEUdsdtBKhQ6uTJKI=; b=huvSQTkXzIwwi+01K5yGmSF/mHDWyU/zZ3HOwAkdT01QXID2nqV0eT0N/XKGePHfAb 3INtcBp52cR4ZPG72d7Pw2g5FZccd54QAmvlDmoEmKeF2cnS6Cn6viEzP0K3dbIIG06D 8j4/rw15779+sTzHn6IUiHhdDYtyp9AvNChkSAcaEvwDWVuFI0HVPfSPNtlrCdXGDff+ y8cV0HUoMBVslGf5LiOFrhaNNpyUsLNkwVrRPrU0dreQBCxdmh+zE5hr6CgU9LfslXBH A2OtPUO4MOW7HvtcwssRzMiYZLYEtx4Sox5atJgz4XTev9jfPSaKBcZPLIqhA9YWTQpR QMCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="Eg5IuL/+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d64-20020a633643000000b0056513361b4fsi2958813pga.741.2023.08.09.00.33.21; Wed, 09 Aug 2023 00:33:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="Eg5IuL/+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231467AbjHIHG1 (ORCPT + 99 others); Wed, 9 Aug 2023 03:06:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231465AbjHIHGR (ORCPT ); Wed, 9 Aug 2023 03:06:17 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E8CE1FD0; Wed, 9 Aug 2023 00:06:11 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 378NmsFo006766; Wed, 9 Aug 2023 00:06:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=r8ZJyNLWSASQSaMSVD7WpeYshElAlIsWDG+yRst7Bbo=; b=Eg5IuL/+lTh6f41l+MVtY++IELXPN8487L62DJfFoSSVJu5PPkHfzSLQqU7cAEj0SaD1 F4EqoSvRb7klcP/hy90I1g1r3aKkBr4Qsqg0ST3zubeZrVv/8sfoFtrMR/xsxU63diBT tBvMhGHc/FE4tAR+RzqFPW0u4WysQ1A4S9fEAtxW7nFqBguZrT8Zh83wO4tmh+PHw8kS 2ITj5PF/+HEGhCXxKIjh6BdFLnUfLisZbVrzrqfqSik27plVKYdwA0nZZD2fJzoSVu1o PqYAAbRg9P3vP6jUTWqjKXROBGuVIGo+duWf+IC2bqTBr6mYDUMumQRilgDfsXJ9GzhC bw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3sbkntkts7-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 09 Aug 2023 00:06:05 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 9 Aug 2023 00:06:03 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 9 Aug 2023 00:06:03 -0700 Received: from localhost.localdomain (unknown [10.28.36.166]) by maili.marvell.com (Postfix) with ESMTP id AD39F3F705B; Wed, 9 Aug 2023 00:05:59 -0700 (PDT) From: Suman Ghosh To: , , , , , , , , , , , CC: Suman Ghosh Subject: [net PATCH V2 4/4] octeonxt2-pf: Fix backpressure config for multiple PFC priorities to work simultaneously Date: Wed, 9 Aug 2023 12:35:32 +0530 Message-ID: <20230809070532.3252464-5-sumang@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230809070532.3252464-1-sumang@marvell.com> References: <20230809070532.3252464-1-sumang@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: iFtJTPx0V8xZL0ALAVcAjPGq7-CkP_TP X-Proofpoint-ORIG-GUID: iFtJTPx0V8xZL0ALAVcAjPGq7-CkP_TP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-09_05,2023-08-08_01,2023-05-22_02 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773735944518634504 X-GMAIL-MSGID: 1773735944518634504 MAC (CGX or RPM) asserts backpressure at TL3 or TL2 node of the egress hierarchical scheduler tree depending on link level config done. If there are multiple PFC priorities enabled at a time and for all such flows to backoff, each priority will have to assert backpressure at different TL3/TL2 scheduler nodes and these flows will need to submit egress pkts to these nodes. Current PFC configuration has an issue where in only one backpressure scheduler node is being allocated which is resulting in only one PFC priority to work. This patch fixes this issue. Fixes: 99c969a83d82 ("octeontx2-pf: Add egress PFC support") Signed-off-by: Suman Ghosh --- .../net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c index c75435bab411..048ee015c085 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c @@ -70,7 +70,7 @@ static int otx2_pfc_txschq_alloc_one(struct otx2_nic *pfvf, u8 prio) * link config level. These rest of the scheduler can be * same as hw.txschq_list. */ - for (lvl = 0; lvl < pfvf->hw.txschq_link_cfg_lvl; lvl++) + for (lvl = 0; lvl <= pfvf->hw.txschq_link_cfg_lvl; lvl++) req->schq[lvl] = 1; rc = otx2_sync_mbox_msg(&pfvf->mbox); @@ -83,7 +83,7 @@ static int otx2_pfc_txschq_alloc_one(struct otx2_nic *pfvf, u8 prio) return PTR_ERR(rsp); /* Setup transmit scheduler list */ - for (lvl = 0; lvl < pfvf->hw.txschq_link_cfg_lvl; lvl++) { + for (lvl = 0; lvl <= pfvf->hw.txschq_link_cfg_lvl; lvl++) { if (!rsp->schq[lvl]) return -ENOSPC; @@ -128,7 +128,7 @@ static int otx2_pfc_txschq_stop_one(struct otx2_nic *pfvf, u8 prio) int lvl; /* free PFC TLx nodes */ - for (lvl = 0; lvl < pfvf->hw.txschq_link_cfg_lvl; lvl++) + for (lvl = 0; lvl <= pfvf->hw.txschq_link_cfg_lvl; lvl++) otx2_txschq_free_one(pfvf, lvl, pfvf->pfc_schq_list[lvl][prio]); @@ -400,9 +400,11 @@ static int otx2_dcbnl_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc) { struct otx2_nic *pfvf = netdev_priv(dev); bool if_up = netif_running(dev); + u8 prev_pfc_en; int err; /* Save PFC configuration to interface */ + prev_pfc_en = pfvf->pfc_en; pfvf->pfc_en = pfc->pfc_en; if (pfvf->hw.tx_queues >= NIX_PF_PFC_PRIO_MAX) @@ -421,7 +423,9 @@ static int otx2_dcbnl_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc) return err; if (if_up) { + pfvf->pfc_en = prev_pfc_en; otx2_stop(dev); + pfvf->pfc_en = pfc->pfc_en; otx2_open(dev); }