ixgbe 82599: Query assignment of queues to Virtual Function
PATCH 1/1 ixgbe 82599: Query assignment of queues to Virtual Function
Physical Function assignes Tx/Rx queues to each VF according to different schemes[1]. By querying through mailbox, VF is able to get number of Tx/Rx queues assigned to it.
Note that current Intel ixgbe driver ixgbe-3.18.7 does not fully support mailbox message IXGBE_VF_GET_QUEUES. The service routine for IXGBE_VF_GET_QUEUES must be fixed, otherwise PF always return 1 as Tx/Rx queue number.
[1] See section 7.2.1.2.1, 7.1.2.2 and 7.10.2.7.2 of Intel 82599 10 Gbe Controller Datasheet.
--- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
lib/librte_pmd_ixgbe/ixgbe_ethdev.c +19 -0
@@ -750,6 +750,22 @@ eth_ixgbe_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,return 0 ; } +static void ixgbevf_get_queue_num (struct ixgbe_hw *hw) +{ +/* Traffic classes are not supported by now */ +unsigned int tcs, tc; + +/* +* Must let PF know we are at mailbox API 11 level. +* Otherwise PF won't answer properly. +* In case that PF fails to provide Rx/Tx queue number, +* max_tx_queues and max_rx_queues remain to be 1. +*/ +if (!ixgbevf_negotiate_api_version (hw, ixgbe_mbox_api_11)) +ixgbevf_get_queues (hw, &tcs, &tc); +} + +/* * Virtual Function device init */
@@ -818,6 +834,9 @@ eth_ixgbevf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv,return (diag); } +/* Get Rx/Tx queue count via mailbox, which is ready after reset_hw */ +ixgbevf_get_queue_num (hw); +/* Allocate memory for storing MAC addresses */ eth_dev->data->mac_addrs =rte_zmalloc ("ixgbevf" ,ETHER_ADDR_LEN * hw->mac.num_rar_entries,0 );
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1382364674-27098-1-git-send-email-jigsaw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH] ixgbe: query assignment of queues to VF
21/10/2013 16:11, Qinglai Xiao :
Quoted 9 lines
Physical Function assignes Tx/Rx queues to each VF according to different schemes[1]. By querying through mailbox, VF is able to get number of Tx/Rx queues assigned to it.
Note that current Intel ixgbe driver ixgbe-3.18.7 does not fully support mailbox message
IXGBE_VF_GET_QUEUES. The service routine forIXGBE_VF_GET_QUEUESmust be fixed, otherwise PF always return 1 as Tx/Rx queue number.
Quoted 4 lines
[1] See section 7.2.1.2.1, 7.1.2.2 and 7.10.2.7.2 of Intel 82599 10 Gbe Controller Datasheet.
Signed-off-by Qinglai Xiao <[email protected]>
Acked and applied with light modifications:
- * Must let PF know we are at mailbox API 11 level.
+ * Must let PF know we are at mailbox API version 1.1.
lib/librte_pmd_ixgbe/ixgbe_ethdev.c eth_ixgbe_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, · line 770
Quoted 5 lines
lib/librte_pmd_ixgbe/ixgbe_ethdev.c +3
-0+} + +/* * Virtual Function device init
Only 1 empty line is sufficient here.
Thanks for your patch.
Please, keep us informed about the needed PF patch.
Signature · 1 line
Thomas
A message that is not in the archive (sent off-list or not yet received): 201310231119.04536.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
Re: [PATCH] ixgbe: query assignment of queues to VF
Hi Thomas,
Quoted 1 line
Quoted 1 line
Please, keep us informed about the needed PF patch.
First of all, where and how should I post the patch to PF driver? And secondly I have only 82599, so I cannot run test for 82598 and X540. Is it possible that you could test on different NIC?
thx &
rgds,
-ql
Quoted 32 lines · Thomas Monjalon
21/10/2013 16:11, Qinglai Xiao :
Quoted 9 lines
Physical Function assignes Tx/Rx queues to each VF according to different schemes[1]. By querying through mailbox, VF is able to get number of Tx/Rx queues assigned to it.
Note that current Intel ixgbe driver ixgbe-3.18.7 does not fully support mailbox message
IXGBE_VF_GET_QUEUES. The service routine forIXGBE_VF_GET_QUEUESmust be fixed, otherwise PF always return 1 as Tx/Rx queue number.Quoted 4 lines
[1] See section 7.2.1.2.1, 7.1.2.2 and 7.10.2.7.2 of Intel 82599 10 Gbe Controller Datasheet.
Signed-off-by Qinglai Xiao <[email protected]>Acked and applied with light modifications:
(quoted diff) +1
-1- * Must let PF know we are at mailbox API 11 level. + * Must let PF know we are at mailbox API version 1.1.lib/librte_pmd_ixgbe/ixgbe_ethdev.c eth_ixgbe_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, · line 770
Quoted 6 lines
lib/librte_pmd_ixgbe/ixgbe_ethdev.c +3
-0+} + +/* * Virtual Function device init Only 1 empty line is sufficient here.
Thanks for your patch.
Please, keep us informed about the needed PF patch. --
Thomas
A message that is not in the archive (sent off-list or not yet received): CAHVfvh5DmT7jdUuze9L4Dqg6bBtRkE0aKKw_frXwnkGKT03jkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH] ixgbe: query assignment of queues to VF
23/10/2013 14:26, jigsaw :
Quoted 1 line
First of all, where and how should I post the patch to PF driver?
You should send your patch to kernel.org via the netdev mailing list:
http://vger.kernel.org/vger-lists.html#netdev
Quoted 2 lines
And secondly I have only 82599, so I cannot run test for 82598 and X540. Is it possible that you could test on different NIC?
I don't know if I'll have access to 82598 and X540 in the next weeks. Is there anybody else who would like to help with tests ?
Signature · 1 line
Thomas
A message that is not in the archive (sent off-list or not yet received): 201310241048.26413.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
Re: [PATCH] ixgbe: query assignment of queues to VF
Hi Thomas,
Thanks for your answer. I'll try to send the patch to netdev list and let you know the result.
BTW, I double checked 82598 and find that it doesn't have mailbox at all, meaning this patch is for 82599 and X540 only.
So the test is only needed for X540.
thx &
rgds,
-ql
Quoted 14 lines · Thomas Monjalon
23/10/2013 14:26, jigsaw :
Quoted 1 line
First of all, where and how should I post the patch to PF driver?
You should send your patch to kernel.org via the netdev mailing list:
http://vger.kernel.org/vger-lists.html#netdevQuoted 2 lines
And secondly I have only 82599, so I cannot run test for 82598 and X540. Is it possible that you could test on different NIC?
I don't know if I'll have access to 82598 and X540 in the next weeks. Is there anybody else who would like to help with tests ?
--
Thomas