DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] How to prevent KNI interface from getting deleted on application termination?
@ 2015-07-08 20:00 Gopakumar Choorakkot Edakkunni
  2015-07-09  6:36 ` Gopakumar Choorakkot Edakkunni
  0 siblings, 1 reply; 6+ messages in thread
From: Gopakumar Choorakkot Edakkunni @ 2015-07-08 20:00 UTC (permalink / raw)
  To: dev

Hi all,

My application takes over one/multiple ethernet port(s) in a linux
system and creates KNI interfaces corresponding to them. So if there
was eth0 and eth1 in the non-dpdk mode, once I take over the ports
using dpdk, I create eth0 and eth1 KNI interfaces. As far as the linux
network managers are concerned, they dont really know about it (or
care I guess) - for example the dhcp client tries getting a dhcp
address over these KNI interfaces and succeeds.

Now if my application crashes, I dont want the entire network
management subsystem on linux and the hotplugs and this and that to
get alarmed and routes to vanish from the route table etc.. etc.. The
application will crash and come back up real quick, nothing needs to
change in that meantime.

Any way to achieve that ? I just want to keep the KNI around even if
my app vanishes.

Rgds,
Gopa.

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

* Re: [dpdk-dev] How to prevent KNI interface from getting deleted on application termination?
  2015-07-08 20:00 [dpdk-dev] How to prevent KNI interface from getting deleted on application termination? Gopakumar Choorakkot Edakkunni
@ 2015-07-09  6:36 ` Gopakumar Choorakkot Edakkunni
  2015-07-09  7:47   ` Marc Sune
  2015-07-09 16:46   ` Stephen Hemminger
  0 siblings, 2 replies; 6+ messages in thread
From: Gopakumar Choorakkot Edakkunni @ 2015-07-09  6:36 UTC (permalink / raw)
  To: dev

Reading through the KNI module source, doesnt look like there is a way
to do this. For my requirement, I will make some patch tomorrow to
have a module option to just keep the KNI data structures around even
if /dev/kni is closed, looks straightforward to do from the code

Rgds,
Gopa.

On Wed, Jul 8, 2015 at 1:00 PM, Gopakumar Choorakkot Edakkunni
<gopakumar.c.e@gmail.com> wrote:
> Hi all,
>
> My application takes over one/multiple ethernet port(s) in a linux
> system and creates KNI interfaces corresponding to them. So if there
> was eth0 and eth1 in the non-dpdk mode, once I take over the ports
> using dpdk, I create eth0 and eth1 KNI interfaces. As far as the linux
> network managers are concerned, they dont really know about it (or
> care I guess) - for example the dhcp client tries getting a dhcp
> address over these KNI interfaces and succeeds.
>
> Now if my application crashes, I dont want the entire network
> management subsystem on linux and the hotplugs and this and that to
> get alarmed and routes to vanish from the route table etc.. etc.. The
> application will crash and come back up real quick, nothing needs to
> change in that meantime.
>
> Any way to achieve that ? I just want to keep the KNI around even if
> my app vanishes.
>
> Rgds,
> Gopa.

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

* Re: [dpdk-dev] How to prevent KNI interface from getting deleted on application termination?
  2015-07-09  6:36 ` Gopakumar Choorakkot Edakkunni
@ 2015-07-09  7:47   ` Marc Sune
  2015-07-09 14:51     ` Gopakumar Choorakkot Edakkunni
  2015-07-09 16:46   ` Stephen Hemminger
  1 sibling, 1 reply; 6+ messages in thread
From: Marc Sune @ 2015-07-09  7:47 UTC (permalink / raw)
  To: dev



On 09/07/15 08:36, Gopakumar Choorakkot Edakkunni wrote:
> Reading through the KNI module source, doesnt look like there is a way
> to do this. For my requirement, I will make some patch tomorrow to
> have a module option to just keep the KNI data structures around even
> if /dev/kni is closed, looks straightforward to do from the code
>
> Rgds,
> Gopa.
>
> On Wed, Jul 8, 2015 at 1:00 PM, Gopakumar Choorakkot Edakkunni
> <gopakumar.c.e@gmail.com> wrote:
>> Hi all,
>>
>> My application takes over one/multiple ethernet port(s) in a linux
>> system and creates KNI interfaces corresponding to them. So if there
>> was eth0 and eth1 in the non-dpdk mode, once I take over the ports
>> using dpdk, I create eth0 and eth1 KNI interfaces. As far as the linux
>> network managers are concerned, they dont really know about it (or
>> care I guess) - for example the dhcp client tries getting a dhcp
>> address over these KNI interfaces and succeeds.
>>
>> Now if my application crashes, I dont want the entire network
>> management subsystem on linux and the hotplugs and this and that to
>> get alarmed and routes to vanish from the route table etc.. etc.. The
>> application will crash and come back up real quick, nothing needs to
>> change in that meantime.

Maybe a stupid question; why not fixing your application so that it 
doesn't crash, instead of adding adhoc patches?

marc

>>
>> Any way to achieve that ? I just want to keep the KNI around even if
>> my app vanishes.
>>
>> Rgds,
>> Gopa.

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

