From: <vattunuru@marvell.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <jerinj@marvell.com>,
<kirankumark@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>
Subject: [dpdk-dev] [PATCH v1 1/1] net/octeontx2: fix VF index in VF action
Date: Tue, 29 Oct 2019 23:20:59 +0530 [thread overview]
Message-ID: <20191029175059.17537-1-vattunuru@marvell.com> (raw)
From: Vamsi Attunuru <vattunuru@marvell.com>
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 <vattunuru@marvell.com>
---
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
next reply other threads:[~2019-10-29 18:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 17:50 vattunuru [this message]
2019-10-30 13:55 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191029175059.17537-1-vattunuru@marvell.com \
--to=vattunuru@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).