* [dpdk-dev] [PATCH 1/2] net/af_packet: fix driver init with default MTU
@ 2021-10-26 15:38 Ferruh Yigit
2021-10-26 15:38 ` [dpdk-dev] [PATCH 2/2] net/memif: " Ferruh Yigit
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Ferruh Yigit
0 siblings, 2 replies; 10+ messages in thread
From: Ferruh Yigit @ 2021-10-26 15:38 UTC (permalink / raw)
To: John W. Linville, Huisong Li, Somnath Kotur, Andrew Rybchenko,
Ajit Khaparde
Cc: Ferruh Yigit, dev
Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
which doesn't include FCS (4 bytes CRC). But ethdev by default uses
frame size with FCS when application doesn't define any explicit value.
As a result device configuration fails because device is tried to be
configured with a frame size length that is bigger than what device
reported as supported. Device reports as max supported frame size is
1514 but configured value is 1518.
Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
driver to report the max supported frame size, this matches to the
initial intention.
Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 559f5a03e509..5a820829143a 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -342,7 +342,7 @@ eth_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)ETH_FRAME_LEN;
+ dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_LEN;
dev_info->max_rx_queues = (uint16_t)internals->nb_queues;
dev_info->max_tx_queues = (uint16_t)internals->nb_queues;
dev_info->min_rx_bufsize = 0;
--
2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/memif: fix driver init with default MTU
2021-10-26 15:38 [dpdk-dev] [PATCH 1/2] net/af_packet: fix driver init with default MTU Ferruh Yigit
@ 2021-10-26 15:38 ` Ferruh Yigit
2021-10-26 15:45 ` David Christensen
2021-10-26 20:47 ` Stephen Hemminger
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Ferruh Yigit
1 sibling, 2 replies; 10+ messages in thread
From: Ferruh Yigit @ 2021-10-26 15:38 UTC (permalink / raw)
To: Jakub Grajciar, Somnath Kotur, Rosen Xu, Andrew Rybchenko, Ajit Khaparde
Cc: Ferruh Yigit, dev
Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
which doesn't include FCS (4 bytes CRC). But ethdev by default uses
frame size with FCS when application doesn't define any explicit value.
As a result device configuration fails because device is tried to be
configured with a frame size length that is bigger than what device
reported as supported. Device reports as max supported frame size is
1514 but configured value is 1518.
Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
driver to report the max supported frame size, this matches to the
initial intention.
Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/memif/rte_eth_memif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 8cec493ffdb9..cbc99067c1c8 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -195,7 +195,7 @@ static int
memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *dev_info)
{
dev_info->max_mac_addrs = 1;
- dev_info->max_rx_pktlen = (uint32_t)ETH_FRAME_LEN;
+ dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_LEN;
dev_info->max_rx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
dev_info->max_tx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
dev_info->min_rx_bufsize = 0;
--
2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] net/memif: fix driver init with default MTU
2021-10-26 15:38 ` [dpdk-dev] [PATCH 2/2] net/memif: " Ferruh Yigit
@ 2021-10-26 15:45 ` David Christensen
2021-10-26 20:47 ` Stephen Hemminger
1 sibling, 0 replies; 10+ messages in thread
From: David Christensen @ 2021-10-26 15:45 UTC (permalink / raw)
To: Ferruh Yigit, Jakub Grajciar, Somnath Kotur, Rosen Xu,
Andrew Rybchenko, Ajit Khaparde
Cc: dev
On 10/26/21 8:38 AM, Ferruh Yigit wrote:
> Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
> which doesn't include FCS (4 bytes CRC). But ethdev by default uses
> frame size with FCS when application doesn't define any explicit value.
>
> As a result device configuration fails because device is tried to be
> configured with a frame size length that is bigger than what device
> reported as supported. Device reports as max supported frame size is
> 1514 but configured value is 1518.
>
> Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
> driver to report the max supported frame size, this matches to the
> initial intention.
>
> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
> drivers/net/memif/rte_eth_memif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
> index 8cec493ffdb9..cbc99067c1c8 100644
> --- a/drivers/net/memif/rte_eth_memif.c
> +++ b/drivers/net/memif/rte_eth_memif.c
> @@ -195,7 +195,7 @@ static int
> memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *dev_info)
> {
> dev_info->max_mac_addrs = 1;
> - dev_info->max_rx_pktlen = (uint32_t)ETH_FRAME_LEN;
> + dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_LEN;
> dev_info->max_rx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
> dev_info->max_tx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
> dev_info->min_rx_bufsize = 0;
>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] net/memif: fix driver init with default MTU
2021-10-26 15:38 ` [dpdk-dev] [PATCH 2/2] net/memif: " Ferruh Yigit
2021-10-26 15:45 ` David Christensen
@ 2021-10-26 20:47 ` Stephen Hemminger
2021-10-27 8:27 ` Ferruh Yigit
1 sibling, 1 reply; 10+ messages in thread
From: Stephen Hemminger @ 2021-10-26 20:47 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Jakub Grajciar, Somnath Kotur, Rosen Xu, Andrew Rybchenko,
Ajit Khaparde, dev
On Tue, 26 Oct 2021 16:38:01 +0100
Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
> index 8cec493ffdb9..cbc99067c1c8 100644
> --- a/drivers/net/memif/rte_eth_memif.c
> +++ b/drivers/net/memif/rte_eth_memif.c
> @@ -195,7 +195,7 @@ static int
> memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *dev_info)
> {
> dev_info->max_mac_addrs = 1;
> - dev_info->max_rx_pktlen = (uint32_t)ETH_FRAME_LEN;
> + dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_LEN;
The cast is not necessary here. Not sure why the original code had it?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] net/memif: fix driver init with default MTU
2021-10-26 20:47 ` Stephen Hemminger
@ 2021-10-27 8:27 ` Ferruh Yigit
0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2021-10-27 8:27 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Jakub Grajciar, Somnath Kotur, Rosen Xu, Andrew Rybchenko,
Ajit Khaparde, dev
On 10/26/2021 9:47 PM, Stephen Hemminger wrote:
> On Tue, 26 Oct 2021 16:38:01 +0100
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
>> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
>> index 8cec493ffdb9..cbc99067c1c8 100644
>> --- a/drivers/net/memif/rte_eth_memif.c
>> +++ b/drivers/net/memif/rte_eth_memif.c
>> @@ -195,7 +195,7 @@ static int
>> memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *dev_info)
>> {
>> dev_info->max_mac_addrs = 1;
>> - dev_info->max_rx_pktlen = (uint32_t)ETH_FRAME_LEN;
>> + dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_LEN;
>
> The cast is not necessary here. Not sure why the original code had it?
>
ack.
I will send a new version to remove the cast, since touching those lines.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] net/af_packet: fix driver init with default MTU
2021-10-26 15:38 [dpdk-dev] [PATCH 1/2] net/af_packet: fix driver init with default MTU Ferruh Yigit
2021-10-26 15:38 ` [dpdk-dev] [PATCH 2/2] net/memif: " Ferruh Yigit
@ 2021-10-27 9:14 ` Ferruh Yigit
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 2/2] net/memif: " Ferruh Yigit
2021-10-27 15:12 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Andrew Rybchenko
1 sibling, 2 replies; 10+ messages in thread
From: Ferruh Yigit @ 2021-10-27 9:14 UTC (permalink / raw)
To: John W. Linville, Hyong Youb Kim, Andrew Rybchenko,
Konstantin Ananyev, Ajit Khaparde, Huisong Li
Cc: Ferruh Yigit, dev
Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
which doesn't include FCS (4 bytes CRC). But ethdev by default uses
frame size with FCS when application doesn't define any explicit value.
As a result device configuration fails because device is tried to be
configured with a frame size length that is bigger than what device
reported as supported. Device reports as max supported frame size is
1514 but configured value is 1518.
Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
driver to report the max supported frame size, this matches to the
initial intention.
Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
v2:
* Remove unnecessary cast
---
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 559f5a03e509..cea7091c0639 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -342,7 +342,7 @@ eth_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)ETH_FRAME_LEN;
+ dev_info->max_rx_pktlen = RTE_ETHER_MAX_LEN;
dev_info->max_rx_queues = (uint16_t)internals->nb_queues;
dev_info->max_tx_queues = (uint16_t)internals->nb_queues;
dev_info->min_rx_bufsize = 0;
--
2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] net/memif: fix driver init with default MTU
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Ferruh Yigit
@ 2021-10-27 9:14 ` Ferruh Yigit
2021-10-27 15:13 ` Andrew Rybchenko
2021-10-27 15:12 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Andrew Rybchenko
1 sibling, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2021-10-27 9:14 UTC (permalink / raw)
To: Jakub Grajciar, Somnath Kotur, Huisong Li, Ajit Khaparde,
Konstantin Ananyev
Cc: Ferruh Yigit, dev, Andrew Rybchenko, David Christensen
Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
which doesn't include FCS (4 bytes CRC). But ethdev by default uses
frame size with FCS when application doesn't define any explicit value.
As a result device configuration fails because device is tried to be
configured with a frame size length that is bigger than what device
reported as supported. Device reports as max supported frame size is
1514 but configured value is 1518.
Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
driver to report the max supported frame size, this matches to the
initial intention.
Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
---
v2:
* Remove unnecessary cast
---
drivers/net/memif/rte_eth_memif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 8cec493ffdb9..e4ebabec6ad6 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -195,7 +195,7 @@ static int
memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *dev_info)
{
dev_info->max_mac_addrs = 1;
- dev_info->max_rx_pktlen = (uint32_t)ETH_FRAME_LEN;
+ dev_info->max_rx_pktlen = RTE_ETHER_MAX_LEN;
dev_info->max_rx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
dev_info->max_tx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
dev_info->min_rx_bufsize = 0;
--
2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] net/memif: fix driver init with default MTU
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 2/2] net/memif: " Ferruh Yigit
@ 2021-10-27 15:13 ` Andrew Rybchenko
0 siblings, 0 replies; 10+ messages in thread
From: Andrew Rybchenko @ 2021-10-27 15:13 UTC (permalink / raw)
To: Ferruh Yigit, Jakub Grajciar, Somnath Kotur, Huisong Li,
Ajit Khaparde, Konstantin Ananyev
Cc: dev, David Christensen
On 10/27/21 12:14 PM, Ferruh Yigit wrote:
> Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
> which doesn't include FCS (4 bytes CRC). But ethdev by default uses
> frame size with FCS when application doesn't define any explicit value.
>
> As a result device configuration fails because device is tried to be
> configured with a frame size length that is bigger than what device
> reported as supported. Device reports as max supported frame size is
> 1514 but configured value is 1518.
>
> Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
> driver to report the max supported frame size, this matches to the
> initial intention.
>
> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] net/af_packet: fix driver init with default MTU
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Ferruh Yigit
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 2/2] net/memif: " Ferruh Yigit
@ 2021-10-27 15:12 ` Andrew Rybchenko
2021-10-27 15:51 ` Ferruh Yigit
1 sibling, 1 reply; 10+ messages in thread
From: Andrew Rybchenko @ 2021-10-27 15:12 UTC (permalink / raw)
To: Ferruh Yigit, John W. Linville, Hyong Youb Kim,
Konstantin Ananyev, Ajit Khaparde, Huisong Li
Cc: dev
On 10/27/21 12:14 PM, Ferruh Yigit wrote:
> Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
> which doesn't include FCS (4 bytes CRC). But ethdev by default uses
> frame size with FCS when application doesn't define any explicit value.
>
> As a result device configuration fails because device is tried to be
> configured with a frame size length that is bigger than what device
> reported as supported. Device reports as max supported frame size is
> 1514 but configured value is 1518.
>
> Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
> driver to report the max supported frame size, this matches to the
> initial intention.
>
> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] net/af_packet: fix driver init with default MTU
2021-10-27 15:12 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Andrew Rybchenko
@ 2021-10-27 15:51 ` Ferruh Yigit
0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2021-10-27 15:51 UTC (permalink / raw)
To: Andrew Rybchenko, John W. Linville, Hyong Youb Kim,
Konstantin Ananyev, Ajit Khaparde, Huisong Li
Cc: dev
On 10/27/2021 4:12 PM, Andrew Rybchenko wrote:
> On 10/27/21 12:14 PM, Ferruh Yigit wrote:
>> Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
>> which doesn't include FCS (4 bytes CRC). But ethdev by default uses
>> frame size with FCS when application doesn't define any explicit value.
>>
>> As a result device configuration fails because device is tried to be
>> configured with a frame size length that is bigger than what device
>> reported as supported. Device reports as max supported frame size is
>> 1514 but configured value is 1518.
>>
>> Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
>> driver to report the max supported frame size, this matches to the
>> initial intention.
>>
>> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>>
>> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>
Series applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-10-27 15:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 15:38 [dpdk-dev] [PATCH 1/2] net/af_packet: fix driver init with default MTU Ferruh Yigit
2021-10-26 15:38 ` [dpdk-dev] [PATCH 2/2] net/memif: " Ferruh Yigit
2021-10-26 15:45 ` David Christensen
2021-10-26 20:47 ` Stephen Hemminger
2021-10-27 8:27 ` Ferruh Yigit
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Ferruh Yigit
2021-10-27 9:14 ` [dpdk-dev] [PATCH v2 2/2] net/memif: " Ferruh Yigit
2021-10-27 15:13 ` Andrew Rybchenko
2021-10-27 15:12 ` [dpdk-dev] [PATCH v2 1/2] net/af_packet: " Andrew Rybchenko
2021-10-27 15:51 ` 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).