From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4CFF4A00BE; Tue, 29 Oct 2019 19:20:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 046B71BF45; Tue, 29 Oct 2019 19:20:02 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id F21B71BEC9 for ; Tue, 29 Oct 2019 19:19:59 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9TI5Cls020768; Tue, 29 Oct 2019 11:19:59 -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-type; s=pfpt0818; bh=f7iWikrIPuvJTr9t8jahTtrKAF98ZQ6cFNf3/P/nOv0=; b=HjgHoHbsxSDzpLSrjgCySur3/6LCPMr35zfUe48HRcDAPefAs6M+kQEXcjqiz5tL/D1b oav3hY+yR61D7aOVHoNfxObxkp8YeYRxqyxQeYG7VVbFlBvJWQ+xkB1EfBFusljd3Zo9 1macr/xg98NgTf8BpKRP1Gx1m04wXDMTrlaB4pv3/n9HOAYvJHheyON/jprWKJo6oVUH wf56kq7DbiIWHo+PDaauJLeZqruYM1H15GyeyQU1ToJD8UYDEN0H7InJZyOhZxKz0ZZN D7nJ0G+6HxhmXjFtDfsr5bXyqeyW0aT+13cBN7lx+GmbhmeDmpdPWKwMmDQieUyAW8/D OQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2vvnnp2nev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 29 Oct 2019 11:19:59 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 29 Oct 2019 11:19:57 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 29 Oct 2019 11:19:57 -0700 Received: from hyd1vattunuru-dt.caveonetworks.com (unknown [10.29.52.72]) by maili.marvell.com (Postfix) with ESMTP id 539C53F7308; Tue, 29 Oct 2019 10:51:16 -0700 (PDT) From: To: CC: , , , Vamsi Attunuru Date: Tue, 29 Oct 2019 23:20:59 +0530 Message-ID: <20191029175059.17537-1-vattunuru@marvell.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-29_05:2019-10-28,2019-10-29 signatures=0 Subject: [dpdk-dev] [PATCH v1 1/1] net/octeontx2: fix VF index in VF action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Vamsi Attunuru VF index needs to be checked against maxvf count before incrementing it for preparing pf_func. Fixes: 520270d518 ("net/octeontx2: support PF and VF action") Signed-off-by: Vamsi Attunuru --- drivers/net/octeontx2/otx2_flow_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c index 2cba0a4..6b2617b 100644 --- a/drivers/net/octeontx2/otx2_flow_parse.c +++ b/drivers/net/octeontx2/otx2_flow_parse.c @@ -833,14 +833,14 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev, actions->conf; req_act |= OTX2_FLOW_ACT_VF; if (vf_act->original == 0) { - vf_id = (vf_act->id & RVU_PFVF_FUNC_MASK) + 1; + vf_id = vf_act->id & RVU_PFVF_FUNC_MASK; if (vf_id >= hw->maxvf) { errmsg = "invalid vf specified"; errcode = EINVAL; goto err_exit; } pf_func &= (0xfc00); - pf_func = (pf_func | vf_id); + pf_func = (pf_func | (vf_id + 1)); } break; -- 2.8.4