From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] kni: Add link status update Date: Mon, 18 May 2015 20:11:39 -0700 Message-ID: <20150518201139.6445ff6f@urahara> References: <1431992009-13573-1-git-send-email-mmvijay@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Vijayakumar Muthuvel Manickam Return-path: Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id 46B075A37 for ; Tue, 19 May 2015 05:11:38 +0200 (CEST) Received: by pdbnk13 with SMTP id nk13so4229985pdb.1 for ; Mon, 18 May 2015 20:11:37 -0700 (PDT) In-Reply-To: <1431992009-13573-1-git-send-email-mmvijay@gmail.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" I agree that this looks like a good facility to have but this is not the right way to do it. There are already several facilities to accomplish the same thing. 1. You can use the operstate functionality in kernel to manipulate carrier from another application (read Documentation/operstate.txt) 2. It is possible with sysfs to change carrier state. The KNI driver just has to provide an .ndo_change_carrier callback. Introducing more ioctl's is not a good thing. KNI needs to get rid of the quick and dirty ioctl approach and follow current best practices for Linux network drivers. It should really be using netlink instead of ioctl(). Ioctl's have several compatibility issues that make them unacceptable upstream. There is a standard API for create/destroy with netlink and the custom ioctl's could be banished into the attic of dead API's. PS: Has anybody even attempted to get KNI upstream? I can see lots of style (and security) issues that would need to be fixed.