DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 1/1] net/octeontx2: fix VF index in VF action
@ 2019-10-29 17:50 vattunuru
  2019-10-30 13:55 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: vattunuru @ 2019-10-29 17:50 UTC (permalink / raw)
  To: dev; +Cc: thomas, jerinj, kirankumark, Vamsi Attunuru

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH v1 1/1] net/octeontx2: fix VF index in VF action
  2019-10-29 17:50 [dpdk-dev] [PATCH v1 1/1] net/octeontx2: fix VF index in VF action vattunuru
@ 2019-10-30 13:55 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2019-10-30 13:55 UTC (permalink / raw)
  To: Vamsi Attunuru; +Cc: dpdk-dev, Jerin Jacob, Kiran Kumar K, Ferruh Yigit

On Tue, Oct 29, 2019 at 11:50 PM <vattunuru@marvell.com> wrote:
>
> 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")
Cc: stable@dpdk.rog

> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied to dpdk-next-net-mrvl/master. Thanks


> ---
>  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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-30 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 17:50 [dpdk-dev] [PATCH v1 1/1] net/octeontx2: fix VF index in VF action vattunuru
2019-10-30 13:55 ` Jerin Jacob

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).