DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
@ 2021-10-22 10:18 Andrew Rybchenko
  2021-10-22 13:21 ` Ferruh Yigit
  2021-10-29  5:58 ` Jiang, YuX
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Rybchenko @ 2021-10-22 10:18 UTC (permalink / raw)
  To: Thomas Monjalon, Ferruh Yigit, Ajit Khaparde, Huisong Li,
	Konstantin Ananyev, Rosen Xu
  Cc: dev, Ivan Ilchenko

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

rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu
or RTE_ETHER_MTU if application doesn't provide the value.
So, there is no point to allow rte_eth_dev_set_mtu() before since
set value will be overwritten on configure anyway.

Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/ethdev/rte_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 4ea5a657e0..0d7dd68dc1 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -3728,6 +3728,13 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
 			return ret;
 	}
 
+	if (dev->data->dev_configured == 0) {
+		RTE_ETHDEV_LOG(ERR,
+			"Port %u must be configured before MTU set\n",
+			port_id);
+		return -EINVAL;
+	}
+
 	ret = (*dev->dev_ops->mtu_set)(dev, mtu);
 	if (ret == 0)
 		dev->data->mtu = mtu;
-- 
2.30.2


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

* Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
  2021-10-22 10:18 [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure Andrew Rybchenko
@ 2021-10-22 13:21 ` Ferruh Yigit
  2021-10-22 13:27   ` Ferruh Yigit
  2021-10-29  5:58 ` Jiang, YuX
  1 sibling, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2021-10-22 13:21 UTC (permalink / raw)
  To: Andrew Rybchenko, Thomas Monjalon, Ajit Khaparde, Huisong Li,
	Konstantin Ananyev, Rosen Xu
  Cc: dev, Ivan Ilchenko

On 10/22/2021 11:18 AM, Andrew Rybchenko wrote:
> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> 
> rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu
> or RTE_ETHER_MTU if application doesn't provide the value.
> So, there is no point to allow rte_eth_dev_set_mtu() before since
> set value will be overwritten on configure anyway.
> 
> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
> 
> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
  2021-10-22 13:21 ` Ferruh Yigit
@ 2021-10-22 13:27   ` Ferruh Yigit
  0 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2021-10-22 13:27 UTC (permalink / raw)
  To: Andrew Rybchenko, Thomas Monjalon, Ajit Khaparde, Huisong Li,
	Konstantin Ananyev, Rosen Xu
  Cc: dev, Ivan Ilchenko

On 10/22/2021 2:21 PM, Ferruh Yigit wrote:
> On 10/22/2021 11:18 AM, Andrew Rybchenko wrote:
>> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>
>> rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu
>> or RTE_ETHER_MTU if application doesn't provide the value.
>> So, there is no point to allow rte_eth_dev_set_mtu() before since
>> set value will be overwritten on configure anyway.
>>
>> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>>
>> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/main, thanks.

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

* Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
  2021-10-22 10:18 [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure Andrew Rybchenko
  2021-10-22 13:21 ` Ferruh Yigit
@ 2021-10-29  5:58 ` Jiang, YuX
  2021-10-29  6:19   ` Andrew Rybchenko
  1 sibling, 1 reply; 8+ messages in thread
From: Jiang, YuX @ 2021-10-29  5:58 UTC (permalink / raw)
  To: Andrew Rybchenko, Thomas Monjalon, Yigit, Ferruh, Ajit Khaparde,
	Huisong Li, Ananyev, Konstantin, Xu, Rosen
  Cc: dev, Ivan Ilchenko

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
> Sent: Friday, October 22, 2021 6:18 PM
> To: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>;
> Huisong Li <lihuisong@huawei.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Xu, Rosen <rosen.xu@intel.com>
> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> Subject: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
> configure
> 
> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> 
> rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu
> or RTE_ETHER_MTU if application doesn't provide the value.
> So, there is no point to allow rte_eth_dev_set_mtu() before since set value
> will be overwritten on configure anyway.
> 
> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
> 
> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
>  lib/ethdev/rte_ethdev.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
> 4ea5a657e0..0d7dd68dc1 100644
> --- a/lib/ethdev/rte_ethdev.c
> +++ b/lib/ethdev/rte_ethdev.c
> @@ -3728,6 +3728,13 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t
> mtu)
>  			return ret;
>  	}
> 
> +	if (dev->data->dev_configured == 0) {
> +		RTE_ETHDEV_LOG(ERR,
> +			"Port %u must be configured before MTU set\n",
> +			port_id);
> +		return -EINVAL;
> +	}
> +
>  	ret = (*dev->dev_ops->mtu_set)(dev, mtu);
>  	if (ret == 0)
>  		dev->data->mtu = mtu;
> --
> 2.30.2
Hi Ivan,

