From patchwork Thu Jun 28 22:45:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Gora X-Patchwork-Id: 41887 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2826E8D8F; Fri, 29 Jun 2018 00:45:38 +0200 (CEST) Received: from mail-ot0-f194.google.com (mail-ot0-f194.google.com [74.125.82.194]) by dpdk.org (Postfix) with ESMTP id B32B88D88 for ; Fri, 29 Jun 2018 00:45:36 +0200 (CEST) Received: by mail-ot0-f194.google.com with SMTP id c15-v6so7947254otl.3 for ; Thu, 28 Jun 2018 15:45:36 -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; bh=0OH3qkUi3JqTridOs2pDS375bCfbGsbMtEGcifZiizQ=; b=A+VWgM3mdNcQNVUPnQwHIEb/UbOLJGEnTszMo+0Xhw1n26sOopqjc4rmO5R20EILw9 c339V9KRwCKUH8lXdt+rtrjBL/uE2mA8U6n9IWSvDgZFzF/D8g4g7x6IKqxmzNT1hdu/ NdeGpaHcKSvN8FpE4qLZ++xw9SFtTMafTxFi1GR7wQbHGC4hXtAWFHjFRP0oL6imn9MO Swc5hY0ScpUt6cZ8cPMXDNFQftQ6lwMEV26cIJ2fcF3oxEVnP9NC3IUqXJR5zMJtkcrp VNPPJi1Si4fFH1dTrRSOwQdLS0KMjJcY0vin3j9mc8/576B1l5NW81hQtq4M4WETiiN1 9g8g== 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; bh=0OH3qkUi3JqTridOs2pDS375bCfbGsbMtEGcifZiizQ=; b=DKe7Q8SH1BBYYlKPL2LOaPne81t0+BDocXEAURn/sWmDWHTvr5oqr/DCWtHixa98CT XHg04zuTyxOjg8/HNIvBXkzmVYyAbvZZA6HobJy0riYxwvDZJZy0+m20pUGgrEHe23k6 /b9iaKJ/7STibVr7ptfY/Khn7FfUy4wd+oLDanRwvF3C8NggtUq8EKy9tcPUA34p54X8 P2/94RIb8Wq/rE5G/gtzstCkRrPvJQ7pZszFcnq/zV8BunmzbRlFHm9+vKcxMp0s4+RN mtZ7bUuqaJ4N+c4azzFEj5DF6qBYWd6Qk8pvhYvYsmcj5pB6fM7vgMpnzYMEbnjdykZP BofA== X-Gm-Message-State: APt69E0zS1FEgfl+42tgBdbC3X6aW2sE+LB0ttA9Isr+sHDf48DPVCek EhgGY81s8eTJIU3wJQ1C4sb0Dg== X-Google-Smtp-Source: AAOMgpfPuDLUn0q8m5NJTF5LDNtCi3jT8RHVMuDPXssYYHUHiXXKEKdAx4JUNlMJceTwOh/nCv2ZHg== X-Received: by 2002:a9d:1350:: with SMTP id q16-v6mr6934769otq.6.1530225934466; Thu, 28 Jun 2018 15:45:34 -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 r131-v6sm3752925oih.16.2018.06.28.15.45.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 15:45:33 -0700 (PDT) From: Dan Gora To: Cc: dev@dpdk.org, Dan Gora Date: Thu, 28 Jun 2018 15:45:13 -0700 Message-Id: <20180628224513.18391-1-dg@adax.com> X-Mailer: git-send-email 2.18.0.rc1.1.g6f333ff2f 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. Please have a look! thanks dan 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(-)