[ovs-dev] PATCH [1/1] High speed PMD physical NIC queue size, resubmit

Pravin Shelar pshelar at nicira.com
Fri Jun 27 16:58:55 UTC 2014


On Thu, Jun 26, 2014 at 3:01 PM, Polehn, Mike A <mike.a.polehn at intel.com> wrote:
> If someone wants to change the queue size, maybe bigger, this provides a formula to allow this.
> There are advantages and also some disadvantages on using a larger queue.
> Doubling the size does not work since 4096 is invalid and will fail compilation. Unless they
> researched this carefully, they may think that 2048 is the largest size possible.
> This is to give a hint of what values the defined value can be set to.
>
I updated comment and pushed to master.

Thanks,
Pravin.


> Mike Polehn
>
> -----Original Message-----
> From: Pravin Shelar [mailto:pshelar at nicira.com]
> Sent: Thursday, June 26, 2014 2:18 PM
> To: Polehn, Mike A
> Cc: dev at openvswitch.org
> Subject: Re: [ovs-dev] PATCH [1/1] High speed PMD physical NIC queue size, resubmit
>
> On Thu, Jun 26, 2014 at 7:08 AM, Polehn, Mike A <mike.a.polehn at intel.com> wrote:
>> (n*32<4096) is the formula for calculating the buffer size. The
>> maximum size is not
>> 4096 but 4096 - 32 =  4064. I ran into this issue on a different
>> project where I needed to use the largest buffers size available.
>> Often 2**n is used for queue sizing, but is not the case for the PMD driver.
>>
>
> I still not sure how is related to the patch where you set queue size of 2048.
>
>
>> Mike Polehn
>>
>> -----Original Message-----
>> From: Pravin Shelar [mailto:pshelar at nicira.com]
>> Sent: Wednesday, June 25, 2014 4:19 PM
>> To: Polehn, Mike A
>> Cc: dev at openvswitch.org
>> Subject: Re: [ovs-dev] PATCH [1/1] High speed PMD physical NIC queue
>> size, resubmit
>>
>> On Thu, Jun 19, 2014 at 3:58 PM, Polehn, Mike A <mike.a.polehn at intel.com> wrote:
>>> Large TX and RX queues are needed for high speed 10 GbE physical NICS.
>>> Observed a 250% zero loss improvement over small NIC queue test for A
>>> port to port flow test.
>>>
>>> Signed-off-by: Mike A. Polehn <mike.a.polehn at intel.com>
>> I am fine with the
>>>
>>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index
>>> fbdb6b3..d1bcc73 100644
>>> --- a/lib/netdev-dpdk.c
>>> +++ b/lib/netdev-dpdk.c
>>> @@ -70,6 +70,9 @@ static struct vlog_rate_limit rl =
>>> VLOG_RATE_LIMIT_INIT(5, 20);
>>>
>>>  #define NON_PMD_THREAD_TX_QUEUE 0
>>>
>>> +#define NIC_PORT_RX_Q_SIZE 2048  /* Size of Physical NIC RX Queue
>>> +(n*32<4096)*/
>>
>> I am not sure what does "(n*32<4096)" means. Can you elaborate it bit?
>>
>>> +#define NIC_PORT_TX_Q_SIZE 2048  /* Size of Physical NIC TX Queue
>>> +(n*32<4096)*/
>>> +
>>>  /* TODO: Needs per NIC value for these constants. */  #define
>>> RX_PTHRESH 32 /* Default values of RX prefetch threshold reg. */
>>> #define RX_HTHRESH 32 /* Default values of RX host threshold reg. */
>>> @@ -369,7 +372,7 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) OVS_REQUIRES(dpdk_mutex)
>>>      }
>>>
>>>      for (i = 0; i < NR_QUEUE; i++) {
>>> -        diag = rte_eth_tx_queue_setup(dev->port_id, i, MAX_TX_QUEUE_LEN,
>>> +        diag = rte_eth_tx_queue_setup(dev->port_id, i,
>>> + NIC_PORT_TX_Q_SIZE,
>>>                                        dev->socket_id, &tx_conf);
>>>          if (diag) {
>>>              VLOG_ERR("eth dev tx queue setup error %d",diag); @@
>>> -378,7 +381,7 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) OVS_REQUIRES(dpdk_mutex)
>>>      }
>>>
>>>      for (i = 0; i < NR_QUEUE; i++) {
>>> -        diag = rte_eth_rx_queue_setup(dev->port_id, i, MAX_RX_QUEUE_LEN,
>>> +        diag = rte_eth_rx_queue_setup(dev->port_id, i,
>>> + NIC_PORT_RX_Q_SIZE,
>>>                                        dev->socket_id,
>>>                                        &rx_conf, dev->dpdk_mp->mp);
>>>          if (diag) {
>>>
>>>
>>> _______________________________________________
>>> dev mailing list
>>> dev at openvswitch.org
>>> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list