From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=gmu2mnOQmqwx88WqTdoOqYOOGRtXwWEKebD11Pc83oE=; b=SA+WS2ZQw13zU3kaZxJN3F+TR/2Tox7H1k6oCrZk7r4kfGibHCL0JmkM8gTcsMahBX a9GjVRk2WGjhAVnpWpNaGZOFOzJFl/hs7mDARXGZqlLA4pZQl+KBA3vMrg8z+sAZ/ENt +mDFL65ropIA+bNI2lQE08AZM9Ahi2mwL8v93VV/hU2WtwK9tEWsz+FVwgd84B9BS8Mf BkOn5AaMCRvCyDUEE6nIfsxKpP/ONDn/Ysne59qYnwwrduEgCVgPQ8XcR8SpjY+YINlH YKvY6FVZflmorEzlntFotrLrfVqJO2FXCRvgcCIY2dDAr5NfL4d6tIQ9SDxVy46f1wHM 22ww== X-Gm-Message-State: ALoCoQkbj2ht8N70yninOpr/yi5KZny8yRuFXTIiQhqpXYoNhPOTkCWktgIPKip1uJFfHQgGh81r X-Received: by 10.70.44.3 with SMTP id a3mr50230724pdm.93.1432005097404; Mon, 18 May 2015 20:11:37 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id ca2sm11409090pdb.25.2015.05.18.20.11.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 May 2015 20:11:37 -0700 (PDT) Date: Mon, 18 May 2015 20:11:39 -0700 From: Stephen Hemminger To: Vijayakumar Muthuvel Manickam Message-ID: <20150518201139.6445ff6f@urahara> In-Reply-To: <1431992009-13573-1-git-send-email-mmvijay@gmail.com> 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 Subject: Re: [dpdk-dev] [PATCH] kni: Add link status update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 03:11:38 -0000 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.