From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0E6C3A0C4C; Tue, 28 Sep 2021 14:25:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96089410DB; Tue, 28 Sep 2021 14:25:40 +0200 (CEST) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by mails.dpdk.org (Postfix) with ESMTP id 66A1E40DF6 for ; Tue, 28 Sep 2021 14:25:38 +0200 (CEST) Received: by mail-io1-f43.google.com with SMTP id e144so1673385iof.3 for ; Tue, 28 Sep 2021 05:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mAMGKLywuOzI7/XtlS1SFfET2r5L8WNV2fV8iTFc21w=; b=diCALCqjTRMQrFfynQXArVHdyatST6B+ng+EhSk9JkYFDp8UIKdKIQnKHCKWTkXxwu 11ggkNfnAlKjrHq/IAbrMAaGe0tb8U8WZo/xtP8Cimp5t0JRfi/GXAp3olrWOqCFc6Mr BY8O0XGxsvHgERrkqA26128C3or9KSc+REb9PEgwF5rWG2+1TrkBZ/a7+YPojjR5bxaQ jB6ODoawEE5GzyG3ABjQ3/5Bm+iwLxRiDVQfAQ3f3SmyWj4vWVEaqB6kY63OfUkMeSR1 zj5iiFQ4e8C/EZBS/y03KIf63Msxjd/XVc4aQul/C51Vqrde3FhG5b73R6e5WXjB/EA4 utzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mAMGKLywuOzI7/XtlS1SFfET2r5L8WNV2fV8iTFc21w=; b=omYSUDF+1gvOK2NkfZI8RvrDScGEzIEqmpy9cox2ARB6bS6cEE37ruXWUdYgRxxDJS e3EjvHktPhLTRRLdjryo092bWkjFujvyJqjEo7i7qfSMYqyZafbn1jGfjI8AZ7uQ0Q9s StvtBQHBGwG8FX5NaIhVcECwnibrrNK/oMNyggVHqJdj+8keK5qweSDLIPAGtJwsDrJE Xj6Y/t9RK+w/WcozNFDCELyqG2kfIMtEbToxmJ2vov7NafABJAfMgoHkc0H7ZXbNSyv6 PoaNfzAbfsTVwN6KbdVWSvWbqdwhYgluukMQmjpVbuc6A0sWiK8rPs3X+tT6fSAih9Ne BzkQ== X-Gm-Message-State: AOAM530f7jcWWZMYWelkRL7jDeRRNClmtQIQS4NZbsDc3W+PIWLGh6ms G+G6vAnzFuMG78tIdXkP2Q1I1MBk+zEUduVoe7E= X-Google-Smtp-Source: ABdhPJzRkqpMn6KRaRvKQpGMa2H5SzgXsSqT4HW5s1x0ZYRjOmE+sXXxwjKqa/gw2XlmolRQ+SPZGd2ffTVRGdbRllA= X-Received: by 2002:a05:6638:d54:: with SMTP id d20mr4335050jak.126.1632831937587; Tue, 28 Sep 2021 05:25:37 -0700 (PDT) MIME-Version: 1.0 References: <20210730160806.13394-1-hkalra@marvell.com> In-Reply-To: <20210730160806.13394-1-hkalra@marvell.com> From: Jerin Jacob Date: Tue, 28 Sep 2021 17:55:11 +0530 Message-ID: To: Harman Kalra , Ferruh Yigit Cc: Jerin Jacob , Nithin Dabilpuram , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] common/octeontx2: fix link event message size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Fri, Jul 30, 2021 at 9:38 PM Harman Kalra wrote: > > Due to wrong size of mbox message allocated for sending link status > to the VF, incorrect link status is observed. > > Fixes: cb8d769fb6fe ("common/octeontx2: send link event to VF") Cc: stable@dpdk.org > Signed-off-by: Harman Kalra Acked-by: Jerin Jacob Applied to dpdk-next-net-mrvl/for-next-net. Thanks > --- > drivers/common/octeontx2/otx2_dev.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/common/octeontx2/otx2_dev.c b/drivers/common/octeontx2/otx2_dev.c > index 1485e2b357..ce4f0e7ca9 100644 > --- a/drivers/common/octeontx2/otx2_dev.c > +++ b/drivers/common/octeontx2/otx2_dev.c > @@ -172,14 +172,17 @@ af_pf_wait_msg(struct otx2_dev *dev, uint16_t vf, int num_msg) > /* Send link status to VF */ > struct cgx_link_user_info linfo; > struct mbox_msghdr *vf_msg; > + size_t sz; > > /* Get the link status */ > if (dev->ops && dev->ops->link_status_get) > dev->ops->link_status_get(dev, &linfo); > > + sz = RTE_ALIGN(otx2_mbox_id2size( > + MBOX_MSG_CGX_LINK_EVENT), MBOX_MSG_ALIGN); > /* Prepare the message to be sent */ > vf_msg = otx2_mbox_alloc_msg(&dev->mbox_vfpf_up, vf, > - size); > + sz); > otx2_mbox_req_init(MBOX_MSG_CGX_LINK_EVENT, vf_msg); > memcpy((uint8_t *)vf_msg + sizeof(struct mbox_msghdr), > &linfo, sizeof(struct cgx_link_user_info)); > -- > 2.18.0 >