From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gopakumar.c.e@gmail.com>
Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com
 [209.85.213.179]) by dpdk.org (Postfix) with ESMTP id 3F0A75A52
 for <dev@dpdk.org>; Thu,  9 Jul 2015 22:47:12 +0200 (CEST)
Received: by iggp10 with SMTP id p10so22426377igg.0
 for <dev@dpdk.org>; Thu, 09 Jul 2015 13:47:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=+wWThCdgP6GHOcmG2mht6IbuJEHJZpVssVLWJaYF3KQ=;
 b=SacOTMeU4uRZ0/wrHPY99kpaCJCj5dSmS+Bl7AmaEblEJ+9CT5E0iOdNKBZluepYAC
 +ZQc9Bt+QS9DAAsEBm4+nX+kFpB2upD+nqpOqPHWQfq9aBbs0wU7/LPZK1rTQiIB+wkj
 bSlkveyaFZXFGUC8scMbR3bc459mKnpXM0zJ8PrgJkfeyOa+rP07E9oEH4G1qGgtecnC
 8plJjPArOPwSxUqJamIakkrdaPmNFNy72E2YGeZPATZI9MwKWup9k4gLUqKkCpFpBNGN
 zl7dS9fyZwk9R07qiGn4CgypjXR6QWc5mPsq9mkzr/2dxuiqOV91CFBqHz4o9eoj76B7
 XQ6w==
MIME-Version: 1.0
X-Received: by 10.50.64.147 with SMTP id o19mr70250790igs.33.1436474831553;
 Thu, 09 Jul 2015 13:47:11 -0700 (PDT)
Received: by 10.36.194.129 with HTTP; Thu, 9 Jul 2015 13:47:11 -0700 (PDT)
In-Reply-To: <20150709094624.4788cc34@urahara>
References: <CABK1yFAvrovzvfyCROBNt-tNEbOYuYTh-G8FeHf4Js87jSBA2A@mail.gmail.com>
 <CABK1yFCWKH=OzGySgr+KqF71qcvCRNLHTirTqBCsZ+qj=jPbDg@mail.gmail.com>
 <20150709094624.4788cc34@urahara>
Date: Thu, 9 Jul 2015 13:47:11 -0700
Message-ID: <CABK1yFA_p4U92qiAAebbCdwiuRiVq_PJ4A7w41X9ffgmQHg-xA@mail.gmail.com>
From: Gopakumar Choorakkot Edakkunni <gopakumar.c.e@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Content-Type: text/plain; charset=UTF-8
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] How to prevent KNI interface from getting deleted on
 application termination?
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Jul 2015 20:47:12 -0000

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