DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [RFC 0/3] Use common Linux tools to control DPDK ports
Date: Fri, 15 Jan 2016 16:18:01 +0000	[thread overview]
Message-ID: <1452874684-12750-1-git-send-email-ferruh.yigit@intel.com> (raw)

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.

Currently implementation is not complete, sample support added for the
RFC, more functionality can be added based on community response.

With this RFC Patch, supported: get/set mac address/mtu of DPDK devices,
getting stats from DPDK devices and some set of ethtool commands.

Samples:

$ ifconfig
dpdk0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 90:e2:ba:0e:49:b8  txqueuelen 1000  (Ethernet)
        RX packets 33  bytes 2058 (2.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 33  bytes 2058 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

dpdk1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1b:21:76:fa:21  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=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 90:e2:ba:0e:49:77  txqueuelen 1000  (Ethernet)
        RX packets 962  bytes 57798 (56.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 962  bytes 57798 (56.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


$ ethtool -i dpdk0
driver: rte_ixgbe_pmd
version: RTE 2.3.0-rc0
firmware-version: 
expansion-rom-version: 
bus-info: 0000:08:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no


$ ip l show dpdk0
25: dpdk0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noop state DOWN 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:77

$ ip l show dpdk0
25: dpdk0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 90:e2:ba:0e:49:77 brd ff:ff:ff:ff:ff:ff


Ferruh Yigit (3):
  rte_ctrl_if: add control interface library
  kcp: add kernel control path kernel module
  examples/ethtool: add control interface support to the application

 config/common_linuxapp                     |   9 +-
 examples/ethtool/ethtool-app/main.c        |   8 +-
 lib/Makefile                               |   3 +-
 lib/librte_ctrl_if/Makefile                |  58 +++++
 lib/librte_ctrl_if/rte_ctrl_if.c           | 166 ++++++++++++++
 lib/librte_ctrl_if/rte_ctrl_if.h           |  54 +++++
 lib/librte_ctrl_if/rte_ctrl_if_version.map |   9 +
 lib/librte_ctrl_if/rte_ethtool.c           | 354 +++++++++++++++++++++++++++++
 lib/librte_ctrl_if/rte_ethtool.h           |  64 ++++++
 lib/librte_ctrl_if/rte_nl.c                | 263 +++++++++++++++++++++
 lib/librte_ctrl_if/rte_nl.h                |  60 +++++
 lib/librte_eal/common/include/rte_log.h    |   3 +-
 lib/librte_eal/linuxapp/Makefile           |   5 +-
 lib/librte_eal/linuxapp/kcp/Makefile       |  58 +++++
 lib/librte_eal/linuxapp/kcp/kcp_dev.h      |  81 +++++++
 lib/librte_eal/linuxapp/kcp/kcp_ethtool.c  | 261 +++++++++++++++++++++
 lib/librte_eal/linuxapp/kcp/kcp_misc.c     | 282 +++++++++++++++++++++++
 lib/librte_eal/linuxapp/kcp/kcp_net.c      | 209 +++++++++++++++++
 lib/librte_eal/linuxapp/kcp/kcp_nl.c       | 194 ++++++++++++++++
 mk/rte.app.mk                              |   3 +-
 20 files changed, 2138 insertions(+), 6 deletions(-)
 create mode 100644 lib/librte_ctrl_if/Makefile
 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_ethtool.c
 create mode 100644 lib/librte_ctrl_if/rte_ethtool.h
 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/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_misc.c
 create mode 100644 lib/librte_eal/linuxapp/kcp/kcp_net.c
 create mode 100644 lib/librte_eal/linuxapp/kcp/kcp_nl.c

-- 
2.5.0

             reply	other threads:[~2016-01-15 16:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 16:18 Ferruh Yigit [this message]
2016-01-15 16:18 ` [dpdk-dev] [RFC 1/3] rte_ctrl_if: add control interface library Ferruh Yigit
2016-01-15 16:18 ` [dpdk-dev] [RFC 2/3] kcp: add kernel control path kernel module Ferruh Yigit
2016-01-15 16:18 ` [dpdk-dev] [RFC 3/3] examples/ethtool: add control interface support to the application Ferruh Yigit
2016-01-18 16:20 ` [dpdk-dev] [RFC 0/3] Use common Linux tools to control DPDK ports Aaron Conole
2016-01-19  9:59   ` Ferruh Yigit
2016-01-19 11:29     ` Panu Matilainen
2016-02-04 13:30       ` Ferruh Yigit
2016-02-04 13:38         ` Ferruh Yigit
2016-02-04 14:40         ` Aaron Conole
2016-02-04 16:28           ` Ferruh Yigit
2016-01-18 23:12 ` Stephen Hemminger
2016-01-18 23:48   ` Jay Rolette
2016-01-19  1:36     ` Stephen Hemminger
2016-01-19 10:08     ` 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=1452874684-12750-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).