We meet an issue based on this patch when test dpdk21.11-rc1.
BugID: https://bugs.dpdk.org/show_bug.cgi?id=864, could you pls have a look?

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

* Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
  2021-10-29  5:58 ` Jiang, YuX
@ 2021-10-29  6:19   ` Andrew Rybchenko
  2021-10-29  9:22     ` Ferruh Yigit
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Rybchenko @ 2021-10-29  6:19 UTC (permalink / raw)
  To: Jiang, YuX, Thomas Monjalon, Yigit, Ferruh, Ajit Khaparde,
	Huisong Li, Ananyev, Konstantin, Xu, Rosen
  Cc: dev, Ivan Ilchenko

On 10/29/21 8:58 AM, Jiang, YuX wrote:
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
>> Sent: Friday, October 22, 2021 6:18 PM
>> To: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
>> <ferruh.yigit@intel.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>;
>> Huisong Li <lihuisong@huawei.com>; Ananyev, Konstantin
>> <konstantin.ananyev@intel.com>; Xu, Rosen <rosen.xu@intel.com>
>> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>> Subject: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
>> configure
>>
>> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>
>> rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu
>> or RTE_ETHER_MTU if application doesn't provide the value.
>> So, there is no point to allow rte_eth_dev_set_mtu() before since set value
>> will be overwritten on configure anyway.
>>
>> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>>
>> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>> ---
>>   lib/ethdev/rte_ethdev.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
>> 4ea5a657e0..0d7dd68dc1 100644
>> --- a/lib/ethdev/rte_ethdev.c
>> +++ b/lib/ethdev/rte_ethdev.c
>> @@ -3728,6 +3728,13 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t
>> mtu)
>>   			return ret;
>>   	}
>>
>> +	if (dev->data->dev_configured == 0) {
>> +		RTE_ETHDEV_LOG(ERR,
>> +			"Port %u must be configured before MTU set\n",
>> +			port_id);
>> +		return -EINVAL;
>> +	}
>> +
>>   	ret = (*dev->dev_ops->mtu_set)(dev, mtu);
>>   	if (ret == 0)
>>   		dev->data->mtu = mtu;
>> --
>> 2.30.2
> Hi Ivan,
> 
> We meet an issue based on this patch when test dpdk21.11-rc1.
> BugID: https://bugs.dpdk.org/show_bug.cgi?id=864, could you pls have a look?
> 

Hi, I think the problem is fixed by [1].

[1] 
https://patches.dpdk.org/project/dpdk/patch/20211024164237.2116166-1-andrew.rybchenko@oktetlabs.ru/

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

* Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
  2021-10-29  6:19   ` Andrew Rybchenko
@ 2021-10-29  9:22     ` Ferruh Yigit
  2021-11-01  9:39       ` Jiang, YuX
  0 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2021-10-29  9:22 UTC (permalink / raw)
  To: Andrew Rybchenko, Jiang, YuX, Thomas Monjalon, Ajit Khaparde,
	Huisong Li, Ananyev, Konstantin, Xu, Rosen
  Cc: dev, Ivan Ilchenko

