patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/virtio: report maximum MTU in device info
@ 2021-07-21  9:22 Andrew Rybchenko
  2021-07-22  7:36 ` Maxime Coquelin
  2021-07-28  6:49 ` Xia, Chenbo
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Rybchenko @ 2021-07-21  9:22 UTC (permalink / raw)
  To: Maxime Coquelin, Chenbo Xia, Stephen Hemminger, Ian Stokes,
	Andrew Rybchenko, Ferruh Yigit
  Cc: dev, Ivan Ilchenko, stable

From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>

Fix the driver to report maximum MTU obtained from config if
VIRTIO_NET_F_MTU is supported or calculated based on maximum
Rx packet length.

Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
Cc: stable@dpdk.org

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 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 6d6e105960..af6305e9d8 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2502,6 +2502,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
 	dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
 	dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
+	dev_info->max_mtu = hw->max_mtu;
 
 	host_features = VIRTIO_OPS(hw)->get_features(hw);
 	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
-- 
2.30.2


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

* Re: [dpdk-stable] [PATCH] net/virtio: report maximum MTU in device info
  2021-07-21  9:22 [dpdk-stable] [PATCH] net/virtio: report maximum MTU in device info Andrew Rybchenko
@ 2021-07-22  7:36 ` Maxime Coquelin
  2021-07-28  6:49 ` Xia, Chenbo
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2021-07-22  7:36 UTC (permalink / raw)
  To: Andrew Rybchenko, Chenbo Xia, Stephen Hemminger, Ian Stokes,
	Andrew Rybchenko, Ferruh Yigit
  Cc: dev, Ivan Ilchenko, stable



On 7/21/21 11:22 AM, Andrew Rybchenko wrote:
> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> 
> Fix the driver to report maximum MTU obtained from config if
> VIRTIO_NET_F_MTU is supported or calculated based on maximum
> Rx packet length.
> 
> Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
>  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 6d6e105960..af6305e9d8 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -2502,6 +2502,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>  	dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
>  	dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
>  	dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
> +	dev_info->max_mtu = hw->max_mtu;
>  
>  	host_features = VIRTIO_OPS(hw)->get_features(hw);
>  	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


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

* Re: [dpdk-stable] [PATCH] net/virtio: report maximum MTU in device info
  2021-07-21  9:22 [dpdk-stable] [PATCH] net/virtio: report maximum MTU in device info Andrew Rybchenko
  2021-07-22  7:36 ` Maxime Coquelin
@ 2021-07-28  6:49 ` Xia, Chenbo
  1 sibling, 0 replies; 3+ messages in thread
From: Xia, Chenbo @ 2021-07-28  6:49 UTC (permalink / raw)
  To: Andrew Rybchenko, Maxime Coquelin, Stephen Hemminger, Stokes,
	Ian, Andrew Rybchenko, Yigit, Ferruh
  Cc: dev, Ivan Ilchenko, stable

> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Sent: Wednesday, July 21, 2021 5:22 PM
> To: Maxime Coquelin <maxime.coquelin@redhat.com>; Xia, Chenbo
> <chenbo.xia@intel.com>; Stephen Hemminger <stephen@networkplumber.org>; Stokes,
> Ian <ian.stokes@intel.com>; Andrew Rybchenko <arybchenko@solarflare.com>;
> Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>; stable@dpdk.org
> Subject: [PATCH] net/virtio: report maximum MTU in device info
> 
> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> 
> Fix the driver to report maximum MTU obtained from config if
> VIRTIO_NET_F_MTU is supported or calculated based on maximum
> Rx packet length.
> 
> Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
>  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 6d6e105960..af6305e9d8 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -2502,6 +2502,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>  	dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
>  	dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
>  	dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
> +	dev_info->max_mtu = hw->max_mtu;
> 
>  	host_features = VIRTIO_OPS(hw)->get_features(hw);
>  	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
> --
> 2.30.2

Applied to next-virtio/main. Thanks!

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

end of thread, other threads:[~2021-07-28  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  9:22 [dpdk-stable] [PATCH] net/virtio: report maximum MTU in device info Andrew Rybchenko
2021-07-22  7:36 ` Maxime Coquelin
2021-07-28  6:49 ` Xia, Chenbo

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