diff mbox series

[2/2] app/testpmd: retain original FDIR mode when configuring DCB

Message ID 20200908021603.44862-3-huwei013@chinasoftinc.com (mailing list archive)
State Rejected, archived
Delegated to: Ferruh Yigit
Headers show
Series updates for testpmd | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Wei Hu (Xavier) Sept. 8, 2020, 2:16 a.m. UTC
From: Huisong Li <lihuisong@huawei.com>

Sometimes, we have to start testpmd application with --pkt-filter-mode to
test flow table feature. When using 'port config 0 dcb vt off 4 pfc on'
command, the dcb information are configured in init_port_dcb_config
function by get_eth_dcb_conf function, And then rte_eth_dev_configure API
function will be called to re-configure PMD driver.

The values of rxmode and txmode in rte_eth_conf struct used to configure
PMD driver, come from the current values maintained in testpmd. However,
the fdir_conf.mode in rte_eth_conf struct is not set, which may cause that
some PMD driver cannot test the flow table feature when multiple TCs are
enabled.

Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 app/test-pmd/testpmd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ajit Khaparde Sept. 22, 2020, 5:15 a.m. UTC | #1
On Mon, Sep 7, 2020 at 7:16 PM Wei Hu (Xavier)
<huwei013@chinasoftinc.com> wrote:
>
> From: Huisong Li <lihuisong@huawei.com>
>
> Sometimes, we have to start testpmd application with --pkt-filter-mode to
> test flow table feature. When using 'port config 0 dcb vt off 4 pfc on'
> command, the dcb information are configured in init_port_dcb_config
> function by get_eth_dcb_conf function, And then rte_eth_dev_configure API
> function will be called to re-configure PMD driver.
>
> The values of rxmode and txmode in rte_eth_conf struct used to configure
> PMD driver, come from the current values maintained in testpmd. However,
> the fdir_conf.mode in rte_eth_conf struct is not set, which may cause that
> some PMD driver cannot test the flow table feature when multiple TCs are
> enabled.
>
> Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
> Cc: stable@dpdk.org
>
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> ---
>  app/test-pmd/testpmd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 73543bb..19bf972 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -3521,6 +3521,7 @@ init_port_dcb_config(portid_t pid,
>
>         port_conf.rxmode = rte_port->dev_conf.rxmode;
>         port_conf.txmode = rte_port->dev_conf.txmode;
> +       port_conf.fdir_conf.mode = rte_port->dev_conf.fdir_conf.mode;
This is probably not necessary. FDIR is due for deprecation [1].
https://doc.dpdk.org/guides/rel_notes/deprecation.html

>
>         /*set configuration of DCB in vt mode and DCB in non-vt mode*/
>         retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);
> --
> 2.9.5
>
Wei Hu (Xavier) Sept. 23, 2020, 7:14 a.m. UTC | #2
Hi, Ajit Khaparde

On 2020/9/22 13:15, Ajit Khaparde wrote:
> On Mon, Sep 7, 2020 at 7:16 PM Wei Hu (Xavier)
> <huwei013@chinasoftinc.com> wrote:
>> From: Huisong Li <lihuisong@huawei.com>
>>
>> Sometimes, we have to start testpmd application with --pkt-filter-mode to
>> test flow table feature. When using 'port config 0 dcb vt off 4 pfc on'
>> command, the dcb information are configured in init_port_dcb_config
>> function by get_eth_dcb_conf function, And then rte_eth_dev_configure API
>> function will be called to re-configure PMD driver.
>>
>> The values of rxmode and txmode in rte_eth_conf struct used to configure
>> PMD driver, come from the current values maintained in testpmd. However,
>> the fdir_conf.mode in rte_eth_conf struct is not set, which may cause that
>> some PMD driver cannot test the flow table feature when multiple TCs are
>> enabled.
>>
>> Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>> ---
>>   app/test-pmd/testpmd.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
>> index 73543bb..19bf972 100644
>> --- a/app/test-pmd/testpmd.c
>> +++ b/app/test-pmd/testpmd.c
>> @@ -3521,6 +3521,7 @@ init_port_dcb_config(portid_t pid,
>>
>>          port_conf.rxmode = rte_port->dev_conf.rxmode;
>>          port_conf.txmode = rte_port->dev_conf.txmode;
>> +       port_conf.fdir_conf.mode = rte_port->dev_conf.fdir_conf.mode;
> This is probably not necessary. FDIR is due for deprecation [1].
> https://doc.dpdk.org/guides/rel_notes/deprecation.html

Thanks your for pointing out it, this patch is really necessary.


Thanks, Xavier

>>          /*set configuration of DCB in vt mode and DCB in non-vt mode*/
>>          retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);
>> --
>> 2.9.5
>>
Wei Hu (Xavier) Sept. 24, 2020, 2:41 a.m. UTC | #3
Hi, Ajit Khaparde

On 2020/9/23 15:14, Wei Hu (Xavier) wrote:
> Hi, Ajit Khaparde
>
> On 2020/9/22 13:15, Ajit Khaparde wrote:
>> On Mon, Sep 7, 2020 at 7:16 PM Wei Hu (Xavier)
>> <huwei013@chinasoftinc.com> wrote:
>>> From: Huisong Li <lihuisong@huawei.com>
>>>
>>> Sometimes, we have to start testpmd application with 
>>> --pkt-filter-mode to
>>> test flow table feature. When using 'port config 0 dcb vt off 4 pfc on'
>>> command, the dcb information are configured in init_port_dcb_config
>>> function by get_eth_dcb_conf function, And then 
>>> rte_eth_dev_configure API
>>> function will be called to re-configure PMD driver.
>>>
>>> The values of rxmode and txmode in rte_eth_conf struct used to 
>>> configure
>>> PMD driver, come from the current values maintained in testpmd. 
>>> However,
>>> the fdir_conf.mode in rte_eth_conf struct is not set, which may 
>>> cause that
>>> some PMD driver cannot test the flow table feature when multiple TCs 
>>> are
>>> enabled.
>>>
>>> Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on 
>>> traffic class")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>>> ---
>>>   app/test-pmd/testpmd.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
>>> index 73543bb..19bf972 100644
>>> --- a/app/test-pmd/testpmd.c
>>> +++ b/app/test-pmd/testpmd.c
>>> @@ -3521,6 +3521,7 @@ init_port_dcb_config(portid_t pid,
>>>
>>>          port_conf.rxmode = rte_port->dev_conf.rxmode;
>>>          port_conf.txmode = rte_port->dev_conf.txmode;
>>> +       port_conf.fdir_conf.mode = rte_port->dev_conf.fdir_conf.mode;
>> This is probably not necessary. FDIR is due for deprecation [1].
>> https://doc.dpdk.org/guides/rel_notes/deprecation.html
>
> Thanks your for pointing out it, this patch is really necessary.
>
Sorry, it is a typo.

This patch is not really necessary.


Thanks, Xavier

>
> Thanks, Xavier
>
>>>          /*set configuration of DCB in vt mode and DCB in non-vt mode*/
>>>          retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, 
>>> num_tcs, pfc_en);
>>> -- 
>>> 2.9.5
>>>
diff mbox series

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 73543bb..19bf972 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3521,6 +3521,7 @@  init_port_dcb_config(portid_t pid,
 
 	port_conf.rxmode = rte_port->dev_conf.rxmode;
 	port_conf.txmode = rte_port->dev_conf.txmode;
+	port_conf.fdir_conf.mode = rte_port->dev_conf.fdir_conf.mode;
 
 	/*set configuration of DCB in vt mode and DCB in non-vt mode*/
 	retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);