* [PATCH] net/tap: Allow jumbo frames
@ 2022-08-08 9:31 Francesco Mancino
2022-08-08 14:41 ` Stephen Hemminger
2022-08-08 14:49 ` [PATCH v7] " Francesco Mancino
0 siblings, 2 replies; 8+ messages in thread
From: Francesco Mancino @ 2022-08-08 9:31 UTC (permalink / raw)
To: dev
eth_dev_validate_mtu, introduced in 990912e676e, validates configured
MTU plus overhead against max_rx_pktlen.
Since TAP is a virtual device, it should support as big MTU as possible.
---
drivers/net/tap/rte_eth_tap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 9e1032fe72..54ca4ca5e9 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1066,7 +1066,7 @@ tap_dev_info(struct rte_eth_dev *dev, struct
rte_eth_dev_info *dev_info)
dev_info->if_index = internals->if_index;
dev_info->max_mac_addrs = 1;
- dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_VLAN_FRAME_LEN;
+ dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_JUMBO_FRAME_LEN;
dev_info->max_rx_queues = RTE_PMD_TAP_MAX_QUEUES;
dev_info->max_tx_queues = RTE_PMD_TAP_MAX_QUEUES;
dev_info->min_rx_bufsize = 0;
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net/tap: Allow jumbo frames
2022-08-08 9:31 [PATCH] net/tap: Allow jumbo frames Francesco Mancino
@ 2022-08-08 14:41 ` Stephen Hemminger
2022-08-08 14:49 ` [PATCH v7] " Francesco Mancino
1 sibling, 0 replies; 8+ messages in thread
From: Stephen Hemminger @ 2022-08-08 14:41 UTC (permalink / raw)
To: Francesco Mancino; +Cc: dev
On Mon, 8 Aug 2022 11:31:16 +0200
Francesco Mancino <francesco.mancino@tutus.se> wrote:
> eth_dev_validate_mtu, introduced in 990912e676e, validates configured
> MTU plus overhead against max_rx_pktlen.
> Since TAP is a virtual device, it should support as big MTU as possible.
> ---
> drivers/net/tap/rte_eth_tap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 9e1032fe72..54ca4ca5e9 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -1066,7 +1066,7 @@ tap_dev_info(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>
> dev_info->if_index = internals->if_index;
> dev_info->max_mac_addrs = 1;
> - dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_VLAN_FRAME_LEN;
> + dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_JUMBO_FRAME_LEN;
> dev_info->max_rx_queues = RTE_PMD_TAP_MAX_QUEUES;
> dev_info->max_tx_queues = RTE_PMD_TAP_MAX_QUEUES;
> dev_info->min_rx_bufsize = 0;
> --
> 2.34.1
>
>
OK but cast is not needed.
It wasn't needed before and not needed now.
By not having the cast the code has better chance of catching any issues
if sizes mismatch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v7] net/tap: Allow jumbo frames
2022-08-08 9:31 [PATCH] net/tap: Allow jumbo frames Francesco Mancino
2022-08-08 14:41 ` Stephen Hemminger
@ 2022-08-08 14:49 ` Francesco Mancino
2022-08-08 15:03 ` Stephen Hemminger
1 sibling, 1 reply; 8+ messages in thread
From: Francesco Mancino @ 2022-08-08 14:49 UTC (permalink / raw)
To: dev
eth_dev_validate_mtu, introduced in 990912e676e, validates configured
MTU plus overhead against max_rx_pktlen.
Since TAP is a virtual device, it should support as big MTU as possible.
Signed-off-by: Francesco Mancino <francesco.mancino@tutus.se>
---
drivers/net/tap/rte_eth_tap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 9e1032fe72..df7f948972 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1066,7 +1066,7 @@ tap_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->if_index = internals->if_index;
dev_info->max_mac_addrs = 1;
- dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_VLAN_FRAME_LEN;
+ dev_info->max_rx_pktlen = RTE_ETHER_MAX_JUMBO_FRAME_LEN;
dev_info->max_rx_queues = RTE_PMD_TAP_MAX_QUEUES;
dev_info->max_tx_queues = RTE_PMD_TAP_MAX_QUEUES;
dev_info->min_rx_bufsize = 0;
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v7] net/tap: Allow jumbo frames
2022-08-08 14:49 ` [PATCH v7] " Francesco Mancino
@ 2022-08-08 15:03 ` Stephen Hemminger
2022-08-08 15:38 ` Francesco Mancino
2023-01-19 14:50 ` Ferruh Yigit
0 siblings, 2 replies; 8+ messages in thread
From: Stephen Hemminger @ 2022-08-08 15:03 UTC (permalink / raw)
To: Francesco Mancino; +Cc: dev
On Mon, 8 Aug 2022 16:49:44 +0200
Francesco Mancino <francesco.mancino@tutus.se> wrote:
> eth_dev_validate_mtu, introduced in 990912e676e, validates configured
> MTU plus overhead against max_rx_pktlen.
> Since TAP is a virtual device, it should support as big MTU as possible.
>
> Signed-off-by: Francesco Mancino <francesco.mancino@tutus.se>
dev_info->min_rx_bufsize = 0;
Thanks for your patience.
Since tap is built on top of an existing kernel network device a more
complete solution would be to query the kernel device to find out what
its MTU is.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v7] net/tap: Allow jumbo frames
2022-08-08 15:03 ` Stephen Hemminger
@ 2022-08-08 15:38 ` Francesco Mancino
2022-08-08 16:42 ` Stephen Hemminger
2023-01-19 14:50 ` Ferruh Yigit
1 sibling, 1 reply; 8+ messages in thread
From: Francesco Mancino @ 2022-08-08 15:38 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
Thank you for the feedback.
I am sorry for the email spam, it was a learning process.
I am not sure what results we would get by querying the MTU
before configuring it, since we can (and do) set the MTU using
SIOCSIFMTU.
On 2022-08-08 17:03, Stephen Hemminger wrote:
> On Mon, 8 Aug 2022 16:49:44 +0200
> Francesco Mancino <francesco.mancino@tutus.se> wrote:
>
>> eth_dev_validate_mtu, introduced in 990912e676e, validates configured
>> MTU plus overhead against max_rx_pktlen.
>> Since TAP is a virtual device, it should support as big MTU as possible.
>>
>> Signed-off-by: Francesco Mancino <francesco.mancino@tutus.se>
> dev_info->min_rx_bufsize = 0;
>
>
> Thanks for your patience.
>
> Since tap is built on top of an existing kernel network device a more
> complete solution would be to query the kernel device to find out what
> its MTU is.
>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v7] net/tap: Allow jumbo frames
2022-08-08 15:38 ` Francesco Mancino
@ 2022-08-08 16:42 ` Stephen Hemminger
2022-08-09 7:57 ` Francesco Mancino
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2022-08-08 16:42 UTC (permalink / raw)
To: Francesco Mancino; +Cc: dev
On Mon, 8 Aug 2022 17:38:21 +0200
Francesco Mancino <francesco.mancino@tutus.se> wrote:
> Thank you for the feedback.
>
> I am sorry for the email spam, it was a learning process.
>
> I am not sure what results we would get by querying the MTU
> before configuring it, since we can (and do) set the MTU using
> SIOCSIFMTU.
>
> On 2022-08-08 17:03, Stephen Hemminger wrote:
> > On Mon, 8 Aug 2022 16:49:44 +0200
> > Francesco Mancino <francesco.mancino@tutus.se> wrote:
> >
> >> eth_dev_validate_mtu, introduced in 990912e676e, validates configured
> >> MTU plus overhead against max_rx_pktlen.
> >> Since TAP is a virtual device, it should support as big MTU as possible.
> >>
> >> Signed-off-by: Francesco Mancino <francesco.mancino@tutus.se>
> > dev_info->min_rx_bufsize = 0;
> >
> >
> > Thanks for your patience.
> >
> > Since tap is built on top of an existing kernel network device a more
> > complete solution would be to query the kernel device to find out what
> > its MTU is.
> >
> > Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> >
>
There is an attribute IFLA_MAX_MTU reported by devices over netlink.
$ ip -d li show dev enp2s0
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq state UP mode DEFAULT group default qlen 1000
link/ether d8:5e:d3:06:5d:13 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 9194 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 gro_max_size 65536 parentbus pci parentdev 0000:02:00.0
Notice maxmtu of 9194 reported.
Tap device already has a netlink infrastructure
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v7] net/tap: Allow jumbo frames
2022-08-08 16:42 ` Stephen Hemminger
@ 2022-08-09 7:57 ` Francesco Mancino
0 siblings, 0 replies; 8+ messages in thread
From: Francesco Mancino @ 2022-08-09 7:57 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
Interesting, did not know about that attribute.
Tested some tap devices on my machine and get a maxmtu value close to
max uint16, way bigger than RTE_ETHER_MAX_JUMBO_FRAME_LEN.
I do not know if will have time to code and test using netlink to set this limit,
for the time being i think RTE_ETHER_MAX_JUMBO_FRAME_LEN is better than the previous limit.
On 2022-08-08 18:42, Stephen Hemminger wrote:
> On Mon, 8 Aug 2022 17:38:21 +0200
> Francesco Mancino <francesco.mancino@tutus.se> wrote:
>
>> Thank you for the feedback.
>>
>> I am sorry for the email spam, it was a learning process.
>>
>> I am not sure what results we would get by querying the MTU
>> before configuring it, since we can (and do) set the MTU using
>> SIOCSIFMTU.
>>
>> On 2022-08-08 17:03, Stephen Hemminger wrote:
>>> On Mon, 8 Aug 2022 16:49:44 +0200
>>> Francesco Mancino <francesco.mancino@tutus.se> wrote:
>>>
>>>> eth_dev_validate_mtu, introduced in 990912e676e, validates configured
>>>> MTU plus overhead against max_rx_pktlen.
>>>> Since TAP is a virtual device, it should support as big MTU as possible.
>>>>
>>>> Signed-off-by: Francesco Mancino <francesco.mancino@tutus.se>
>>> dev_info->min_rx_bufsize = 0;
>>>
>>>
>>> Thanks for your patience.
>>>
>>> Since tap is built on top of an existing kernel network device a more
>>> complete solution would be to query the kernel device to find out what
>>> its MTU is.
>>>
>>> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>>>
>>
>
> There is an attribute IFLA_MAX_MTU reported by devices over netlink.
>
> $ ip -d li show dev enp2s0
> 2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq state UP mode DEFAULT group default qlen 1000
> link/ether d8:5e:d3:06:5d:13 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 9194 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 gro_max_size 65536 parentbus pci parentdev 0000:02:00.0
>
> Notice maxmtu of 9194 reported.
>
> Tap device already has a netlink infrastructure
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v7] net/tap: Allow jumbo frames
2022-08-08 15:03 ` Stephen Hemminger
2022-08-08 15:38 ` Francesco Mancino
@ 2023-01-19 14:50 ` Ferruh Yigit
1 sibling, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2023-01-19 14:50 UTC (permalink / raw)
To: Stephen Hemminger, Francesco Mancino; +Cc: dev
On 8/8/2022 4:03 PM, Stephen Hemminger wrote:
> On Mon, 8 Aug 2022 16:49:44 +0200
> Francesco Mancino <francesco.mancino@tutus.se> wrote:
>
>> eth_dev_validate_mtu, introduced in 990912e676e, validates configured
>> MTU plus overhead against max_rx_pktlen.
>> Since TAP is a virtual device, it should support as big MTU as possible.
>>
>> Signed-off-by: Francesco Mancino <francesco.mancino@tutus.se>
> dev_info->min_rx_bufsize = 0;
>
>
> Thanks for your patience.
>
> Since tap is built on top of an existing kernel network device a more
> complete solution would be to query the kernel device to find out what
> its MTU is.
>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
+1 to get as it is for now, but if you have a chance, please send
'IFLA_MAX_MTU' implementation to replace current one, thanks.
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-01-19 14:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08 9:31 [PATCH] net/tap: Allow jumbo frames Francesco Mancino
2022-08-08 14:41 ` Stephen Hemminger
2022-08-08 14:49 ` [PATCH v7] " Francesco Mancino
2022-08-08 15:03 ` Stephen Hemminger
2022-08-08 15:38 ` Francesco Mancino
2022-08-08 16:42 ` Stephen Hemminger
2022-08-09 7:57 ` Francesco Mancino
2023-01-19 14:50 ` Ferruh Yigit
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).