Message ID | 20180919195549.5585-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 A9ADF1B120; Wed, 19 Sep 2018 21:56:18 +0200 (CEST) Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by dpdk.org (Postfix) with ESMTP id 478261B11A for <dev@dpdk.org>; Wed, 19 Sep 2018 21:56:17 +0200 (CEST) Received: by mail-qt0-f195.google.com with SMTP id n6-v6so6328785qtl.4 for <dev@dpdk.org>; Wed, 19 Sep 2018 12:56:17 -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=Tlp7+L9zKBRgMpk1mdKaZfo6BKkq5V8MVDHLrlw0Zoc=; b=XnoBPPCVOz5geFnsmzmeIEcxlPRQ90Fj1MhMOow1vqtCkxZO1hegN4DX1AZUTdXS23 agVFFg62cbJh9J8xlOOIqPUcfp77Rjv314/M8fSljmF0lM7+A6SMVzPh/vq4iBc0xyVv /oMwz0CComclLEl8I6mEpz/fmjiRgfbszchF3ERNp+hZz5cgya9ubbCuJXn6A+6MJBwU 5bI2h/4cAHTxo2MI8IrFLr1FoLaaM+9W0gcsNsv8qo2N4/ylLwnzP5tMzqzC0G8ZgOO4 wIiRVmxtZwpbK3aTvkcFuxwuUZ2rYGzUrKsbM8+wG+fiNyCThpoxsnc6D/XHoRYI5KrY lmRQ== 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=Tlp7+L9zKBRgMpk1mdKaZfo6BKkq5V8MVDHLrlw0Zoc=; b=fycxdEzoh14wDiFZSfTOU5+AKe1t4tYG6jnUvlOYsZxuCtojSMT5jHT7BYUyR2peMz xdhxGG2JJ+uDQN8iY/qNZu25QrQHac9PJJOS/KZQvgRZPVLgLGSeFlcJU3jg9+MJElwv jvpcAq/ln1KCE+B7ZITmCmm+URfy08fKHLvgHp5bHnIs/Oe6nwM8+NvmLwmURG7N/4KN 70oKhHUY9em5Pig/HeKn1r7Uwppxx9lMuKpauCiBLZKXvsl+2aKdWIF10rJs9ByK+9yF saAZ2pJgKpaiOJanM1tJ/TwCJIQV+LyHZ5oBOPuJmZmwSz26mTMUplxCSoc+PCHUHNc+ 9uOg== X-Gm-Message-State: APzg51Ah9AEUMFXoA2cI8FftvTfihmMFSMors9ZF+A+O72zkh7V80XOJ yDEoG+tNg8G1fuPbaKTSD3LkqmX8 X-Google-Smtp-Source: ANB0VdY5QF23egFyLYrEMbenCO4Xb5dNE2B/ScQELXJYYJZtEsUqB16L1xZzoAuwqbBs5UlpPUZTOw== X-Received: by 2002:a0c:aed9:: with SMTP id n25-v6mr25838786qvd.10.1537386976138; Wed, 19 Sep 2018 12:56:16 -0700 (PDT) Received: from snappy.local.lan ([187.10.145.241]) by smtp.gmail.com with ESMTPSA id g184-v6sm12431369qkb.15.2018.09.19.12.56.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Sep 2018 12:56:15 -0700 (PDT) From: Dan Gora <dg@adax.com> To: dev@dpdk.org Cc: Igor Ryzhov <iryzhov@nfware.com>, Stephen Hemminger <stephen@networkplumber.org>, Dan Gora <dg@adax.com> Date: Wed, 19 Sep 2018 16:55:44 -0300 Message-Id: <20180919195549.5585-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 v2 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> |
Series |
kni: add API to set link status on kernel interface
|
|
Message
Dan Gora
Sept. 19, 2018, 7:55 p.m. UTC
Hi All, Attached is version 2 of a patchset to add a new API function to set the link status on kernel interfaces created with the KNI kernel module. -dan 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 > Hi All, > > The following patches are to add support for DPDK applications to be > able to change the carrier state of Linux network interfaces in the > KNI kernel module. > > The carrier state is changed by writing to the Linux /sys file: > /sys/devices/virtual/net/<name>/carrier, where <name> is the KNI > interface name. > > These patches supercede: > '[PATCH v2 10/10] kni: add API to set link status on kernel interface' > https://mails.dpdk.org/archives/dev/2018-August/110383.html Dan Gora (5): kni: add API to set link status on kernel interface kni: set default carrier state to 'off' 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 | 104 ++++++++++++++++------------- kernel/linux/kni/kni_misc.c | 2 + kernel/linux/kni/kni_net.c | 2 + lib/librte_kni/rte_kni.c | 57 ++++++++++++++++ lib/librte_kni/rte_kni.h | 18 +++++ lib/librte_kni/rte_kni_version.map | 6 ++ test/test/test_kni.c | 100 ++++++++++++++++++++++++++- 8 files changed, 244 insertions(+), 47 deletions(-)