* Re: [dpdk-dev] How to prevent KNI interface from getting deleted on application termination?
  2015-07-09  7:47   ` Marc Sune
@ 2015-07-09 14:51     ` Gopakumar Choorakkot Edakkunni
  0 siblings, 0 replies; 6+ messages in thread
From: Gopakumar Choorakkot Edakkunni @ 2015-07-09 14:51 UTC (permalink / raw)
  To: Marc Sune; +Cc: dev

Crash is just one example I called out, the other example is a hotfix
update to the app which ends up gracefully restarting the app.

Rgds,
Gopa.

On Thu, Jul 9, 2015 at 12:47 AM, Marc Sune <marc.sune@bisdn.de> wrote:
>
>
> On 09/07/15 08:36, Gopakumar Choorakkot Edakkunni wrote:
>>
>> Reading through the KNI module source, doesnt look like there is a way
>> to do this. For my requirement, I will make some patch tomorrow to
>> have a module option to just keep the KNI data structures around even
>> if /dev/kni is closed, looks straightforward to do from the code
>>
>> Rgds,
>> Gopa.
>>
>> On Wed, Jul 8, 2015 at 1:00 PM, Gopakumar Choorakkot Edakkunni
>> <gopakumar.c.e@gmail.com> wrote:
>>>
>>> Hi all,
>>>
>>> My application takes over one/multiple ethernet port(s) in a linux
>>> system and creates KNI interfaces corresponding to them. So if there
>>> was eth0 and eth1 in the non-dpdk mode, once I take over the ports
>>> using dpdk, I create eth0 and eth1 KNI interfaces. As far as the linux
>>> network managers are concerned, they dont really know about it (or
>>> care I guess) - for example the dhcp client tries getting a dhcp
>>> address over these KNI interfaces and succeeds.
>>>
>>> Now if my application crashes, I dont want the entire network
>>> management subsystem on linux and the hotplugs and this and that to
>>> get alarmed and routes to vanish from the route table etc.. etc.. The
>>> application will crash and come back up real quick, nothing needs to
>>> change in that meantime.
>
>
> Maybe a stupid question; why not fixing your application so that it doesn't
> crash, instead of adding adhoc patches?
>
> marc
>
>
>>>
>>> Any way to achieve that ? I just want to keep the KNI around even if
>>> my app vanishes.
>>>
>>> Rgds,
>>> Gopa.
>
>

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

* Re: [dpdk-dev] How to prevent KNI interface from getting deleted on application termination?
  2015-07-09  6:36 ` Gopakumar Choorakkot Edakkunni
  2015-07-09  7:47   ` Marc Sune
@ 2015-07-09 16:46   ` Stephen Hemminger
  2015-07-09 20:47     ` Gopakumar Choorakkot Edakkunni
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2015-07-09 16:46 UTC (permalink / raw)
  To: Gopakumar Choorakkot Edakkunni; +Cc: dev

On Wed, 8 Jul 2015 23:36:52 -0700
Gopakumar Choorakkot Edakkunni <gopakumar.c.e@gmail.com> wrote:

> Reading through the KNI module source, doesnt look like there is a way
> to do this. For my requirement, I will make some patch tomorrow to
> have a module option to just keep the KNI data structures around even
> if /dev/kni is closed, looks straightforward to do from the code


I don't think it is that simple given the shared ring in KNI

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

* Re: [dpdk-dev] How to prevent KNI interface from getting deleted on application termination?
  2015-07-09 16:46   ` Stephen Hemminger
@ 2015-07-09 20:47     ` Gopakumar Choorakkot Edakkunni
  0 siblings, 0 replies; 6+ messages in thread
From: Gopakumar Choorakkot Edakkunni @ 2015-07-09 20:47 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

You are right, I dint think of the rings. I guess if I keep the netdev
intact and release the rings and stuff as it does on a /dev/kni close,
that should be fine ? And when my app comes back up and opens dev/kni,
the rings etc.. can be recreated, and when my app tries to create the
netdevs, it  reattaches it to the existing ones. The way I look at it,
its similar to the tun/tap ioctl option TUNSETPERSIST.

Rgds,
Gopa.

On Thu, Jul 9, 2015 at 9:46 AM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Wed, 8 Jul 2015 23:36:52 -0700
> Gopakumar Choorakkot Edakkunni <gopakumar.c.e@gmail.com> wrote:
>
>> Reading through the KNI module source, doesnt look like there is a way
>> to do this. For my requirement, I will make some patch tomorrow to
>> have a module option to just keep the KNI data structures around even
>> if /dev/kni is closed, looks straightforward to do from the code
>
>
> I don't think it is that simple given the shared ring in KNI

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

end of thread, other threads:[~2015-07-09 20:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 20:00 [dpdk-dev] How to prevent KNI interface from getting deleted on application termination? Gopakumar Choorakkot Edakkunni
2015-07-09  6:36 ` Gopakumar Choorakkot Edakkunni
2015-07-09  7:47   ` Marc Sune
2015-07-09 14:51     ` Gopakumar Choorakkot Edakkunni
2015-07-09 16:46   ` Stephen Hemminger
2015-07-09 20:47     ` Gopakumar Choorakkot Edakkunni

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).