[v7,0/5] kni: add API to set link status on kernel interface
Message ID | 20181024222631.30461-1-dg@adax.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> 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 167C62BAE; Thu, 25 Oct 2018 00:26:44 +0200 (CEST) Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by dpdk.org (Postfix) with ESMTP id CB13E2965 for <dev@dpdk.org>; Thu, 25 Oct 2018 00:26:41 +0200 (CEST) Received: by mail-qt1-f193.google.com with SMTP id o17-v6so1897986qtq.11 for <dev@dpdk.org>; Wed, 24 Oct 2018 15:26:41 -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 :mime-version:content-transfer-encoding; bh=4ttNSuKJHVfZQUe90LUEfiqgdUPcBB77WIvLOPnnOnI=; b=F7wznXk68mrY1j58ZjAxMacnMOV6nuVjWqTGRkyDPVcyeY//Ef4Bjdv9KZypQAPwv1 J+k6eXC7i9bMictZKZP842lUXkUK+qqGH3uHuwGRaRW6arBx6DPyw4gjTfRuywSswjFD 2VAhKb3bIuocBPOoJgnlFCRgpD1xg/B1lnvFELcPcPjWWiQvUenxIF8Y73WFDHT6/Jtg hm7da43nReR6P1QhGxsm9okFgTY3tuS5MbdYjSTp2AtYuhq63hdbHe0KgHoGVFm+IncR EPTo//KrdoDnvsnA8K9P7ELjL7FTXDqRR8u2RgJ/BpmnEG7L1AZMBJbHawwMGwfOb00m Nnwg== 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:mime-version:content-transfer-encoding; bh=4ttNSuKJHVfZQUe90LUEfiqgdUPcBB77WIvLOPnnOnI=; b=QFVh6AedH9hjp0IuwU85GizuHk5WzJ1kpETitprtdknBRU+MmmQvZcGEo9VwSLMFCE fEeAGXhp5hQVmf2NtoqfTyQLWOawjT4C4g7PM61npZpf2Xo/be5YPef1U60WmNYU1n5y O8zCnjfi+cbCIXt+yI6uHeR+qGAsZXsHvfCoYY9/GXrujnIS4g4m8gF5/x9MWKIpDbrq Vhska/91O4rlIhxygXYVhUtMeyIXwBxc8P2uFE8cuy3dgbMWXAt0bSZgyAqawxMc6uDT 5K9pqORR9xvKCZgcGD9CKhQMmeDrCtOBX+hnoJ940pY4BKRsc5cNYcgY88iLAt1FifPU AvkQ== X-Gm-Message-State: AGRZ1gLskVMfN6YvWiEvuj7ubHk2BKY7eb9JPlzpck7vCoZ+/l4AWG9k l0S/wcmNAotgo9CyCva93iW7xL/1 X-Google-Smtp-Source: AJdET5ex6Bt/JSiq0ccvclUcuNeMET/C5Cf7AMpJ/zrjAF9IsT5jci/fN/rK9OKOlgj6LG6TtSy51g== X-Received: by 2002:a0c:bf43:: with SMTP id b3mr4214288qvj.68.1540420000699; Wed, 24 Oct 2018 15:26:40 -0700 (PDT) Received: from snappy.local.lan ([179.228.213.114]) by smtp.gmail.com with ESMTPSA id s52-v6sm5506026qts.5.2018.10.24.15.26.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Oct 2018 15:26:39 -0700 (PDT) From: Dan Gora <dg@adax.com> To: dev@dpdk.org Cc: Igor Ryzhov <iryzhov@nfware.com>, Stephen Hemminger <stephen@networkplumber.org>, Ferruh Yigit <ferruh.yigit@intel.com>, Dan Gora <dg@adax.com> Date: Wed, 24 Oct 2018 19:26:26 -0300 Message-Id: <20181024222631.30461-1-dg@adax.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180911232906.18352-1-dg@adax.com> References: <20180911232906.18352-1-dg@adax.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 0/5] kni: add API to set link status on kernel interface X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Message
Dan Gora
Oct. 24, 2018, 10:26 p.m. UTC
Hi All, Attached is version 7 of a patchset to add a new API function to set the link status on kernel interfaces created with the KNI kernel module. v7 ==== * Add commands to check/clear statistics in kni sample app in KNI sample app documentation. > v6 > ==== > * Update info about callback functions in KNI library documentation. > > * Minor fixup to module parameter formatting in KNI kernel module. (align > the "charp" text...) > > * Add '-m' flag to KNI sample app command line in KNI sample app > documentation. > > * Add references to KNI library documentation from KNI sample app > documentation (yay Sphinx!) > > v5 > ==== > * Update Kernel NIC Interface document with new rte_kni option, move > kernel module parameter description here from KNI sample app > document, general cleanup. > > * Update Kernel NIC Interface sample application (kni) document > with new command line parameter, remove documentation for rte_kni > kernel module but add reference to it, general cleanup. > > * Change link status change sample rate for KNI example app to 500ms > from 100ms. > > * Fix bug in parameter parsing in v4 in rte_kni kernel module. > > * Fix output formatting of optional parameters for rte_kni with > modinfo. > > * Fix permissions of optional parameters for rte_kni. > > * Squash patch to add test for rte_kni_update_link into patch > introducing the API function. > > v4 > ==== > * Rework rte_kni_update_link to only take linkup/linkdown as parameter, > return previous link state, and remove log messages. > > * Update patch to set default carrier state to make default carrier > state configurable by passing the 'carrier=[on|off]' option to > the rte_kni kernel module. This is necessary in order to allow > applications which use KNI as pure virtual interfaces without > corresponding physical ethernet port to use the interfaces without > having to set the carrier state to 'on' via rte_kni_update_link() > or by writing to /sys/devices/virtual/net/<ifaceX>/carrier. > Note that the default is 'off'. > > * Add command line flag '-m' to examples/kni to continuously monitor > and update the KNI interface link status according to the link > status of the corresponding physical ethernet port. > > > v3 > ==== > * Use separate function to test rte_kni_update_link() in 'test' app. > > * Separate changes to 'test' app into separate patch to facilitate > possible merge with https://patches.dpdk.org/patch/44730/ > > * Remove changes to set KNI interfaces to 'up' in example/kni > > v2 > ==== > > * Fix bug where "Fixed" and "AutoNeg" were transposed in the link > status log message. > > * Add rte_kni_update_link() to rte_kni_version.map > > * Add rte_kni_update_link() tests to kni_autotest > > * Update examples/kni to continuously monitor link status and > update the corresponding kernel interface with > rte_kni_update_link(). > > * Minor improvements to examples/kni: Add log message showing how > to show/zero stats. Improve zeroing statistics. > > Note that checkpatches.sh compains about patch 1/5, but this appears > to be a bug with check-symbol-change or something. If I move the > fragment of the patch modifying rte_kni_version.map to the bottom of > the patch file, it doesn't complain any more... I just don't really > have time to investigate this right now. thanks dan Dan Gora (5): kni: add API to set link status on kernel interface kni: set default carrier state of interface examples/kni: monitor and update link status continually examples/kni: add log msgs to show and clear stats examples/kni: improve zeroing statistics .../prog_guide/kernel_nic_interface.rst | 239 +++++++++++++--- .../sample_app_ug/kernel_nic_interface.rst | 262 +++++++++++------- examples/kni/Makefile | 2 + examples/kni/main.c | 92 +++++- kernel/linux/kni/kni_dev.h | 3 + kernel/linux/kni/kni_misc.c | 60 +++- kernel/linux/kni/kni_net.c | 5 + lib/librte_kni/rte_kni.c | 41 +++ lib/librte_kni/rte_kni.h | 20 ++ lib/librte_kni/rte_kni_version.map | 6 + test/test/test_kni.c | 77 +++++ 11 files changed, 652 insertions(+), 155 deletions(-)