patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: "Xia, Chenbo" <chenbo.xia@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/virtio: fix uninitialized duplex mode
Date: Wed, 28 Jul 2021 06:52:31 +0000	[thread overview]
Message-ID: <MN2PR11MB40638ABC3A4A02FC59683D799CEA9@MN2PR11MB4063.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210727051441.40332-1-chenbo.xia@intel.com>

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Chenbo Xia
> Sent: Tuesday, July 27, 2021 1:15 PM
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/virtio: fix uninitialized duplex mode
> 
> When virtio front-end initializes, the duplex mode should be set
> unknown before reading any duplex mode information from configuration
> space. This patch fixes the issue that duplex mode is by default set
> to zero, which equals ETH_LINK_HALF_DUPLEX. This will lead to duplex
> mode being half duplex when fron-end does not have the feature
> named VIRTIO_NET_F_SPEED_DUPLEX.
> 
> Fixes: 1357b4b36246 ("net/virtio: support Virtio link speed feature")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index 72d3dda71f..9061db4e41 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1901,6 +1901,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
>  	if (ret < 0)
>  		return ret;
>  	hw->speed = speed;
> +	hw->duplex = DUPLEX_UNKNOWN;
> 
>  	/* Allocate memory for storing MAC addresses */
>  	eth_dev->data->mac_addrs = rte_zmalloc("virtio",
> --
> 2.17.1

Applied to next-virtio/main. Thanks!

      parent reply	other threads:[~2021-07-28  6:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  5:14 [dpdk-stable] " Chenbo Xia
2021-07-27 13:35 ` Maxime Coquelin
2021-07-28  6:52 ` Xia, Chenbo [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=MN2PR11MB40638ABC3A4A02FC59683D799CEA9@MN2PR11MB4063.namprd11.prod.outlook.com \
    --to=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    /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).