app/testpmd: change port detach interface
PATCH 1/1 app/testpmd: change port detach interface
With the latest published interface of rte_eal_hotplug_[add,remove](), and rte_eth_dev_close(), rte_eth_dev_close() would cleanup all the data structures of port's eth dev leaving the device common resource intact if RTE_ETH_DEV_CLOSE_REMOVE is set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" as eth_dev could have been closed already and rte_eth_devices[port_id] reused.
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
--- app/test-pmd/cmdline.c | 15 ++++++++------- app/test-pmd/testpmd.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ app/test-pmd/testpmd.h | 1 + 3 files changed, 54 insertions(+), 7 deletions(-)
app/test-pmd/cmdline.c +8 -7
@@ -1456,7 +1456,7 @@ cmdline_parse_inst_t cmd_operate_attach_port = {struct cmd_operate_detach_port_result {cmdline_fixed_string_t port;cmdline_fixed_string_t keyword; -portid_t port_id; +cmdline_fixed_string_t identifier; }; static void cmd_operate_detach_port_parsed(void *parsed_result,
@@ -1466,7 +1466,7 @@ static void cmd_operate_detach_port_parsed(void *parsed_result,struct cmd_operate_detach_port_result *res = parsed_result;if (!strcmp (res->keyword,"detach" )) -detach_port_device (res->port_id); +detach_port (res->identifier);else printf ("Unknown parameter\n" ); }
@@ -1477,18 +1477,19 @@ cmdline_parse_token_string_t cmd_operate_detach_port_port =cmdline_parse_token_string_t cmd_operate_detach_port_keyword = TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_port_result, keyword,"detach" ); -cmdline_parse_token_num_t cmd_operate_detach_port_port_id = - TOKEN_NUM_INITIALIZER(struct cmd_operate_detach_port_result, - port_id,UINT16 ); +cmdline_parse_token_string_t cmd_operate_detach_port_identifier = + TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_port_result, + identifier,NULL );cmdline_parse_inst_t cmd_operate_detach_port = { .f = cmd_operate_detach_port_parsed, .data =NULL , - .help_str ="port detach <port_id>" , + .help_str ="port detach <identifier>:" +"(identifier: pci address or virtual dev name)" , .tokens = { (void *)&cmd_operate_detach_port_port, (void *)&cmd_operate_detach_port_keyword, - (void *)&cmd_operate_detach_port_port_id, + (void *)&cmd_operate_detach_port_identifier,NULL , }, };
app/test-pmd/testpmd.c +45 -0
51 lines not on this page · raw message
app/test-pmd/testpmd.h +1 -0
@@ -788,6 +788,7 @@ void stop_port(portid_t pid);void close_port (portid_t pid);void reset_port (portid_t pid);void attach_port (char *identifier); +void detach_port (char *identifier);void detach_port_device (portid_t port_id);int all_ports_stopped (void );int port_is_stopped (portid_t port_id);
Signature · 1 line
2.8.4
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EAL rte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.
PS: Please remind that a device can have multiple ports.
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.
Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
But if "port close" was already called on that port, eth_dev->state would be set as RTE_ETH_DEV_UNUSED and that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?
Quoted 9 lines
Quoted 3 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.
Renaming the command to "detach <identifier>" ?
Quoted 4 lines
PS: Please remind that a device can have multiple ports.
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?
Yes it is incorrect to close a port which is already closed :)
Quoted 10 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to manage rte_device in testpmd? Being able to close ports in not enough? Please describe a scenario.
Quoted 36 lines · Thomas Monjalon
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?Yes it is incorrect to close a port which is already closed :)
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.
Quoted 7 lines
Quoted 1 line
Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to managerte_devicein testpmd? Being able to close ports in not enough? Please describe a scenario.
We just want to support testing hotplug detach along with hotplug attach from testpmd. Currently there is no way to detach if we close the port first.
Another reason is that in our new PMD, for detaching one specific port, we need more than one try as the PMD might return -EAGAIN.
So with the current "port detach" implementation, after closing the port, if PMD returns -EAGAIN for rte_dev_remove() call, there is no way to try it again.
Quoted 1 line
17/05/2019 10:55, Nithin Dabilpuram:
Quoted 45 lines · Thomas Monjalon
Quoted 36 lines
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?Yes it is incorrect to close a port which is already closed :)
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.Quoted 7 lines
Quoted 1 line
Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to managerte_devicein testpmd? Being able to close ports in not enough? Please describe a scenario.
Quoted 3 lines
We just want to support testing hotplug detach along with hotplug attach from testpmd. Currently there is no way to detach if we close the port first.
OK
Quoted 5 lines
Another reason is that in our new PMD, for detaching one specific port, we need more than one try as the PMD might return
-EAGAIN.
So with the current "port detach" implementation, after closing the port, if PMD returns-EAGAINforrte_dev_remove()call, there is no way to try it again.
This is a bug.
Should we catch -EAGAIN somewhere?
Quoted 46 lines · Thomas Monjalon
17/05/2019 10:55, Nithin Dabilpuram:
Quoted 45 lines · Thomas Monjalon
Quoted 43 lines
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?Yes it is incorrect to close a port which is already closed :)
Quoted 10 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to managerte_devicein testpmd? Being able to close ports in not enough? Please describe a scenario.
Quoted 5 lines
Quoted 3 lines
We just want to support testing hotplug detach along with hotplug attach from testpmd. Currently there is no way to detach if we close the port first.
OK
So can I send next revision with command renamed to "detach <identifier>" ?
Quoted 9 lines
Quoted 6 lines
Another reason is that in our new PMD, for detaching one specific port, we need more than one try as the PMD might return
-EAGAIN.
So with the current "port detach" implementation, after closing the port, if PMD returns-EAGAINforrte_dev_remove()call, there is no way to try it again.This is a bug.
Should we catch-EAGAINsomewhere?
It is already caught in local_dev_remove() andrte_dev_remove() fails. Only problem as I said below is
in testpmd if first call to detach_port_device() i.e handler of "port detach", rte_dev_remove() returns -EAGAIN and PMD cleaned up the resources partially like eth_dev resources, the second time call cannot work port_id will not be valid anymore.
Quoted 2 lines
Hi Thomas,
Quoted 47 lines · Nithin Dabilpuram
Quoted 46 lines · Thomas Monjalon
17/05/2019 10:55, Nithin Dabilpuram:
Quoted 45 lines · Thomas Monjalon
Quoted 43 lines
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?Yes it is incorrect to close a port which is already closed :)
Quoted 10 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to managerte_devicein testpmd? Being able to close ports in not enough? Please describe a scenario.
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
We just want to support testing hotplug detach along with hotplug attach from testpmd. Currently there is no way to detach if we close the port first.
OK
So can I send next revision with command renamed to "detach <identifier>" ?
Any info on this ? I can even add it as another cmd without disturbing existing command if needed.
Quoted 18 lines
Quoted 9 lines
Quoted 6 lines
Another reason is that in our new PMD, for detaching one specific port, we need more than one try as the PMD might return
-EAGAIN.
So with the current "port detach" implementation, after closing the port, if PMD returns-EAGAINforrte_dev_remove()call, there is no way to try it again.This is a bug.
Should we catch-EAGAINsomewhere?It is already caught in
local_dev_remove()andrte_dev_remove()fails. Only problem as I said below is
in testpmd if first call todetach_port_device()i.e handler of "port detach",rte_dev_remove()returns-EAGAINand PMD cleaned up the resources partially likeeth_devresources, the second time call cannot workport_idwill not be valid anymore.Quoted 2 lines
Hi Thomas,
A reminder about this patch.
Quoted 78 lines · Nithin Dabilpuram
Hi Thomas,
Quoted 47 lines · Nithin Dabilpuram
Quoted 46 lines · Thomas Monjalon
17/05/2019 10:55, Nithin Dabilpuram:
Quoted 45 lines · Thomas Monjalon
Quoted 43 lines
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?Yes it is incorrect to close a port which is already closed :)
Quoted 10 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to managerte_devicein testpmd? Being able to close ports in not enough? Please describe a scenario.Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
We just want to support testing hotplug detach along with hotplug attach from testpmd. Currently there is no way to detach if we close the port first.
OK
So can I send next revision with command renamed to "detach <identifier>" ?
Any info on this ? I can even add it as another cmd without disturbing existing command if needed.
Quoted 18 lines
Quoted 9 lines
Quoted 6 lines
Another reason is that in our new PMD, for detaching one specific port, we need more than one try as the PMD might return
-EAGAIN.
So with the current "port detach" implementation, after closing the port, if PMD returns-EAGAINforrte_dev_remove()call, there is no way to try it again.This is a bug.
Should we catch-EAGAINsomewhere?It is already caught in
local_dev_remove()andrte_dev_remove()fails. Only problem as I said below is
in testpmd if first call todetach_port_device()i.e handler of "port detach",rte_dev_remove()returns-EAGAINand PMD cleaned up the resources partially likeeth_devresources, the second time call cannot workport_idwill not be valid anymore.Quoted 2 lines
Quoted 54 lines · Nithin Dabilpuram
Hi Thomas,
Quoted 51 lines · Nithin Dabilpuram
Quoted 50 lines · Thomas Monjalon
17/05/2019 10:55, Nithin Dabilpuram:
Quoted 48 lines · Thomas Monjalon
Quoted 36 lines
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?Yes it is incorrect to close a port which is already closed :)
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.Quoted 7 lines
Quoted 1 line
Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to managerte_devicein testpmd? Being able to close ports in not enough? Please describe a scenario.We just want to support testing hotplug detach along with hotplug attach from testpmd. Currently there is no way to detach if we close the port first.
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
OK
So can I send next revision with command renamed to "detach <identifier>" ?
Any info on this ? I can even add it as another cmd without disturbing existing command if needed.
This sounds better option to me. I see the need to remove device via 'identifier' but also still it is easier to use 'port_id' for removal when applicable, so I am for keeping it.
What do you think adding a new command:
'device detach'
Also testpmd doesn't dead with 'device' much, it mainly works in port level, because of this does it make sense to add another command something like:
"show device info all"
Quoted 19 lines
Quoted 19 lines
Quoted 10 lines
Quoted 7 lines
Another reason is that in our new PMD, for detaching one specific port, we need more than one try as the PMD might return
-EAGAIN.
So with the current "port detach" implementation, after closing the port, if PMD returns-EAGAINforrte_dev_remove()call, there is no way to try it again.This is a bug.
Should we catch-EAGAINsomewhere?It is already caught in
local_dev_remove()andrte_dev_remove()fails. Only problem as I said below is
in testpmd if first call todetach_port_device()i.e handler of "port detach",rte_dev_remove()returns-EAGAINand PMD cleaned up the resources partially likeeth_devresources, the second time call cannot workport_idwill not be valid anymore.Quoted 2 lines
Quoted 56 lines · Ferruh
Quoted 55 lines · Nithin Dabilpuram
Hi Thomas,
Quoted 52 lines · Nithin Dabilpuram
Quoted 51 lines · Thomas Monjalon
17/05/2019 10:55, Nithin Dabilpuram:
Quoted 45 lines · Thomas Monjalon
Quoted 36 lines
15/05/2019 08:52, Nithin Dabilpuram:
Quoted 18 lines
Hi Thomas,
Quoted 12 lines · Thomas Monjalon
Hi,
13/05/2019 13:21, Nithin Dabilpuram:
Quoted 8 lines
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
So "port detach" (~hotplug remove) should be able to work, with device identifier like "port attach" aseth_devcould have been closed already and rte_eth_devices[port_id] reused.Quoted 3 lines
"port attach" uses devargs as identifier because there is no port id before creating it. But "detach port" uses logically the port id to close.
Quoted 5 lines
But if "port close" was already called on that port,
eth_dev->statewould be set asRTE_ETH_DEV_UNUSEDand that port id could be reused.
So after "port close" if we call "port detach", isn't it incorrect to use the same port id ?Yes it is incorrect to close a port which is already closed :)
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
This change alters "port detach" cmdline interface to work with device identifier like "port attach".
The word "port" means an ethdev port, so it should be referenced with a port id.
If you want to close an EALrte_device, then you should rename the command.
But testpmd purpose should be to work with ethdev ports only.Quoted 7 lines
Quoted 1 line
Renaming the command to "detach <identifier>" ?
Yes something like that.
But why do you want to managerte_devicein testpmd? Being able to close ports in not enough? Please describe a scenario.Quoted 3 lines
We just want to support testing hotplug detach along with hotplug attach from testpmd. Currently there is no way to detach if we close the port first.
OK
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
So can I send next revision with command renamed to "detach <identifier>" ?
Any info on this ? I can even add it as another cmd without disturbing existing command if needed.
This sounds better option to me. I see the need to remove device via 'identifier' but also still it is easier to use '
port_id' for removal when applicable, so I am for keeping it.
Thanks. Will send out a patch for the same.
Quoted 7 lines
What do you think adding a new command:
'device detach'Also testpmd doesn't dead with 'device' much, it mainly works in port level, because of this does it make sense to add another command something like:
"show device info all"
Sure. Will add it.
Quoted 21 lines
Quoted 20 lines
Quoted 20 lines
Quoted 11 lines
Quoted 8 lines
Another reason is that in our new PMD, for detaching one specific port, we need more than one try as the PMD might return
-EAGAIN.
So with the current "port detach" implementation, after closing the port, if PMD returns-EAGAINforrte_dev_remove()call, there is no way to try it again.This is a bug.
Should we catch-EAGAINsomewhere?It is already caught in
local_dev_remove()andrte_dev_remove()fails. Only problem as I said below is
in testpmd if first call todetach_port_device()i.e handler of "port detach",rte_dev_remove()returns-EAGAINand PMD cleaned up the resources partially likeeth_devresources, the second time call cannot workport_idwill not be valid anymore.Quoted 2 lines
PATCH v2 1/1 app/testpmd: add device related cmds
In reply to Nithin DabilpuramWith the latest published interface of rte_eal_hotplug_[add,remove](), and rte_eth_dev_close(), rte_eth_dev_close() would cleanup all the data structures of port's eth dev leaving the device common resource intact if RTE_ETH_DEV_CLOSE_REMOVE is set in dev flags.
So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
--- app/test-pmd/cmdline.c | 88 +++++++++++++++++++++++++++++ app/test-pmd/config.c | 73 ++++++++++++++++++++++++ app/test-pmd/testpmd.c | 45 +++++++++++++++ app/test-pmd/testpmd.h | 2 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 64 +++++++++++++++++++++ 5 files changed, 272 insertions(+)
app/test-pmd/cmdline.c +88 -0
@@ -1493,6 +1493,47 @@ cmdline_parse_inst_t cmd_operate_detach_port = { }, }; +/* *** detach device by identifier *** */ +struct cmd_operate_detach_device_result { +cmdline_fixed_string_t device; +cmdline_fixed_string_t keyword; +cmdline_fixed_string_t identifier; +}; + +static void cmd_operate_detach_device_parsed (void *parsed_result, + __attribute__((unused))struct cmdline *cl, + __attribute__((unused))void *data) +{ +struct cmd_operate_detach_device_result *res = parsed_result; + +if (!strcmp (res->keyword,"detach" )) +detach_device (res->identifier); +else +printf ("Unknown parameter\n" ); +} + +cmdline_parse_token_string_t cmd_operate_detach_device_device = + TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_device_result, + device,"device" ); +cmdline_parse_token_string_t cmd_operate_detach_device_keyword = + TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_device_result, + keyword,"detach" ); +cmdline_parse_token_string_t cmd_operate_detach_device_identifier = + TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_device_result, + identifier,NULL ); + +cmdline_parse_inst_t cmd_operate_detach_device = { + .f = cmd_operate_detach_device_parsed, + .data =NULL , + .help_str ="device detach <identifier>:" +"(identifier: pci address or virtual dev name)" , + .tokens = { + (void *)&cmd_operate_detach_device_device, + (void *)&cmd_operate_detach_device_keyword, + (void *)&cmd_operate_detach_device_identifier, +NULL , + }, +};/* *** configure speed for all ports *** */ struct cmd_config_speed_all {cmdline_fixed_string_t port;
@@ -7456,6 +7497,51 @@ cmdline_parse_inst_t cmd_showport = { }, }; +/* *** SHOW DEVICE INFO *** */ +struct cmd_showdevice_result { +cmdline_fixed_string_t show; +cmdline_fixed_string_t device; +cmdline_fixed_string_t what; +cmdline_fixed_string_t identifier; +}; + +static void cmd_showdevice_parsed (void *parsed_result, + __attribute__((unused))struct cmdline *cl, + __attribute__((unused))void *data) +{ +struct cmd_showdevice_result *res = parsed_result; +if (!strcmp (res->what,"info" )) { +if (!strcmp (res->identifier,"all" )) +device_infos_display (NULL ); +else +device_infos_display (res->identifier); + } +} + +cmdline_parse_token_string_t cmd_showdevice_show = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, show, +"show" ); +cmdline_parse_token_string_t cmd_showdevice_device = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, device, "device"); +cmdline_parse_token_string_t cmd_showdevice_what = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, what, +"info" ); +cmdline_parse_token_string_t cmd_showdevice_identifier = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, + identifier,NULL ); + +cmdline_parse_inst_t cmd_showdevice = { + .f = cmd_showdevice_parsed, + .data =NULL , + .help_str ="show device info <identifier>|all" , + .tokens = { + (void *)&cmd_showdevice_show, + (void *)&cmd_showdevice_device, + (void *)&cmd_showdevice_what, + (void *)&cmd_showdevice_identifier, +NULL , + }, +};/* *** SHOW QUEUE INFO *** */ struct cmd_showqueue_result {cmdline_fixed_string_t show;
@@ -18723,6 +18809,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_showport, (cmdline_parse_inst_t *)&cmd_showqueue, (cmdline_parse_inst_t *)&cmd_showportall, + (cmdline_parse_inst_t *)&cmd_showdevice, (cmdline_parse_inst_t *)&cmd_showcfg, (cmdline_parse_inst_t *)&cmd_showfwdall, (cmdline_parse_inst_t *)&cmd_start,
@@ -18811,6 +18898,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_operate_specific_port, (cmdline_parse_inst_t *)&cmd_operate_attach_port, (cmdline_parse_inst_t *)&cmd_operate_detach_port, + (cmdline_parse_inst_t *)&cmd_operate_detach_device, (cmdline_parse_inst_t *)&cmd_set_port_setup_on, (cmdline_parse_inst_t *)&cmd_config_speed_all, (cmdline_parse_inst_t *)&cmd_config_speed_specific,
app/test-pmd/config.c +73 -0
79 lines not on this page · raw message
app/test-pmd/testpmd.c +45 -0
51 lines not on this page · raw message
app/test-pmd/testpmd.h +2 -0
@@ -689,6 +689,7 @@ void nic_stats_clear(portid_t port_id);void nic_xstats_display (portid_t port_id);void nic_xstats_clear (portid_t port_id);void nic_stats_mapping_display (portid_t port_id); +void device_infos_display (const char *identifier);void port_infos_display (portid_t port_id);void port_summary_display (portid_t port_id);void port_summary_header_display (void );
@@ -788,6 +789,7 @@ void stop_port(portid_t pid);void close_port (portid_t pid);void reset_port (portid_t pid);void attach_port (char *identifier); +void detach_device (char *identifier);void detach_port_device (portid_t port_id);int all_ports_stopped (void );int port_is_stopped (portid_t port_id);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +64 -0
76 lines not on this page · raw message
Signature · 1 line
2.8.4
Re: [dpdk-dev] [PATCH v2] app/testpmd: add device related cmds
Quoted 14 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
Quoted 8 lines
Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/cmdline.c | 88 +++++++++++++++++++++++++++++ app/test-pmd/config.c | 73 ++++++++++++++++++++++++ app/test-pmd/testpmd.c | 45 +++++++++++++++ app/test-pmd/testpmd.h | 2 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 64 +++++++++++++++++++++ 5 files changed, 272 insertions(+)
Can you please add new commands to help string in 'cmd_help_long_parsed()' too?
<...>
Re: [dpdk-dev] [EXT] Re: [PATCH v2] app/testpmd: add device related cmds
Quoted 27 lines · Ferruh Yigit
External Email
----------------------------------------------------------------------
Quoted 14 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
Quoted 8 lines
Signed-off-by Nithin Dabilpuram <[email protected]>--- app/test-pmd/cmdline.c | 88 +++++++++++++++++++++++++++++ app/test-pmd/config.c | 73 ++++++++++++++++++++++++ app/test-pmd/testpmd.c | 45 +++++++++++++++ app/test-pmd/testpmd.h | 2 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 64 +++++++++++++++++++++ 5 files changed, 272 insertions(+)
Quoted 2 lines
Can you please add new commands to help string in '
cmd_help_long_parsed()' too?
Sorry, I missed that, will add it in next version.
Quoted 3 lines
<...>
PATCH v3 1/1 app/testpmd: add device related cmds
In reply to Nithin DabilpuramWith the latest published interface of rte_eal_hotplug_[add,remove](), and rte_eth_dev_close(), rte_eth_dev_close() would cleanup all the data structures of port's eth dev leaving the device common resource intact if RTE_ETH_DEV_CLOSE_REMOVE is set in dev flags.
So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
---
v3:
* Add help command text for new device related commands v2:
* Add new commands "device detach" and "show device info all" instead of change in existing command "port detach"
app/test-pmd/cmdline.c | 107 +++++++++++++++++++++++++++- app/test-pmd/config.c | 73 +++++++++++++++++++ app/test-pmd/testpmd.c | 45 ++++++++++++ app/test-pmd/testpmd.h | 2 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 64 +++++++++++++++++ 5 files changed, 289 insertions(+), 2 deletions(-)
app/test-pmd/cmdline.c +105 -2
@@ -101,6 +101,7 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result," help registers : Reading and setting port registers.\n" " help filters : Filters configuration help.\n" " help traffic_management : Traffic Management commmands.\n" +" help devices : Device related cmds.\n" " help all : All of the above sections.\n\n" );
@@ -236,6 +237,9 @@ static void cmd_help_long_parsed(void *parsed_result,"show port (port_id) tx_metadata\n" " Show Tx metadata value set" " for a specific port\n\n" + +"show device info (<identifier>|all)" +" Show general information about devices probed.\n\n" ); }
@@ -1240,6 +1244,17 @@ static void cmd_help_long_parsed(void *parsed_result, ); } +if (show_all || !strcmp (res->section,"devices" )) { +cmdline_printf ( + cl, +"\n" +"Device Operations:\n" +"--------------\n" +"device detach (identifier)\n" +" Detach device by identifier.\n\n" + ); + } + } cmdline_parse_token_string_t cmd_help_long_help =
@@ -1248,13 +1263,13 @@ cmdline_parse_token_string_t cmd_help_long_help =cmdline_parse_token_string_t cmd_help_long_section = TOKEN_STRING_INITIALIZER(struct cmd_help_long_result, section,"all#control#display#config#" -"ports#registers#filters#traffic_management" ); +"ports#registers#filters#traffic_management#devices" );cmdline_parse_inst_t cmd_help_long = { .f = cmd_help_long_parsed, .data =NULL , .help_str ="help all|control|display|config|ports|register|" -"filters|traffic_management: " +"filters|traffic_management|devices: " "Show help" , .tokens = { (void *)&cmd_help_long_help,
@@ -1493,6 +1508,47 @@ cmdline_parse_inst_t cmd_operate_detach_port = { }, }; +/* *** detach device by identifier *** */ +struct cmd_operate_detach_device_result { +cmdline_fixed_string_t device; +cmdline_fixed_string_t keyword; +cmdline_fixed_string_t identifier; +}; + +static void cmd_operate_detach_device_parsed (void *parsed_result, + __attribute__((unused))struct cmdline *cl, + __attribute__((unused))void *data) +{ +struct cmd_operate_detach_device_result *res = parsed_result; + +if (!strcmp (res->keyword,"detach" )) +detach_device (res->identifier); +else +printf ("Unknown parameter\n" ); +} + +cmdline_parse_token_string_t cmd_operate_detach_device_device = + TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_device_result, + device,"device" ); +cmdline_parse_token_string_t cmd_operate_detach_device_keyword = + TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_device_result, + keyword,"detach" ); +cmdline_parse_token_string_t cmd_operate_detach_device_identifier = + TOKEN_STRING_INITIALIZER(struct cmd_operate_detach_device_result, + identifier,NULL ); + +cmdline_parse_inst_t cmd_operate_detach_device = { + .f = cmd_operate_detach_device_parsed, + .data =NULL , + .help_str ="device detach <identifier>:" +"(identifier: pci address or virtual dev name)" , + .tokens = { + (void *)&cmd_operate_detach_device_device, + (void *)&cmd_operate_detach_device_keyword, + (void *)&cmd_operate_detach_device_identifier, +NULL , + }, +};/* *** configure speed for all ports *** */ struct cmd_config_speed_all {cmdline_fixed_string_t port;
@@ -7456,6 +7512,51 @@ cmdline_parse_inst_t cmd_showport = { }, }; +/* *** SHOW DEVICE INFO *** */ +struct cmd_showdevice_result { +cmdline_fixed_string_t show; +cmdline_fixed_string_t device; +cmdline_fixed_string_t what; +cmdline_fixed_string_t identifier; +}; + +static void cmd_showdevice_parsed (void *parsed_result, + __attribute__((unused))struct cmdline *cl, + __attribute__((unused))void *data) +{ +struct cmd_showdevice_result *res = parsed_result; +if (!strcmp (res->what,"info" )) { +if (!strcmp (res->identifier,"all" )) +device_infos_display (NULL ); +else +device_infos_display (res->identifier); + } +} + +cmdline_parse_token_string_t cmd_showdevice_show = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, show, +"show" ); +cmdline_parse_token_string_t cmd_showdevice_device = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, device, "device"); +cmdline_parse_token_string_t cmd_showdevice_what = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, what, +"info" ); +cmdline_parse_token_string_t cmd_showdevice_identifier = + TOKEN_STRING_INITIALIZER(struct cmd_showdevice_result, + identifier,NULL ); + +cmdline_parse_inst_t cmd_showdevice = { + .f = cmd_showdevice_parsed, + .data =NULL , + .help_str ="show device info <identifier>|all" , + .tokens = { + (void *)&cmd_showdevice_show, + (void *)&cmd_showdevice_device, + (void *)&cmd_showdevice_what, + (void *)&cmd_showdevice_identifier, +NULL , + }, +};/* *** SHOW QUEUE INFO *** */ struct cmd_showqueue_result {cmdline_fixed_string_t show;
@@ -18723,6 +18824,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_showport, (cmdline_parse_inst_t *)&cmd_showqueue, (cmdline_parse_inst_t *)&cmd_showportall, + (cmdline_parse_inst_t *)&cmd_showdevice, (cmdline_parse_inst_t *)&cmd_showcfg, (cmdline_parse_inst_t *)&cmd_showfwdall, (cmdline_parse_inst_t *)&cmd_start,
@@ -18811,6 +18913,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_operate_specific_port, (cmdline_parse_inst_t *)&cmd_operate_attach_port, (cmdline_parse_inst_t *)&cmd_operate_detach_port, + (cmdline_parse_inst_t *)&cmd_operate_detach_device, (cmdline_parse_inst_t *)&cmd_set_port_setup_on, (cmdline_parse_inst_t *)&cmd_config_speed_all, (cmdline_parse_inst_t *)&cmd_config_speed_specific,
app/test-pmd/config.c +73 -0
79 lines not on this page · raw message
app/test-pmd/testpmd.c +45 -0
51 lines not on this page · raw message
app/test-pmd/testpmd.h +2 -0
@@ -689,6 +689,7 @@ void nic_stats_clear(portid_t port_id);void nic_xstats_display (portid_t port_id);void nic_xstats_clear (portid_t port_id);void nic_stats_mapping_display (portid_t port_id); +void device_infos_display (const char *identifier);void port_infos_display (portid_t port_id);void port_summary_display (portid_t port_id);void port_summary_header_display (void );
@@ -788,6 +789,7 @@ void stop_port(portid_t pid);void close_port (portid_t pid);void reset_port (portid_t pid);void attach_port (char *identifier); +void detach_device (char *identifier);void detach_port_device (portid_t port_id);int all_ports_stopped (void );int port_is_stopped (portid_t port_id);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +64 -0
76 lines not on this page · raw message
Signature · 1 line
2.8.4
Re: [dpdk-dev] [PATCH v3] app/testpmd: add device related cmds
Quoted 6 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.
Quoted 7 lines
So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
In "show device info all" output [1] there are 'dpaa' & 'fslmc' logs [2], do you know why we are getting them, can we get rid of them?
[1]
"
********************* Infos for device net_null0 ********************* Bus name: vdev
Driver name: net_null
Devargs:
Connect to socket: 0
Port id: 1
MAC address: 8A:D0:A1:F3:B5:0C
Device name: net_null0
dpaa: Invalid device string ()
fslmc: Invalid device string ()
"
[2]
"
dpaa: Invalid device string ()
fslmc: Invalid device string ()
"
Re: [dpdk-dev] [EXT] Re: [PATCH v3] app/testpmd: add device related cmds
Hi Ferruh,
Quoted 14 lines · Ferruh Yigit
External Email
----------------------------------------------------------------------
Quoted 10 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Quoted 6 lines
Quoted 3 lines
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
In "show device info all" output [1] there are 'dpaa' & 'fslmc' logs [2], do you know why we are getting them, can we get rid of them?
Is this issue sill there ? I'm not able to see it in my setup.
Quoted 25 lines
[1]
"
********************* Infos for devicenet_null0********************* Bus name: vdev
Driver name:net_null
Devargs:
Connect to socket: 0Port id: 1
MAC address: 8A:D0:A1:F3:B5:0C
Device name:net_null0
dpaa: Invalid device string ()fslmc: Invalid device string ()
"[2]
"
dpaa: Invalid device string ()fslmc: Invalid device string ()
"
Re: [dpdk-dev] [EXT] Re: [PATCH v3] app/testpmd: add device related cmds
Quoted 17 lines · Nithin Kumar Dabilpuram
Hi Ferruh,
Quoted 14 lines · Ferruh Yigit
External Email
----------------------------------------------------------------------
Quoted 10 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
In "show device info all" output [1] there are 'dpaa' & 'fslmc' logs [2], do you know why we are getting them, can we get rid of them?
Is this issue sill there ? I'm not able to see it in my setup.
Yes, still there. I can see them with latest next-net.
Quoted 26 lines
Quoted 26 lines
[1]
"
********************* Infos for devicenet_null0********************* Bus name: vdev
Driver name:net_null
Devargs:
Connect to socket: 0Port id: 1
MAC address: 8A:D0:A1:F3:B5:0C
Device name:net_null0
dpaa: Invalid device string ()fslmc: Invalid device string ()
"[2]
"
dpaa: Invalid device string ()fslmc: Invalid device string ()
"
Re: [dpdk-dev] [EXT] Re: [PATCH v3] app/testpmd: add device related cmds
HI,
Quoted 21 lines · Nithin Kumar Dabilpuram
Quoted 20 lines
Hi Ferruh,
Quoted 17 lines · Ferruh Yigit
External Email
---------------------------------------------------------------------
Quoted 13 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
In "show device info all" output [1] there are 'dpaa' & 'fslmc' logs [2], do you know why we are getting them, can we get rid of them?
Is this issue sill there ? I'm not able to see it in my setup.
Yes, still there. I can see them with latest next-net.
[Hemant] Patch is on the way.
Re: [dpdk-dev] [EXT] Re: [PATCH v3] app/testpmd: add device related cmds
Quoted 22 lines · Hemant Agrawal
HI,
Quoted 21 lines · Nithin Kumar Dabilpuram
Quoted 20 lines
Hi Ferruh,
Quoted 17 lines · Ferruh Yigit
External Email
---------------------------------------------------------------------
Quoted 13 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
In "show device info all" output [1] there are 'dpaa' & 'fslmc' logs [2], do you know why we are getting them, can we get rid of them?
Is this issue sill there ? I'm not able to see it in my setup.
Yes, still there. I can see them with latest next-net.
[Hemant] Patch is on the way.
Thanks.
Re: [dpdk-dev] [EXT] Re: [PATCH v3] app/testpmd: add device related cmds
Quoted 24 lines · Nithin Kumar Dabilpuram
Quoted 22 lines · Hemant Agrawal
HI,
Quoted 21 lines · Nithin Kumar Dabilpuram
Quoted 20 lines
Hi Ferruh,
Quoted 17 lines · Ferruh Yigit
External Email
---------------------------------------------------------------------
Quoted 13 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
Quoted 9 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
In "show device info all" output [1] there are 'dpaa' & 'fslmc' logs [2], do you know why we are getting them, can we get rid of them?
Is this issue sill there ? I'm not able to see it in my setup.
Yes, still there. I can see them with latest next-net.
[Hemant] Patch is on the way.
Thanks.
Hi Hemant, I confirm logs are gone (unless debug level enabled), thanks.
Re: [dpdk-dev] [PATCH v3] app/testpmd: add device related cmds
In reply to Nithin DabilpuramQuoted 10 lines · Nithin Dabilpuram
With the latest published interface of rte_eal_hotplug_[add,remove](), and
rte_eth_dev_close(),rte_eth_dev_close()would cleanup all the data structures of port's eth dev leaving the device common resource intact ifRTE_ETH_DEV_CLOSE_REMOVEis set in dev flags.So a new command "detach device" (~hotplug remove) to work, with device identifier like "port attach" is added to be able to detach closed devices.
Quoted 5 lines
Also to display currently probed devices, another command "show device info <identifier>|all" is also added as a part of this change.
Signed-off-by Nithin Dabilpuram <[email protected]>
Applied to dpdk-next-net/master, thanks.