patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 17.11] net/virtio: init MTU in case no control channel
@ 2019-10-11  6:35 patrick.fu
  2019-10-24  8:48 ` Luca Boccassi
  0 siblings, 1 reply; 2+ messages in thread
From: patrick.fu @ 2019-10-11  6:35 UTC (permalink / raw)
  To: stable
  Cc: bluca, ktraynor, maxime.coquelin, zhihong.wang, tiwei.bie, Patrick Fu

From: Patrick Fu <patrick.fu@intel.com>

[backport from commit id: 240da8b2143b7be372cf6388f028b26b15f16776]

The max_mtu is kept as zero in case no CRTL channel, which leads
to failure when calling virtio_mtu_set().

Signed-off-by: Patrick Fu <patrick.fu@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e0328f6..c9076ea 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1508,6 +1508,8 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
 	} else {
 		PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=1");
 		hw->max_queue_pairs = 1;
+		hw->max_mtu = VIRTIO_MAX_RX_PKTLEN - ETHER_HDR_LEN -
+			VLAN_TAG_LEN - hw->vtnet_hdr_size;
 	}
 
 	ret = virtio_alloc_queues(eth_dev);
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH 17.11] net/virtio: init MTU in case no control channel
  2019-10-11  6:35 [dpdk-stable] [PATCH 17.11] net/virtio: init MTU in case no control channel patrick.fu
@ 2019-10-24  8:48 ` Luca Boccassi
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Boccassi @ 2019-10-24  8:48 UTC (permalink / raw)
  To: patrick.fu, stable; +Cc: ktraynor, maxime.coquelin, zhihong.wang, tiwei.bie

On Fri, 2019-10-11 at 14:35 +0800, patrick.fu@intel.com wrote:
> From: Patrick Fu <
> patrick.fu@intel.com
> >
> 
> [backport from commit id: 240da8b2143b7be372cf6388f028b26b15f16776]
> 
> The max_mtu is kept as zero in case no CRTL channel, which leads
> to failure when calling virtio_mtu_set().
> 
> Signed-off-by: Patrick Fu <
> patrick.fu@intel.com
> >
> ---
>  drivers/net/virtio/virtio_ethdev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index e0328f6..c9076ea 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1508,6 +1508,8 @@ static int virtio_dev_xstats_get_names(struct
> rte_eth_dev *dev,
>  	} else {
>  		PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=1");
>  		hw->max_queue_pairs = 1;
> +		hw->max_mtu = VIRTIO_MAX_RX_PKTLEN - ETHER_HDR_LEN -
> +			VLAN_TAG_LEN - hw->vtnet_hdr_size;
>  	}
>  
>  	ret = virtio_alloc_queues(eth_dev);
> 

Acked-by: Luca Boccassi <bluca@debian.org>

Thanks, applied

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2019-10-24  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11  6:35 [dpdk-stable] [PATCH 17.11] net/virtio: init MTU in case no control channel patrick.fu
2019-10-24  8:48 ` Luca Boccassi

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