On 10/29/2021 7:19 AM, Andrew Rybchenko wrote:
> On 10/29/21 8:58 AM, Jiang, YuX wrote:
>>> -----Original Message-----
>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
>>> Sent: Friday, October 22, 2021 6:18 PM
>>> To: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
>>> <ferruh.yigit@intel.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>;
>>> Huisong Li <lihuisong@huawei.com>; Ananyev, Konstantin
>>> <konstantin.ananyev@intel.com>; Xu, Rosen <rosen.xu@intel.com>
>>> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>> Subject: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
>>> configure
>>>
>>> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>>
>>> rte_eth_dev_configure() always sets MTU to either dev_conf.rxmode.mtu
>>> or RTE_ETHER_MTU if application doesn't provide the value.
>>> So, there is no point to allow rte_eth_dev_set_mtu() before since set value
>>> will be overwritten on configure anyway.
>>>
>>> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>>>
>>> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>>> ---
>>>   lib/ethdev/rte_ethdev.c | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
>>> 4ea5a657e0..0d7dd68dc1 100644
>>> --- a/lib/ethdev/rte_ethdev.c
>>> +++ b/lib/ethdev/rte_ethdev.c
>>> @@ -3728,6 +3728,13 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t
>>> mtu)
>>>               return ret;
>>>       }
>>>
>>> +    if (dev->data->dev_configured == 0) {
>>> +        RTE_ETHDEV_LOG(ERR,
>>> +            "Port %u must be configured before MTU set\n",
>>> +            port_id);
>>> +        return -EINVAL;
>>> +    }
>>> +
>>>       ret = (*dev->dev_ops->mtu_set)(dev, mtu);
>>>       if (ret == 0)
>>>           dev->data->mtu = mtu;
>>> -- 
>>> 2.30.2
>> Hi Ivan,
>>
>> We meet an issue based on this patch when test dpdk21.11-rc1.
>> BugID: https://bugs.dpdk.org/show_bug.cgi?id=864, could you pls have a look?
>>
> 
> Hi, I think the problem is fixed by [1].
> 
> [1] https://patches.dpdk.org/project/dpdk/patch/20211024164237.2116166-1-andrew.rybchenko@oktetlabs.ru/

That patch is merged to next-net, Yu can you please verify the issue
with latest next-net?

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

* Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
  2021-10-29  9:22     ` Ferruh Yigit
@ 2021-11-01  9:39       ` Jiang, YuX
  2021-11-01  9:42         ` Andrew Rybchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Jiang, YuX @ 2021-11-01  9:39 UTC (permalink / raw)
  To: Yigit, Ferruh, Andrew Rybchenko, Thomas Monjalon, Ajit Khaparde,
	Huisong Li, Ananyev, Konstantin, Xu, Rosen
  Cc: dev, Ivan Ilchenko

> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Friday, October 29, 2021 5:22 PM
> To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Jiang, YuX
> <yux.jiang@intel.com>; Thomas Monjalon <thomas@monjalon.net>; Ajit
> Khaparde <ajit.khaparde@broadcom.com>; Huisong Li
> <lihuisong@huawei.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Xu, Rosen <rosen.xu@intel.com>
> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> Subject: Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
> configure
> 
> On 10/29/2021 7:19 AM, Andrew Rybchenko wrote:
> > On 10/29/21 8:58 AM, Jiang, YuX wrote:
> >>> -----Original Message-----
> >>> From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
> >>> Sent: Friday, October 22, 2021 6:18 PM
> >>> To: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
> >>> <ferruh.yigit@intel.com>; Ajit Khaparde
> >>> <ajit.khaparde@broadcom.com>; Huisong Li <lihuisong@huawei.com>;
> >>> Ananyev, Konstantin <konstantin.ananyev@intel.com>; Xu, Rosen
> >>> <rosen.xu@intel.com>
> >>> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> >>> Subject: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
> >>> configure
> >>>
> >>> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> >>>
> >>> rte_eth_dev_configure() always sets MTU to either
> >>> dev_conf.rxmode.mtu or RTE_ETHER_MTU if application doesn't provide
> the value.
> >>> So, there is no point to allow rte_eth_dev_set_mtu() before since
> >>> set value will be overwritten on configure anyway.
> >>>
> >>> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
> >>>
> >>> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
> >>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> >>> ---
> >>>   lib/ethdev/rte_ethdev.c | 7 +++++++
> >>>   1 file changed, 7 insertions(+)
> >>>
> >>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
> >>> 4ea5a657e0..0d7dd68dc1 100644
> >>> --- a/lib/ethdev/rte_ethdev.c
> >>> +++ b/lib/ethdev/rte_ethdev.c
> >>> @@ -3728,6 +3728,13 @@ rte_eth_dev_set_mtu(uint16_t port_id,
> >>> uint16_t
> >>> mtu)
> >>>               return ret;
> >>>       }
> >>>
> >>> +    if (dev->data->dev_configured == 0) {
> >>> +        RTE_ETHDEV_LOG(ERR,
> >>> +            "Port %u must be configured before MTU set\n",
> >>> +            port_id);
> >>> +        return -EINVAL;
> >>> +    }
> >>> +
> >>>       ret = (*dev->dev_ops->mtu_set)(dev, mtu);
> >>>       if (ret == 0)
> >>>           dev->data->mtu = mtu;
> >>> --
> >>> 2.30.2
> >> Hi Ivan,
> >>
> >> We meet an issue based on this patch when test dpdk21.11-rc1.
> >> BugID: https://bugs.dpdk.org/show_bug.cgi?id=864, could you pls have a
> look?
> >>
> >
> > Hi, I think the problem is fixed by [1].
> >
> > [1]
> > https://patches.dpdk.org/project/dpdk/patch/20211024164237.2116166-1-
> a
> > ndrew.rybchenko@oktetlabs.ru/
> 
> That patch is merged to next-net, Yu can you please verify the issue with
> latest next-net?

Hi Ferruh,
We verify patch https://patches.dpdk.org/project/dpdk/patch/20211024164237.2116166-1-andrew.rybchenko@oktetlabs.ru/ on baseline dpdk main branch 6cc51b1293ceac4a77d4bf7ac91a8bbd59e1f78c
Test failed on nic XXV710 for 25GbE SFP28 158b/os Red Hat Enterprise Linux 8.4.
Need we verify it on next-net?

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

* Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure
  2021-11-01  9:39       ` Jiang, YuX
