DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] KNI interfaces at bonding ports
@ 2017-06-22  9:06 Alex Kiselev
  2017-06-22 16:08 ` Cody Doucette
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Kiselev @ 2017-06-22  9:06 UTC (permalink / raw)
  To: users

Hello.

Is it possible to create a KNI interface at a bonding port?

My code that works perfectly fine with usual dpdk ports fails
when I try to use it with bonding ports.

  rte_eth_dev_info_get(port_id, &dev_info);
  conf.addr = dev_info.pci_dev->addr;
  ...
  return rte_kni_alloc(pktmbuf_pool, &conf, &ops);


The code fails because pci_dev member of variable dev_info is NULL.
Is there any workarounds for this problem?

Thanks.

--
Alexander Kiselev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] KNI interfaces at bonding ports
  2017-06-22  9:06 [dpdk-users] KNI interfaces at bonding ports Alex Kiselev
@ 2017-06-22 16:08 ` Cody Doucette
  2017-06-22 20:25   ` Alex Kiselev
  0 siblings, 1 reply; 3+ messages in thread
From: Cody Doucette @ 2017-06-22 16:08 UTC (permalink / raw)
  To: Alex Kiselev; +Cc: users

Hi Alex,

I previously ran into the same issue. I just used the PCI device
information from the primary slave of the bonded interface:

https://github.com/AltraMayor/gatekeeper/blob/master/cps/main.c#L545

Hope that helps,
Cody

On Thu, Jun 22, 2017 at 5:06 AM, Alex Kiselev <kiselev99@gmail.com> wrote:

> Hello.
>
> Is it possible to create a KNI interface at a bonding port?
>
> My code that works perfectly fine with usual dpdk ports fails
> when I try to use it with bonding ports.
>
>   rte_eth_dev_info_get(port_id, &dev_info);
>   conf.addr = dev_info.pci_dev->addr;
>   ...
>   return rte_kni_alloc(pktmbuf_pool, &conf, &ops);
>
>
> The code fails because pci_dev member of variable dev_info is NULL.
> Is there any workarounds for this problem?
>
> Thanks.
>
> --
> Alexander Kiselev
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] KNI interfaces at bonding ports
  2017-06-22 16:08 ` Cody Doucette
@ 2017-06-22 20:25   ` Alex Kiselev
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Kiselev @ 2017-06-22 20:25 UTC (permalink / raw)
  To: Cody Doucette, users

Hi, Cody. Thank you. It helped.
rte_eth_bond_primary_get() function is exactly what I needed.


2017-06-22 19:08 GMT+03:00 Cody Doucette <doucette@bu.edu>:
> Hi Alex,
>
> I previously ran into the same issue. I just used the PCI device information
> from the primary slave of the bonded interface:
>
> https://github.com/AltraMayor/gatekeeper/blob/master/cps/main.c#L545
>
> Hope that helps,
> Cody
>
> On Thu, Jun 22, 2017 at 5:06 AM, Alex Kiselev <kiselev99@gmail.com> wrote:
>>
>> Hello.
>>
>> Is it possible to create a KNI interface at a bonding port?
>>
>> My code that works perfectly fine with usual dpdk ports fails
>> when I try to use it with bonding ports.
>>
>>   rte_eth_dev_info_get(port_id, &dev_info);
>>   conf.addr = dev_info.pci_dev->addr;
>>   ...
>>   return rte_kni_alloc(pktmbuf_pool, &conf, &ops);
>>
>>
>> The code fails because pci_dev member of variable dev_info is NULL.
>> Is there any workarounds for this problem?
>>
>> Thanks.
>>
>> --
>> Alexander Kiselev
>
>



-- 
--
Kiselev Alexander

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-22 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-22  9:06 [dpdk-users] KNI interfaces at bonding ports Alex Kiselev
2017-06-22 16:08 ` Cody Doucette
2017-06-22 20:25   ` Alex Kiselev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).