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 DC629A00BE; Wed, 30 Oct 2019 14:56:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2245A1BFC4; Wed, 30 Oct 2019 14:56:04 +0100 (CET) Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by dpdk.org (Postfix) with ESMTP id 63B3D1BFA9 for ; Wed, 30 Oct 2019 14:56:03 +0100 (CET) Received: by mail-il1-f195.google.com with SMTP id a13so2218989ilp.1 for ; Wed, 30 Oct 2019 06:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6TxqF3zm15y/6cep090o9hF3olWMfpupvEclrOm6EGw=; b=k2MSFnUdm6a9OE5i902MVPstS5aqvOrbKU/+d4kYP+4ZS0yMtASfDQsLgPYq6gV6wB gDQi9LmYnC6CbasFdHvwc6PWdHev4EPNLvgBwzrTr+7DAkcusMjjnHe8q5agkOiNCgUb 7EWbxBleKNTZXtfz1NQDpw+ZMx1fBneD577+cglbO643zlSn+FbgBwQagfIYaR1UDU+r pjdYmivzA8sWj0aGmAzanBtxwF+XCOHun6HSeO6an3rRW1oZBhUcieZ1AUD7rZRNTS23 bmOFNOTi6LT3ozlnS5B75Q1/IvIjUZhui78g3PiGJ40aScBNMZ7l691eQO2YvCzrMWRS Ew3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6TxqF3zm15y/6cep090o9hF3olWMfpupvEclrOm6EGw=; b=bdLwr/aqDqW3vCqMHVc0UWIQqP62yM4ddc1PR9mdktemP7eJhhtdZYkyK5m5UdVhrA xcEYQ66lQWSqSbxbYK9wmbdrAdQeHlpZBvlzMqcNCfJAnNnezVIKLTzyYIwUnMD9PB3Y jLjhtwG++/vY9MGnhRr1EYfJwmgpvA1MpxP+EB3rM1E3bbif+FGDGqTuqOC/qopqzksb 3KZccPkH9l7vsefRLUKPj9xCWgP2oXU0SM6r8AvOT4JNMMBQqOuikSBTvUzJakOqPHzK bWUxFgbDBAj2lo3/HtVTqS3isIXdXFXNe3+TAcnU4NYF0hkpk+i1J1q15GWRrUfQOb6C /Bmg== X-Gm-Message-State: APjAAAVYfLznjMGFYYJpFLpIv2gf5Z3PtGfmIbBAnEprgELT3+J3Bv16 ikrqXiYlNnFTHwhyJtC7nIweBqImhHJi6eH2W1c= X-Google-Smtp-Source: APXvYqwGO0HmpMe+KzjoJ9MUJvFXvSLXsCaPp3DOZ6lOkzE7SuBQxw8I6NrsoIX0PCdS7sw9tljqMk+VjQaiL7b1ggE= X-Received: by 2002:a92:d78f:: with SMTP id d15mr142743iln.294.1572443762553; Wed, 30 Oct 2019 06:56:02 -0700 (PDT) MIME-Version: 1.0 References: <20191029175059.17537-1-vattunuru@marvell.com> In-Reply-To: <20191029175059.17537-1-vattunuru@marvell.com> From: Jerin Jacob Date: Wed, 30 Oct 2019 19:25:46 +0530 Message-ID: To: Vamsi Attunuru Cc: dpdk-dev , Jerin Jacob , Kiran Kumar K , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" Subject: Re: [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" On Tue, Oct 29, 2019 at 11:50 PM wrote: > > 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") Cc: stable@dpdk.rog > Signed-off-by: Vamsi Attunuru Acked-by: Jerin Jacob 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 >