From: Ferruh Yigit <ferruh.yigit@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v4 0/4] Use common Linux tools to control DPDK ports
Date: Tue, 1 Mar 2016 15:41:56 +0000 [thread overview]
Message-ID: <1456846920-28770-1-git-send-email-ferruh.yigit@intel.com> (raw)
In-Reply-To: <1456495841-15749-1-git-send-email-ferruh.yigit@intel.com>
This work is to make DPDK ports more visible and to enable using common
Linux tools to configure DPDK ports.
Patch is based on KNI but contains only control functionality of it,
also this patch does not include any Linux kernel network driver as
part of it.
Basically with the help of a kernel module (KCP), virtual Linux network
interfaces named as "dpdk$" are created per DPDK port, control messages
sent to these virtual interfaces are forwarded to DPDK, and response
sent back to Linux application.
Virtual interfaces created when DPDK application started and destroyed
automatically when DPDK application terminated.
Communication between kernel-space and DPDK done using netlink socket.
In long term this patch intends to replace the KNI and KNI will be
depreciated.
v4:
* Kernel side changes:
* Remove logging helper macros, use pr_fmt
* Seperate log msg for timeout and error
* Control library changes:
* Add ethtool_get_settings as dummy
v3:
* Kernel side changes:
* Devices are not up by default
* Add enable/disable promisc, allmulti support
* Increase timeout to 500ms and print log when a command timedout
* Control library changes:
* Use librte_ethtool
* Don't create interfaces for virtual PMDs
* Add a new API ...msg_exist() to support port based locking
* Add enable/disable promisc, allmulti support
* Example changes:
* Use blocking mode control interface processing, instead of poll mode
v2:
* Use rtnetlink to create interfaces
* Add more ethtool support: get/set ringparam, set pauseparam.
* fix ethtool get/set eeprom
* lots of minor updates, enhancements in the code
Samples:
$ ifconfig
dpdk0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::92e2:baff:fe0e:49b8 prefixlen 64 scopeid 0x20<link>
ether 90:e2:ba:0e:49:b8 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
dpdk1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::21b:21ff:fe76:fa20 prefixlen 64 scopeid 0x20<link>
ether 00:1b:21:76:fa:20 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
After some traffic on port 0:
$ ifconfig
dpdk0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::92e2:baff:fe0e:49b8 prefixlen 64 scopeid 0x20<link>
ether 90:e2:ba:0e:49:b8 txqueuelen 1000 (Ethernet)
RX packets 26117404 bytes 1671514264 (1.5 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 27897889 bytes 1785463944 (1.6 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ ethtool -i dpdk0
driver: rte_ixgbe_pmd
version: DPDK 16.04.0-rc0
firmware-version:
expansion-rom-version:
bus-info: 0000:08:00.0
supports-statistics: no
supports-test: no
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
$ ethtool -e dpdk0 offset 20 length 10
Offset Values
------ ------
0x0014: b7 01 bf 01 c7 01 cf 01 09 02
$ ip l show dpdk0
44: dpdk0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 90:e2:ba:0e:49:b8 brd ff:ff:ff:ff:ff:ff
$ ip l set dpdk0 addr 90:e2:ba:0e:49:b9
$ ip l show dpdk0
44: dpdk0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 90:e2:ba:0e:49:b9 brd ff:ff:ff:ff:ff:ff
Ferruh Yigit (4):
lib/librte_ethtool: move librte_ethtool form examples to lib folder
kcp: add kernel control path kernel module
rte_ctrl_if: add control interface library
examples/ethtool: add control interface support to the application
MAINTAINERS | 5 +
config/common_linuxapp | 14 +-
doc/api/doxy-api-index.md | 4 +-
doc/api/doxy-api.conf | 2 +
doc/api/examples.dox | 5 +-
doc/guides/prog_guide/ctrl_if_lib.rst | 52 ++
doc/guides/prog_guide/ethtool_lib.rst | 62 ++
doc/guides/prog_guide/index.rst | 4 +-
doc/guides/rel_notes/release_16_04.rst | 10 +
doc/guides/sample_app_ug/ethtool.rst | 77 +-
examples/ethtool/Makefile | 24 +-
examples/ethtool/ethapp.c | 873 +++++++++++++++++++++
examples/ethtool/ethapp.h | 41 +
examples/ethtool/ethtool-app/Makefile | 54 --
examples/ethtool/ethtool-app/ethapp.c | 873 ---------------------
examples/ethtool/ethtool-app/ethapp.h | 41 -
examples/ethtool/ethtool-app/main.c | 305 -------
examples/ethtool/lib/Makefile | 57 --
examples/ethtool/lib/rte_ethtool.c | 423 ----------
examples/ethtool/lib/rte_ethtool.h | 410 ----------
examples/ethtool/main.c | 332 ++++++++
lib/Makefile | 4 +-
lib/librte_ctrl_if/Makefile | 58 ++
lib/librte_ctrl_if/rte_ctrl_ethtool.c | 390 +++++++++
lib/librte_ctrl_if/rte_ctrl_ethtool.h | 54 ++
lib/librte_ctrl_if/rte_ctrl_if.c | 395 ++++++++++
lib/librte_ctrl_if/rte_ctrl_if.h | 129 +++
lib/librte_ctrl_if/rte_ctrl_if_version.map | 10 +
lib/librte_ctrl_if/rte_nl.c | 313 ++++++++
lib/librte_ctrl_if/rte_nl.h | 50 ++
lib/librte_eal/common/include/rte_log.h | 3 +-
lib/librte_eal/linuxapp/Makefile | 5 +-
lib/librte_eal/linuxapp/eal/Makefile | 3 +-
.../linuxapp/eal/include/exec-env/rte_kcp_common.h | 109 +++
lib/librte_eal/linuxapp/kcp/Makefile | 57 ++
lib/librte_eal/linuxapp/kcp/kcp_dev.h | 56 ++
lib/librte_eal/linuxapp/kcp/kcp_ethtool.c | 300 +++++++
lib/librte_eal/linuxapp/kcp/kcp_net.c | 225 ++++++
lib/librte_eal/linuxapp/kcp/kcp_nl.c | 220 ++++++
lib/librte_ethtool/Makefile | 57 ++
lib/librte_ethtool/rte_ethtool.c | 423 ++++++++++
lib/librte_ethtool/rte_ethtool.h | 413 ++++++++++
lib/librte_ethtool/rte_ethtool_version.map | 28 +
mk/rte.app.mk | 4 +-
44 files changed, 4759 insertions(+), 2215 deletions(-)
create mode 100644 doc/guides/prog_guide/ctrl_if_lib.rst
create mode 100644 doc/guides/prog_guide/ethtool_lib.rst
create mode 100644 examples/ethtool/ethapp.c
create mode 100644 examples/ethtool/ethapp.h
delete mode 100644 examples/ethtool/ethtool-app/Makefile
delete mode 100644 examples/ethtool/ethtool-app/ethapp.c
delete mode 100644 examples/ethtool/ethtool-app/ethapp.h
delete mode 100644 examples/ethtool/ethtool-app/main.c
delete mode 100644 examples/ethtool/lib/Makefile
delete mode 100644 examples/ethtool/lib/rte_ethtool.c
delete mode 100644 examples/ethtool/lib/rte_ethtool.h
create mode 100644 examples/ethtool/main.c
create mode 100644 lib/librte_ctrl_if/Makefile
create mode 100644 lib/librte_ctrl_if/rte_ctrl_ethtool.c
create mode 100644 lib/librte_ctrl_if/rte_ctrl_ethtool.h
create mode 100644 lib/librte_ctrl_if/rte_ctrl_if.c
create mode 100644 lib/librte_ctrl_if/rte_ctrl_if.h
create mode 100644 lib/librte_ctrl_if/rte_ctrl_if_version.map
create mode 100644 lib/librte_ctrl_if/rte_nl.c
create mode 100644 lib/librte_ctrl_if/rte_nl.h
create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_kcp_common.h
create mode 100644 lib/librte_eal/linuxapp/kcp/Makefile
create mode 100644 lib/librte_eal/linuxapp/kcp/kcp_dev.h
create mode 100644 lib/librte_eal/linuxapp/kcp/kcp_ethtool.c
create mode 100644 lib/librte_eal/linuxapp/kcp/kcp_net.c
create mode 100644 lib/librte_eal/linuxapp/kcp/kcp_nl.c
create mode 100644 lib/librte_ethtool/Makefile
create mode 100644 lib/librte_ethtool/rte_ethtool.c
create mode 100644 lib/librte_ethtool/rte_ethtool.h
create mode 100644 lib/librte_ethtool/rte_ethtool_version.map
--
2.5.0
next prev parent reply other threads:[~2016-03-01 15:42 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1453911849-16562-1-git-send-email-ferruh.yigit@intel.com>
2016-01-27 16:24 ` [dpdk-dev] [PATCH 1/3] kcp: add kernel control path kernel module Ferruh Yigit
2016-01-28 9:49 ` Remy Horton
2016-01-28 13:50 ` Ferruh Yigit
2016-02-28 15:34 ` Avi Kivity
2016-02-28 20:16 ` Ferruh Yigit
2016-02-29 9:43 ` Avi Kivity
2016-02-29 10:43 ` Ferruh Yigit
2016-02-29 10:58 ` Avi Kivity
2016-02-29 11:06 ` Thomas Monjalon
2016-02-29 11:35 ` Ferruh Yigit
2016-02-29 15:05 ` Ferruh Yigit
2016-02-29 15:19 ` Panu Matilainen
2016-02-29 15:27 ` Thomas Monjalon
2016-02-29 16:04 ` Panu Matilainen
2016-02-29 14:33 ` Jay Rolette
2016-03-01 22:40 ` Bruce Richardson
2016-03-02 2:02 ` Stephen Hemminger
2016-03-02 8:27 ` Panu Matilainen
2016-03-02 10:47 ` Vincent JARDIN
2016-03-02 10:51 ` Jim Thompson
2016-03-02 12:03 ` Vincent JARDIN
2016-03-02 22:51 ` Jim Thompson
2016-03-02 11:21 ` Thomas Monjalon
2016-03-02 22:35 ` Thomas Monjalon
2016-03-03 8:31 ` Panu Matilainen
2016-03-03 10:05 ` Ferruh Yigit
2016-03-03 10:11 ` Thomas Monjalon
2016-03-03 10:51 ` Panu Matilainen
2016-03-10 0:04 ` Thomas Monjalon
2016-03-10 6:31 ` Vincent JARDIN
2016-03-02 22:18 ` Jay Rolette
2016-03-03 10:11 ` Ferruh Yigit
2016-03-03 16:59 ` Stephen Hemminger
2016-03-03 18:18 ` Ferruh Yigit
2016-02-29 11:27 ` Ferruh Yigit
2016-02-29 11:39 ` Avi Kivity
2016-02-29 14:35 ` Ferruh Yigit
2016-02-29 20:11 ` Stephen Hemminger
2016-03-01 0:35 ` Ferruh Yigit
2016-01-27 16:24 ` [dpdk-dev] [PATCH 2/3] rte_ctrl_if: add control interface library Ferruh Yigit
2016-01-28 11:14 ` Remy Horton
2016-01-28 13:15 ` Ferruh Yigit
2016-01-28 13:24 ` Jay Rolette
2016-01-28 13:56 ` Ferruh Yigit
2016-01-28 13:57 ` Ananyev, Konstantin
2016-01-28 14:22 ` Yigit, Ferruh
2016-01-27 16:24 ` [dpdk-dev] [PATCH 3/3] examples/ethtool: add control interface support to the application Ferruh Yigit
2016-02-12 13:45 ` [dpdk-dev] [PATCH v2 0/3] Use common Linux tools to control DPDK ports Ferruh Yigit
2016-02-12 13:45 ` [dpdk-dev] [PATCH v2 1/3] kcp: add kernel control path kernel module Ferruh Yigit
2016-02-12 13:45 ` [dpdk-dev] [PATCH v2 2/3] rte_ctrl_if: add control interface library Ferruh Yigit
2016-02-17 19:58 ` Ananyev, Konstantin
2016-02-18 10:43 ` Yigit, Ferruh
2016-02-12 13:45 ` [dpdk-dev] [PATCH v2 3/3] examples/ethtool: add control interface support to the application Ferruh Yigit
2016-02-17 19:39 ` Ananyev, Konstantin
2016-02-18 10:11 ` Yigit, Ferruh
2016-02-26 14:10 ` [dpdk-dev] [PATCH v3 0/4] Use common Linux tools to control DPDK ports Ferruh Yigit
2016-02-26 14:10 ` [dpdk-dev] [PATCH v3 1/4] lib/librte_ethtool: move librte_ethtool form examples to lib folder Ferruh Yigit
2016-02-26 14:10 ` [dpdk-dev] [PATCH v3 2/4] kcp: add kernel control path kernel module Ferruh Yigit
2016-03-01 1:02 ` Stephen Hemminger
2016-03-01 15:53 ` Ferruh Yigit
2016-02-26 14:10 ` [dpdk-dev] [PATCH v3 3/4] rte_ctrl_if: add control interface library Ferruh Yigit
2016-02-26 14:10 ` [dpdk-dev] [PATCH v3 4/4] examples/ethtool: add control interface support to the application Ferruh Yigit
2016-02-29 9:33 ` [dpdk-dev] [PATCH v3 0/4] Use common Linux tools to control DPDK ports Remy Horton
2016-03-01 15:41 ` Ferruh Yigit [this message]
2016-03-01 15:41 ` [dpdk-dev] [PATCH v4 1/4] lib/librte_ethtool: move librte_ethtool form examples to lib folder Ferruh Yigit
2016-03-01 15:41 ` [dpdk-dev] [PATCH v4 2/4] kcp: add kernel control path kernel module Ferruh Yigit
2016-03-01 23:06 ` Stephen Hemminger
2016-03-02 11:05 ` Ferruh Yigit
2016-03-01 23:09 ` Stephen Hemminger
2016-03-01 23:10 ` Stephen Hemminger
2016-03-02 11:06 ` Ferruh Yigit
2016-03-01 15:41 ` [dpdk-dev] [PATCH v4 3/4] rte_ctrl_if: add control interface library Ferruh Yigit
2016-03-01 15:42 ` [dpdk-dev] [PATCH v4 4/4] examples/ethtool: add control interface support to the application Ferruh Yigit
2016-03-09 11:41 ` [dpdk-dev] [PATCH v5 0/4] Use common Linux tools to control DPDK ports Ferruh Yigit
2016-03-09 11:41 ` [dpdk-dev] [PATCH v5 1/4] lib/librte_ethtool: move librte_ethtool form examples to lib folder Ferruh Yigit
2016-03-09 11:41 ` [dpdk-dev] [PATCH v5 2/4] kcp: add kernel control path kernel module Ferruh Yigit
2016-03-09 11:41 ` [dpdk-dev] [PATCH v5 3/4] rte_ctrl_if: add control interface library Ferruh Yigit
2016-03-09 11:41 ` [dpdk-dev] [PATCH v5 4/4] examples/ethtool: add control interface support to the application Ferruh Yigit
2016-03-09 12:23 ` Ananyev, Konstantin
2016-03-14 15:31 ` [dpdk-dev] [PATCH v5 0/4] Use common Linux tools to control DPDK ports Ferruh Yigit
2016-03-14 17:40 ` Jay Rolette
2016-03-15 0:00 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456846920-28770-1-git-send-email-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).