@ 2021-11-01  9:42         ` Andrew Rybchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Rybchenko @ 2021-11-01  9:42 UTC (permalink / raw)
  To: Jiang, YuX, Yigit, Ferruh, Thomas Monjalon, Ajit Khaparde,
	Huisong Li, Ananyev, Konstantin, Xu, Rosen
  Cc: dev, Ivan Ilchenko

On 11/1/21 12:39 PM, Jiang, YuX wrote:
>> -----Original Message-----
>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
>> Sent: Friday, October 29, 2021 5:22 PM
>> To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Jiang, YuX
>> <yux.jiang@intel.com>; Thomas Monjalon <thomas@monjalon.net>; Ajit
>> Khaparde <ajit.khaparde@broadcom.com>; Huisong Li
>> <lihuisong@huawei.com>; Ananyev, Konstantin
>> <konstantin.ananyev@intel.com>; Xu, Rosen <rosen.xu@intel.com>
>> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>> Subject: Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
>> configure
>>
>> On 10/29/2021 7:19 AM, Andrew Rybchenko wrote:
>>> On 10/29/21 8:58 AM, Jiang, YuX wrote:
>>>>> -----Original Message-----
>>>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
>>>>> Sent: Friday, October 22, 2021 6:18 PM
>>>>> To: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
>>>>> <ferruh.yigit@intel.com>; Ajit Khaparde
>>>>> <ajit.khaparde@broadcom.com>; Huisong Li <lihuisong@huawei.com>;
>>>>> Ananyev, Konstantin <konstantin.ananyev@intel.com>; Xu, Rosen
>>>>> <rosen.xu@intel.com>
>>>>> Cc: dev@dpdk.org; Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>>>> Subject: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
>>>>> configure
>>>>>
>>>>> From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>>>>
>>>>> rte_eth_dev_configure() always sets MTU to either
>>>>> dev_conf.rxmode.mtu or RTE_ETHER_MTU if application doesn't provide
>> the value.
>>>>> So, there is no point to allow rte_eth_dev_set_mtu() before since
>>>>> set value will be overwritten on configure anyway.
>>>>>
>>>>> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
>>>>>
>>>>> Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
>>>>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>>>>> ---
>>>>>    lib/ethdev/rte_ethdev.c | 7 +++++++
>>>>>    1 file changed, 7 insertions(+)
>>>>>
>>>>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
>>>>> 4ea5a657e0..0d7dd68dc1 100644
>>>>> --- a/lib/ethdev/rte_ethdev.c
>>>>> +++ b/lib/ethdev/rte_ethdev.c
>>>>> @@ -3728,6 +3728,13 @@ rte_eth_dev_set_mtu(uint16_t port_id,
>>>>> uint16_t
>>>>> mtu)
>>>>>                return ret;
>>>>>        }
>>>>>
>>>>> +    if (dev->data->dev_configured == 0) {
>>>>> +        RTE_ETHDEV_LOG(ERR,
>>>>> +            "Port %u must be configured before MTU set\n",
>>>>> +            port_id);
>>>>> +        return -EINVAL;
>>>>> +    }
>>>>> +
>>>>>        ret = (*dev->dev_ops->mtu_set)(dev, mtu);
>>>>>        if (ret == 0)
>>>>>            dev->data->mtu = mtu;
>>>>> --
>>>>> 2.30.2
>>>> Hi Ivan,
>>>>
>>>> We meet an issue based on this patch when test dpdk21.11-rc1.
>>>> BugID: https://bugs.dpdk.org/show_bug.cgi?id=864, could you pls have a
>> look?
>>>>
>>>
>>> Hi, I think the problem is fixed by [1].
>>>
>>> [1]
>>> https://patches.dpdk.org/project/dpdk/patch/20211024164237.2116166-1-
>> a
>>> ndrew.rybchenko@oktetlabs.ru/
>>
>> That patch is merged to next-net, Yu can you please verify the issue with
>> latest next-net?
> 
> Hi Ferruh,
> We verify patch https://patches.dpdk.org/project/dpdk/patch/20211024164237.2116166-1-andrew.rybchenko@oktetlabs.ru/ on baseline dpdk main branch 6cc51b1293ceac4a77d4bf7ac91a8bbd59e1f78c
> Test failed on nic XXV710 for 25GbE SFP28 158b/os Red Hat Enterprise Linux 8.4.
> Need we verify it on next-net?
> 

What exactly goes wrong in the test if the patch is applied?

Andrew.

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

end of thread, other threads:[~2021-11-01  9:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 10:18 [dpdk-dev] [PATCH] ethdev: forbid MTU set before device configure Andrew Rybchenko
2021-10-22 13:21 ` Ferruh Yigit
2021-10-22 13:27   ` Ferruh Yigit
2021-10-29  5:58 ` Jiang, YuX
2021-10-29  6:19   ` Andrew Rybchenko
2021-10-29  9:22     ` Ferruh Yigit
2021-11-01  9:39       ` Jiang, YuX
2021-11-01  9:42         ` Andrew Rybchenko

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