All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bowers, AndrewX <andrewx.bowers@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next-queue v5 PATCH 6/7] i40e: Add support for	exposing VF port statistics via VFPR netdev on the host
Date: Mon, 30 Jan 2017 21:35:07 +0000	[thread overview]
Message-ID: <26D9FDECA4FBDD4AADA65D8E2FC68A4A0FA5D4DC@ORSMSX104.amr.corp.intel.com> (raw)
In-Reply-To: <1485392057-3261-7-git-send-email-sridhar.samudrala@intel.com>

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Sridhar Samudrala
> Sent: Wednesday, January 25, 2017 4:54 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next-queue v5 PATCH 6/7] i40e: Add support for
> exposing VF port statistics via VFPR netdev on the host
> 
> By default stats counted by HW are returned via the original
> ndo_get_stats64() api. Stats counted in SW are returned via
> ndo_get_offload_stats() api.
> 
> Small script to demonstrate vfpr stats in switchdev mode.
> PF: enp5s0f0, VFs: enp5s2,enp5s2f1 VFPRs:enp5s0f0-vf0, enp5s0f0-vf1
> 
> # rmmod i40e; modprobe i40e
> # devlink dev eswitch set pci/0000:05:00.0 mode switchdev # echo 2 >
> /sys/class/net/enp5s0f0/device/sriov_numvfs
> # ip link set enp5s0f0 vf 0 mac 00:11:22:33:44:55 # ip link set enp5s0f0 vf 1 mac
> 00:11:22:33:44:56 # rmmod i40evf; modprobe i40evf
> 
> /* Create 2 namespaces and move the VFs to the corresponding ns */ # ip
> netns add ns0 # ip link set enp5s2 netns ns0 # ip netns exec ns0 ip addr add
> 192.168.1.10/24 dev enp5s2 # ip netns exec ns0 ip link set enp5s2 up # ip
> netns add ns1 # ip link set enp5s2f1 netns ns1 # ip netns exec ns1 ip addr add
> 192.168.1.11/24 dev enp5s2f1 # ip netns exec ns1 ip link set enp5s2f1 up
> 
> /* bring up pf and vfpr netdevs */
> # ip link set enp5s0f0 up
> # ip link set enp5s0f0-vf0 up
> # ip link set enp5s0f0-vf1 up
> 
> /* Create a linux bridge and add vfpr netdevs to it. */ # ip link add vfpr-br
> type bridge # ip link set enp5s0f0-vf0 master vfpr-br # ip link set enp5s0f0-vf1
> master vfpr-br # ip addr add 192.168.1.1/24 dev vfpr-br # ip link set vfpr-br up
> 
> # ip netns exec ns0 ping -c3 192.168.1.11 # ip netns exec ns1 ping -c3
> 192.168.1.10
> 
> # ip netns exec ns0 ip -s l show enp5s2
> 56: enp5s2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq
> state UP mode DEFAULT group default qlen 1000
>     link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
>     RX: bytes  packets  errors  dropped overrun mcast
>     1468       18       0       0       0       0
>     TX: bytes  packets  errors  dropped carrier collsns
>     1398       17       0       0       0       0
> # ip -s l show enp5s0f0-vf0
> 52: enp5s0f0-vf0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
> fq_codel master vfpr-br state UP mode DEFAULT group default qlen 1000
>     link/ether 68:05:ca:2e:72:68 brd ff:ff:ff:ff:ff:ff
>     RX: bytes  packets  errors  dropped overrun mcast
>     1398       17       0       0       0       0
>     TX: bytes  packets  errors  dropped carrier collsns
>     1468       18       0       0       0       0
> # ip netns exec ns1 ip -s l show enp5s2f1
> 57: enp5s2f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq
> state UP mode DEFAULT group default qlen 1000
>     link/ether 00:11:22:33:44:56 brd ff:ff:ff:ff:ff:ff
>     RX: bytes  packets  errors  dropped overrun mcast
>     1486       18       0       0       0       0
>     TX: bytes  packets  errors  dropped carrier collsns
>     1538       19       0       0       0       0
> # ip -s l show enp5s0f0-vf1
> 53: enp5s0f0-vf1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
> fq_codel master vfpr-br state UP mode DEFAULT group default qlen 1000
>     link/ether 68:05:ca:2e:72:68 brd ff:ff:ff:ff:ff:ff
>     RX: bytes  packets  errors  dropped overrun mcast
>     1538       19       0       0       0       0
>     TX: bytes  packets  errors  dropped carrier collsns
>     1486       18       0       0       0       0
> 
> Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> Signed-off-by: Anjali Singhai <anjali.singhai@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  44 ++++++++-
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 108
> +++++++++++++++++++++
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |  10 ++
>  3 files changed, 160 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



  reply	other threads:[~2017-01-30 21:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  0:54 [Intel-wired-lan] [next-queue v5 PATCH 0/7] i40e: Add VF Port Representator support for SR-IOV VFs Sridhar Samudrala
2017-01-26  0:54 ` [Intel-wired-lan] [next-queue v5 PATCH 1/7] i40e: Introduce devlink interface Sridhar Samudrala
2017-01-30 21:33   ` Bowers, AndrewX
2017-01-26  0:54 ` [Intel-wired-lan] [next-queue v5 PATCH 2/7] i40e: Introduce VF Port Representator(VFPR) netdevs Sridhar Samudrala
2017-01-30 21:33   ` Bowers, AndrewX
2017-02-01  1:06   ` Keller, Jacob E
2017-01-26  0:54 ` [Intel-wired-lan] [next-queue v5 PATCH 3/7] i40e: Sync link state between VFs and VFPRs Sridhar Samudrala
2017-01-30 21:34   ` Bowers, AndrewX
2017-01-26  0:54 ` [Intel-wired-lan] [next-queue v5 PATCH 4/7] net: store port/representator id in metadata_dst Sridhar Samudrala
2017-01-30 21:36   ` Bowers, AndrewX
2017-01-26  0:54 ` [Intel-wired-lan] [next-queue v5 PATCH 5/7] i40e: Add TX and RX support in switchdev mode Sridhar Samudrala
2017-01-30 21:34   ` Bowers, AndrewX
2017-02-15 15:59   ` Alexander Duyck
2017-02-15 17:37     ` Samudrala, Sridhar
2017-02-15 17:51       ` Alexander Duyck
2017-01-26  0:54 ` [Intel-wired-lan] [next-queue v5 PATCH 6/7] i40e: Add support for exposing VF port statistics via VFPR netdev on the host Sridhar Samudrala
2017-01-30 21:35   ` Bowers, AndrewX [this message]
2017-02-01  1:05   ` Keller, Jacob E
2017-02-01 18:21   ` Keller, Jacob E
2017-01-26  0:54 ` [Intel-wired-lan] [next-queue v5 PATCH 7/7] i40e: Add support to get switch id and port number for VFPR netdevs Sridhar Samudrala
2017-01-30 21:35   ` Bowers, AndrewX

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=26D9FDECA4FBDD4AADA65D8E2FC68A4A0FA5D4DC@ORSMSX104.amr.corp.intel.com \
    --to=andrewx.bowers@intel.com \
    --cc=intel-wired-lan@osuosl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.