diff mbox series

[v3,11/11] net/thunderx: populate max and min MTU values

Message ID 20220524084235.17796-11-hkalra@marvell.com (mailing list archive)
State Accepted
Delegated to: Jerin Jacob
Headers show
Series [v3,01/11] event/octeontx: fix SSO fastpath | expand

Checks

Context Check Description
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Harman Kalra May 24, 2022, 8:42 a.m. UTC
From: Hanumanth Pothula <hpothula@marvell.com>

Populate maximum and minimum MTU values while retrieving
device information.

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
---
 drivers/net/thunderx/nicvf_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jerin Jacob June 9, 2022, 3:55 p.m. UTC | #1
On Tue, May 24, 2022 at 2:14 PM Harman Kalra <hkalra@marvell.com> wrote:
>
> From: Hanumanth Pothula <hpothula@marvell.com>
>
> Populate maximum and minimum MTU values while retrieving
> device information.
>
> Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>

Series applied to dpdk-next-net-mrvl/for-next-net. Thanks.


> ---
>  drivers/net/thunderx/nicvf_ethdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index 0f79b02172..262c024560 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -1479,6 +1479,10 @@ nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>         dev_info->max_mac_addrs = 1;
>         dev_info->max_vfs = pci_dev->max_vfs;
>
> +       dev_info->max_mtu = dev_info->max_rx_pktlen -
> +                               (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN);
> +       dev_info->min_mtu = dev_info->min_rx_bufsize - NIC_HW_L2_OVERHEAD;
> +
>         dev_info->rx_offload_capa = NICVF_RX_OFFLOAD_CAPA;
>         dev_info->tx_offload_capa = NICVF_TX_OFFLOAD_CAPA;
>         dev_info->rx_queue_offload_capa = NICVF_RX_OFFLOAD_CAPA;
> --
> 2.18.0
>
diff mbox series

Patch

diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 0f79b02172..262c024560 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -1479,6 +1479,10 @@  nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_mac_addrs = 1;
 	dev_info->max_vfs = pci_dev->max_vfs;
 
+	dev_info->max_mtu = dev_info->max_rx_pktlen -
+				(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN);
+	dev_info->min_mtu = dev_info->min_rx_bufsize - NIC_HW_L2_OVERHEAD;
+
 	dev_info->rx_offload_capa = NICVF_RX_OFFLOAD_CAPA;
 	dev_info->tx_offload_capa = NICVF_TX_OFFLOAD_CAPA;
 	dev_info->rx_queue_offload_capa = NICVF_RX_OFFLOAD_CAPA;