From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f65.google.com (mail-oi0-f65.google.com [209.85.218.65]) by dpdk.org (Postfix) with ESMTP id 743421B50C for ; Fri, 29 Jun 2018 03:55:21 +0200 (CEST) Received: by mail-oi0-f65.google.com with SMTP id k81-v6so7044103oib.4 for ; Thu, 28 Jun 2018 18:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ehQG75+R6Bx40DHQ9da9Y73Ogy2eGy5vp68hxEp00sQ=; b=cc85FbhgbjYhZcrDyKdN+ByTMZBcwMQlIJbboNEcFAtgfPWEAWRMsK5yMB4Fn2s+ZW xRDB3FUOBSpvJ6mrmdqd7TyXX4ok/hMGkLCXioXTj0R4U0izKtw4VXTMILUmfiUdZTL+ GWyg7XUFTFfp7hlnaj8K3DqGLcUIglXa3Qzwa75SzQAGVySjuC2sIyxF4z3gwsqGS4Zz cQzvodf09zoU5wKQNkj83+nM1E/mDZqkfuCRoOpIIQWqZ1KCV6f68bQro0mxPpj051J1 AXKWJCdXXB3nK2Q8fxYnujkbBtRl5xbLjq5LfRT1fDE++cWYxHGVqf7Pl30w/dkH4bup Y30A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ehQG75+R6Bx40DHQ9da9Y73Ogy2eGy5vp68hxEp00sQ=; b=M9to+TROShcZfAF7rp1HogvZ+stSZCg8SbCoKVuAVTLC1n25TvJa8LQB1+7k4VLXvh t8mGFe/dPR+hd8TYRuMsr176bxWaNywykDDMvlBw48l7pvTXMNL1NRVn16X38AjCStr8 oBDLlQqEp9+YpVQfkQPtqHs/uQPirXSHDS/JFIJQXqqymJF5ptrOINJ8zfhHD1mo/DzS Ephl3H2PbPrHTinEddehP56Kk+WYaeBdaxIkWPZxjGXxF8lEYhi5ccIkby3+44aX5+35 NEmaiY+Me6+B1x1rDQJTEnciEC4k/VKWy1pqFjmkQJESgxkPZdNqX8UA/1cTFibmkx8e UnZQ== X-Gm-Message-State: APt69E26Ns9T2UyhXZg92paL1NnCYLWRWnR6JK2GTOl9dXX35NoTFhLs akvC+YMtGLSuHEvpODielOg= X-Google-Smtp-Source: AAOMgpdiVm07BfSVXBrPtbKi/zQtwr2yZCxzhmW0n+sVJ2c9S5r9/9PubBa6bSfM9arblFp2ryh+3g== X-Received: by 2002:aca:b06:: with SMTP id 6-v6mr6854256oil.36.1530237320563; Thu, 28 Jun 2018 18:55:20 -0700 (PDT) Received: from linux.adax.com (172-11-198-60.lightspeed.sntcca.sbcglobal.net. [172.11.198.60]) by smtp.gmail.com with ESMTPSA id n3-v6sm3941288otk.38.2018.06.28.18.55.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 18:55:19 -0700 (PDT) Sender: Dan Gora From: Dan Gora To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Dan Gora Date: Thu, 28 Jun 2018 18:54:58 -0700 Message-Id: <20180629015508.26599-1-dg@adax.com> X-Mailer: git-send-email 2.18.0.rc1.1.g6f333ff2f In-Reply-To: <20180628224513.18391-1-dg@adax.com> References: <20180628224513.18391-1-dg@adax.com> Subject: [dpdk-dev] [PATCH 00/10] kni: Interface detach and link status fixes. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 01:55:21 -0000 Hi All, The following patches are to fix a problem with detaching a KNI interface using rte_kni_release and to add a new API function to allow users to change the link status (up/down, speed, etc) of the interface in the linux kernel. In previous versions, it was impossible to release a KNI interface without waiting for the timeout in kni_net_process_request to expire if the interface is in the UP state. The solution to this issue was to separate the process of releasing the netdev device from the linux kernel from actually freeing the KNI interface in the kernel and in the RTE library by introducing a new API function, rte_kni_free(). The last patch : 'kni: add API to set link status on kernel interface' adds a new API function to allow the DPDK user to change the link speed and status reported by the netdev in the linux kernel. This resolves issues with allowing automatic network configuration applciations such as NetworkManager to assign addresses and for user space applications to be able to open sockets on these interfaces, as some operations rely on the link status being up before they work properly. This last patch is included in this series because both new "features" introduce new ioctls to the rte_kni kernel module, so the order in which the patches get applied affects which number each new ioctl gets. I thought it better to bundle them together to try to get them applied as a series to avoid any issues with this. *v2* The first time I submitted these patches, they failed with compilation errors in Patchwork, but they are failing due to rte_kni_free being a missing symbol, which is only introduced here in patch 4/10. I'm not really sure how the automatically compilation tool works in patchwork. Does it apply all of the patches in the series before compilation? Does it compile after each patch? I tried my best to break up these patches into small enough pieces so that they could be reviewed fairly easily, but I'm not sure that I did a good job. If there are suggestions on how the changes could be organized or split better, please let me know. thanks dan v2: Re-submitted as a threaded series as per thomas@monjalon.net suggestions. cc'd Ferruh on cover letter. No code changes. Dan Gora (10): kni: remove unused variables from struct kni_dev kni: separate releasing netdev from freeing KNI interface kni: don't touch struct kni_dev after freeing kni: add rte_kni_free to KNI library kni: don't run rte_kni_handle_request after interface release kni: increase length of timeout for KNI responses kni: update kni test for rte_kni_free kni: add rte_kni_free to KNI example app kni: add rte_kni_free to KNI vdev driver kni: add API to set link status on kernel interface drivers/net/kni/rte_eth_kni.c | 6 +- examples/kni/main.c | 4 +- kernel/linux/kni/kni_dev.h | 5 +- kernel/linux/kni/kni_misc.c | 156 ++++++++++++++++-- kernel/linux/kni/kni_net.c | 7 +- .../eal/include/exec-env/rte_kni_common.h | 20 +++ lib/librte_kni/rte_kni.c | 75 ++++++++- lib/librte_kni/rte_kni.h | 51 +++++- test/test/test_kni.c | 20 +++ 9 files changed, 313 insertions(+), 31 deletions(-) -- 2.18.0.rc1.1.g6f333ff2f