net/af_packet: initialize link interrupt callback queue
PATCH 1/1 net/af_packet: initialize link interrupt callback queue
This patch initializes the eth_dev->link_intr_cbs queue which is used when af_packet is passed into rte_eth_ev_callback_register().
--- drivers/net/af_packet/rte_eth_af_packet.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/af_packet/rte_eth_af_packet.c +1 -0
@@ -708,6 +708,7 @@ rte_pmd_init_internals(const char *name, (*eth_dev)->data->drv_name = pmd_af_packet_drv.driver.name; (*eth_dev)->data->kdrv =RTE_KDRV_NONE ; (*eth_dev)->data->numa_node = numa_node; +TAILQ_INIT (&((*eth_dev)->link_intr_cbs));return 0 ;
Signature · 1 line
2.7.4
Quoted 15 lines · On Sat, 17 Dec 2016 13:03:55 -0500 Chas Williams <[email protected]> wrote:
This patch initializes the
eth_dev->link_intr_cbsqueue which is used whenaf_packetis passed intorte_eth_ev_callback_register().Fixes 4dc294158cac ("ethdev: support optional Rx and Tx callbacks")Signed-off-by Chas Williams <[email protected]>--- drivers/net/af_packet/rte_eth_af_packet.c | 1 + 1 file changed, 1 insertion(+)drivers/net/af_packet/rte_eth_af_packet.c +0
-0
drivers/net/af_packet/rte_eth_af_packet.c rte_pmd_init_internals(const char *name, · line 711
Quoted 4 lines
drivers/net/af_packet/rte_eth_af_packet.c +1
-0@@ -708,6 +708,7 @@ rte_pmd_init_internals(const char *name, (*eth_dev)->data->drv_name = pmd_af_packet_drv.driver.name; (*eth_dev)->data->kdrv =RTE_KDRV_NONE ; (*eth_dev)->data->numa_node = numa_node; +TAILQ_INIT (&((*eth_dev)->link_intr_cbs));
This code really needs to have a local variable for eth_dev and not deref a pointer in every statement.
Quoted 2 lines · Chas Williams
This patch initializes the
eth_dev->link_intr_cbsqueue which is used whenaf_packetis passed intorte_eth_ev_callback_register().
Why do you want to register callback to af_packet PMD, it won't be calling them?
Quoted 4 lines
Fixes 4dc294158cac ("ethdev: support optional Rx and Tx callbacks")Signed-off-by Chas Williams <[email protected]>
Please cc the maintainers...
Quoted 17 lines
--- drivers/net/af_packet/rte_eth_af_packet.c | 1 + 1 file changed, 1 insertion(+)drivers/net/af_packet/rte_eth_af_packet.c +1
-0@@ -708,6 +708,7 @@ rte_pmd_init_internals(const char *name, (*eth_dev)->data->drv_name = pmd_af_packet_drv.driver.name; (*eth_dev)->data->kdrv =RTE_KDRV_NONE ; (*eth_dev)->data->numa_node = numa_node; +TAILQ_INIT (&((*eth_dev)->link_intr_cbs));return 0 ;
Quoted 6 lines · Ferruh Yigit
Quoted 2 lines · Chas Williams
This patch initializes the
eth_dev->link_intr_cbsqueue which is used whenaf_packetis passed intorte_eth_ev_callback_register().Why do you want to register callback to
af_packetPMD, it won't be calling them?
Because I have a some other code that basically treats all the PMD's the same way. Do I really need to write an exception for that code that says "if this is driver such and such don't call this API routine?"
Quoted 6 lines
Quoted 4 lines
Fixes 4dc294158cac ("ethdev: support optional Rx and Tx callbacks")Signed-off-by Chas Williams <[email protected]>Please cc the maintainers...
OK
Quoted 22 lines
CC John W. Linville <[email protected]>Quoted 17 lines
--- drivers/net/af_packet/rte_eth_af_packet.c | 1 + 1 file changed, 1 insertion(+)drivers/net/af_packet/rte_eth_af_packet.c +1
-0@@ -708,6 +708,7 @@ rte_pmd_init_internals(const char *name, (*eth_dev)->data->drv_name = pmd_af_packet_drv.driver.name; (*eth_dev)->data->kdrv =RTE_KDRV_NONE ; (*eth_dev)->data->numa_node = numa_node; +TAILQ_INIT (&((*eth_dev)->link_intr_cbs));return 0 ;
Quoted 11 lines · Chas Williams
Quoted 6 lines · Ferruh Yigit
Quoted 2 lines · Chas Williams
This patch initializes the
eth_dev->link_intr_cbsqueue which is used whenaf_packetis passed intorte_eth_ev_callback_register().Why do you want to register callback to
af_packetPMD, it won't be calling them?Because I have a some other code that basically treats all the PMD's the same way. Do I really need to write an exception for that code that says "if this is driver such and such don't call this API routine?"
No, you shouldn't.
Thanks for the clarification.
Quoted 32 lines
Quoted 7 lines
Quoted 5 lines
Fixes 4dc294158cac ("ethdev: support optional Rx and Tx callbacks")Signed-off-by Chas Williams <[email protected]>Please cc the maintainers...
OK
Quoted 22 lines
CC John W. Linville <[email protected]>Quoted 17 lines
--- drivers/net/af_packet/rte_eth_af_packet.c | 1 + 1 file changed, 1 insertion(+)drivers/net/af_packet/rte_eth_af_packet.c +1
-0@@ -708,6 +708,7 @@ rte_pmd_init_internals(const char *name, (*eth_dev)->data->drv_name = pmd_af_packet_drv.driver.name; (*eth_dev)->data->kdrv =RTE_KDRV_NONE ; (*eth_dev)->data->numa_node = numa_node; +TAILQ_INIT (&((*eth_dev)->link_intr_cbs));return 0 ;
Quoted 6 lines · Chas Williams
This patch initializes the
eth_dev->link_intr_cbsqueue which is used whenaf_packetis passed intorte_eth_ev_callback_register().Fixes 4dc294158cac ("ethdev: support optional Rx and Tx callbacks")Signed-off-by Chas Williams <[email protected]>
Quoted 10 lines · Ferruh Yigit
Quoted 6 lines · Chas Williams
This patch initializes the
eth_dev->link_intr_cbsqueue which is used whenaf_packetis passed intorte_eth_ev_callback_register().Fixes 4dc294158cac ("ethdev: support optional Rx and Tx callbacks")Signed-off-by Chas Williams <[email protected]>Acked-by Ferruh Yigit <[email protected]>
The commit that just applied solves the issue that this patch targets:
http://dpdk.org/browse/dpdk/commit/?id=75aca7997e57b017
I am updating this patch as rejected.
Thanks,
ferruh