DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Harman Kalra <hkalra@marvell.com>, Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Jerin Jacob <jerinj@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] common/octeontx2: fix link event message size
Date: Tue, 28 Sep 2021 17:55:11 +0530	[thread overview]
Message-ID: <CALBAE1PkM0E0kQCjBu-TxLy5qXi0Zn1SRZ2wUMibucK4-JQHaw@mail.gmail.com> (raw)
In-Reply-To: <20210730160806.13394-1-hkalra@marvell.com>

On Fri, Jul 30, 2021 at 9:38 PM Harman Kalra <hkalra@marvell.com> 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 <hkalra@marvell.com>


Acked-by: Jerin Jacob <jerinj@marvell.com>
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
>

      reply	other threads:[~2021-09-28 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 16:08 Harman Kalra
2021-09-28 12:25 ` Jerin Jacob [this message]

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=CALBAE1PkM0E0kQCjBu-TxLy5qXi0Zn1SRZ2wUMibucK4-JQHaw@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=ndabilpuram@marvell.com \
    /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).