From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by dpdk.org (Postfix) with ESMTP id A2FB07D05 for ; Fri, 19 Oct 2018 02:24:12 +0200 (CEST) Received: by mail-qt1-f196.google.com with SMTP id l41-v6so36463550qtl.8 for ; Thu, 18 Oct 2018 17:24:12 -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=a5WCm4J4S0PU3gcWjFm5+6b1G0jAqM58/A9pcPaQG/o=; b=fuRL0mbcBwkjRVuD26rgyVoBGrcLNh3MBXxyT2+Dvc7agkb/46zNAoShuS8IESnBFp zcmQrpbk5hocsQAct2KZB/CDPHiCDuclx1SGv4a184q8yLtAbvNodfyhSg2tZXEZRXql IGyv4FZPSPQwJE4YzFOksm7fLcLnigr+Ra9Z8OUvCTDarLhVEp15iPShqEbEDxKnmv2+ YjTtpsIKA0LWLH485HxZDnzB+DXbdRjMnZ4bGKHbHYPVG367A/uzqUlymnp7q2BNmZFG /M7nkNZCUOoBTnIKqqykoBrQOcYmnGySvmqoxB5Dm0LtoRfAfNoujHkquZpC7eTG5Cma +ObA== 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=a5WCm4J4S0PU3gcWjFm5+6b1G0jAqM58/A9pcPaQG/o=; b=LNgzOoI+lBzBpLt/g5zUbQOR4sY9FiA2d24dLVjrlKTPcTVa/Dip4tILRXxqhUre9v BunnOcCMS9BnytwRlLBphEgKgOFlrYWNzcoH3mW5bnvm0YUIpkAFU0P/vx4HAljdVt+t 7K4yXALPMej9m2TX5+k1YuZuHVZ3CpS/Ne0AY8GjaA3hk7yCha6A9JPuaPSWecvfir0H KvBQoOdd7BReIdesXNMubBB9QByp3h0yxyeQD5vYomQE5U/tZw8GaEwSuu9Ribp1lJ4j gmBcc8628m8KSJlXFVtSGZ0iHD+gFCHLMxbGThY/WtYCIeFl/kGjLGrY3p1vYvxlb4n0 nKDg== X-Gm-Message-State: ABuFfogq5Co8R0sGZxlMc9MPceuicgR66pCKXFp44WFvTA4rTMOcqqtb PsQGz00SLkApklAzLo+oYAdr7KbL X-Google-Smtp-Source: ACcGV62KLKasObOnk1kDbsYWEELdlKCgSh1K4P0+8gNO8TW1P7ya68y+/RIbRElODBoX8eZnPFLyhw== X-Received: by 2002:a0c:95e6:: with SMTP id t35mr32707711qvt.163.1539908651435; Thu, 18 Oct 2018 17:24:11 -0700 (PDT) Received: from snappy.local.lan ([191.205.43.134]) by smtp.gmail.com with ESMTPSA id y124-v6sm12963926qke.22.2018.10.18.17.24.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Oct 2018 17:24:10 -0700 (PDT) Sender: Dan Gora From: Dan Gora To: dev@dpdk.org Cc: Igor Ryzhov , Stephen Hemminger , Ferruh Yigit , Dan Gora Date: Thu, 18 Oct 2018 21:23:53 -0300 Message-Id: <20181019002358.17132-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 v5 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2018 00:24:12 -0000 Hi All, Attached is version 5 of a patchset to add a new API function to set the link status on kernel interfaces created with the KNI kernel module. 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//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 | 203 ++++++++++---- .../sample_app_ug/kernel_nic_interface.rst | 249 +++++++++++------- examples/kni/Makefile | 2 + examples/kni/main.c | 92 ++++++- kernel/linux/kni/kni_dev.h | 3 + kernel/linux/kni/kni_misc.c | 57 +++- 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, 598 insertions(+), 157 deletions(-) -- 2.19.0