From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 2D2AB2BCE for ; Wed, 17 Oct 2018 03:04:36 +0200 (CEST) Received: by mail-qk1-f193.google.com with SMTP id 84-v6so15463930qkf.0 for ; Tue, 16 Oct 2018 18:04: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=MW06a7mfS4g212m6LzglV8M3gzH+XT/WhlkLJvmMrH4=; b=ODUqt8a0Dqaz9ojMuOBQsvnR38SQKqGafY9fZbkFhOO8oK8QaPNQKQecr9xsX7AAAw 8XxoSvpH+F1I+x5iRQregP/YwjIpCYiv3Af9zxR+9VIaLRCQ2xZgMsGQBVGHpIpTLST5 XNDKk7hYGPsWe4SRkshiPx1aoncmGt8MG8pTwQocqKtKFFoCE+FYo+e7uS+EUMBiMdaH WeTu1OmtOYck5sRi1HKrkrh9FIJvCt06C3cORPu4MfDAwyuZF9USMTu9gy8EghcAZcgC 3h0UBd0BMJ5ZKyRtDFjD2uFkAkhVet47UaCaaa9PhA0aRlCy0L0uWqLRVuYEXTrTIZv9 EXVw== 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=MW06a7mfS4g212m6LzglV8M3gzH+XT/WhlkLJvmMrH4=; b=AA223uHabxiGVarhtIO+ninNZQY62GC6YneJHd87cCeut5WygHIs3PCP23EkT7cuR1 lz+V4YIOOuJQ21aiRlQ+bDqVJnH3LWN58Y57IX3dAapTdobQFaWs6rzH4wZSgGHxsl/M OMdXcdkB4NN2/sQin28x0IMOxWkNVjJ1VDx09Ho+jUVqB1HNWUvoDq/+511SyyfmzeJX EjaKj0gPsp+qwXK+buLIUrFOJOAJiUyBz9mQsDFvf29XU4QsyRCAKOxwuVrWdnGmkEpH 113dKGrc9MRdtSatWs/bjF5SjYGzxqsU75AM37Gn3r4A+qGcnMbus+WGIRKNUQoGrf/X qGmg== X-Gm-Message-State: ABuFfoiOh3xweoZy6vbww+zO7eSK/E5ctXvbwN9Gken13qrqeKvCBM2L ZmTlT4XLcQZHrQOiaeECYgYppUfddmg= X-Google-Smtp-Source: ACcGV62iqN7WVN1q/lSzMWn3UIwZVlIGwHV36pd77tu1fYYzZ9rSK/56WXalcWgn2HunfxmE5PcPOA== X-Received: by 2002:a37:12d1:: with SMTP id 78-v6mr22913953qks.147.1539738275092; Tue, 16 Oct 2018 18:04:35 -0700 (PDT) Received: from snappy.local.lan ([187.74.142.5]) by smtp.gmail.com with ESMTPSA id v54-v6sm19547508qtc.81.2018.10.16.18.04.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Oct 2018 18:04:33 -0700 (PDT) Sender: Dan Gora From: Dan Gora To: dev@dpdk.org Cc: Igor Ryzhov , Stephen Hemminger , Ferruh Yigit , Dan Gora Date: Tue, 16 Oct 2018 22:04:07 -0300 Message-Id: <20181017010412.23141-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 v4 0/6] 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: Wed, 17 Oct 2018 01:04:36 -0000 Hi All, Attached is version 4 of a patchset to add a new API function to set the link status on kernel interfaces created with the KNI kernel module. 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 (6): kni: add API to set link status on kernel interface kni: add link status test 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 examples/kni/Makefile | 2 + examples/kni/main.c | 92 +++++++++++++++++++++++++++--- kernel/linux/kni/kni_dev.h | 3 + kernel/linux/kni/kni_misc.c | 40 +++++++++++++ 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 +++++++++++++++++++++++++ 9 files changed, 279 insertions(+), 7 deletions(-) -- 2.19.0