[dpdk-dev] [PATCH v3 2/6] net/tap: add speed capabilities

Ferruh Yigit ferruh.yigit at intel.com
Thu Mar 9 17:05:47 CET 2017


On 3/9/2017 2:36 PM, Wiles, Keith wrote:
> 
>> On Mar 9, 2017, at 8:18 AM, Yigit, Ferruh <ferruh.yigit at intel.com> wrote:
>>
>> On 3/7/2017 4:31 PM, Pascal Mazon wrote:
>>> Tap PMD is flexible, it supports any speed.
>>>
>>> Signed-off-by: Pascal Mazon <pascal.mazon at 6wind.com>
>>> ---
>>> doc/guides/nics/features/tap.ini |  1 +
>>> drivers/net/tap/rte_eth_tap.c    | 35 +++++++++++++++++++++++++++++++++++
>>> 2 files changed, 36 insertions(+)
>>>
>>> diff --git a/doc/guides/nics/features/tap.ini b/doc/guides/nics/features/tap.ini
>>> index d9b47a003654..dad5a0561087 100644
>>> --- a/doc/guides/nics/features/tap.ini
>>> +++ b/doc/guides/nics/features/tap.ini
>>> @@ -9,6 +9,7 @@ Jumbo frame          = Y
>>> Promiscuous mode     = Y
>>> Allmulticast mode    = Y
>>> Basic stats          = Y
>>> +Speed capabilities   = Y
>>> Unicast MAC filter   = Y
>>> Other kdrv           = Y
>>> ARMv7                = Y
>>> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
>>> index 1e46ee36efa2..ef525a3f0826 100644
>>> --- a/drivers/net/tap/rte_eth_tap.c
>>> +++ b/drivers/net/tap/rte_eth_tap.c
>>> @@ -351,6 +351,40 @@ tap_dev_configure(struct rte_eth_dev *dev __rte_unused)
>>> 	return 0;
>>> }
>>>
>>> +static uint32_t
>>> +tap_dev_speed_capa(void)
>>> +{
>>> +	uint32_t speed = pmd_link.link_speed;
>>
>> link_speed is already hardcoded into PMD, so there is nothing to detect
>> here. Would it be different if PMD directly return pmd_link.link_speed?
> 
> The link speed is passed into the PMD via the command line, which means it can change per run.

Right, I missed that.


More information about the dev mailing list