Difference between revisions of "VPP/EC2 instance with SRIOV"

From fd.io
< VPP
Jump to: navigation, search
(VPP on an EC2 instance with SR-IOV support)
(EC2 multiple network interface)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
AWS EC2 network consists of VLAN. So DPDK should support vlan offload especially "strip on"
 
AWS EC2 network consists of VLAN. So DPDK should support vlan offload especially "strip on"
AWS Enhanced Networking SR-IOV VF NIC.
+
 
 +
AWS Enhanced Networking SR-IOV VF NIC. see detail at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html
  
 
= HowTo =
 
= HowTo =
 +
 +
== EC2 multiple network interface ==
 +
 +
Prepare two network interfaces
 +
 +
root@choonho-dev:~# ifconfig -a
 +
ens3      Link encap:Ethernet  HWaddr 02:12:c2:8b:bd:ee
 +
          inet addr:172.31.2.253  Bcast:172.31.15.255  Mask:255.255.240.0
 +
          inet6 addr: fe80::12:c2ff:fe8b:bdee/64 Scope:Link
 +
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
 +
          RX packets:172 errors:0 dropped:0 overruns:0 frame:0
 +
          TX packets:238 errors:0 dropped:0 overruns:0 carrier:0
 +
          collisions:0 txqueuelen:1000
 +
          RX bytes:25299 (25.2 KB)  TX bytes:26443 (26.4 KB)
 +
 +
ens4      Link encap:Ethernet  HWaddr 02:f8:f6:ae:24:88
 +
          BROADCAST MULTICAST  MTU:1500  Metric:1
 +
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 +
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 +
          collisions:0 txqueuelen:1000
 +
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 +
 +
lo        Link encap:Local Loopback
 +
          inet addr:127.0.0.1  Mask:255.0.0.0
 +
          inet6 addr: ::1/128 Scope:Host
 +
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
 +
          RX packets:162 errors:0 dropped:0 overruns:0 frame:0
 +
          TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
 +
          collisions:0 txqueuelen:1
 +
          RX bytes:11938 (11.9 KB)  TX bytes:11938 (11.9 KB)
 +
 +
 +
Check NIC is SR-IOV enabled Virtual Function NIC.
 +
 +
root@choonho-dev:~# ethtool -i ens4
 +
driver: ixgbevf
 +
version: 2.12.1-k
 +
firmware-version:
 +
expansion-rom-version:
 +
bus-info: 0000:00:04.0
 +
supports-statistics: yes
 +
supports-test: yes
 +
supports-eeprom-access: no
 +
supports-register-dump: yes
 +
supports-priv-flags: no
  
 
== Configuration ==
 
== Configuration ==
Line 17: Line 63:
 
     }
 
     }
 
   }
 
   }
 
  
 
= Running the example =
 
= Running the example =

Latest revision as of 01:06, 20 November 2017

VPP on an EC2 instance with SR-IOV support

AWS EC2 network consists of VLAN. So DPDK should support vlan offload especially "strip on"

AWS Enhanced Networking SR-IOV VF NIC. see detail at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html

HowTo

EC2 multiple network interface

Prepare two network interfaces

root@choonho-dev:~# ifconfig -a
ens3      Link encap:Ethernet  HWaddr 02:12:c2:8b:bd:ee 
         inet addr:172.31.2.253  Bcast:172.31.15.255  Mask:255.255.240.0
         inet6 addr: fe80::12:c2ff:fe8b:bdee/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
         RX packets:172 errors:0 dropped:0 overruns:0 frame:0
         TX packets:238 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:25299 (25.2 KB)  TX bytes:26443 (26.4 KB)

ens4      Link encap:Ethernet  HWaddr 02:f8:f6:ae:24:88
         BROADCAST MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:65536  Metric:1
         RX packets:162 errors:0 dropped:0 overruns:0 frame:0
         TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1
         RX bytes:11938 (11.9 KB)  TX bytes:11938 (11.9 KB)


Check NIC is SR-IOV enabled Virtual Function NIC.

root@choonho-dev:~# ethtool -i ens4
driver: ixgbevf
version: 2.12.1-k
firmware-version:
expansion-rom-version:
bus-info: 0000:00:04.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

Configuration

This is recommened config for dpdk section at /etc/vpp/startup.conf


 dpdk {
   dev default {
       num-rx-queues 2
       num-tx-queues 2
       vlan-strip-offload on
    }
 }

Running the example

The DPDK interface should be configured strip on at vlan offload

 DBGvpp# show hardware-interfaces  detail
             Name                Idx   Link  Hardware
 VirtualFunctionEthernet0/4/0       1     up   VirtualFunctionEthernet0/4/0
 Ethernet address 02:f8:f6:ae:24:88
 Intel 82599 VF
   carrier up full duplex speed 10000 mtu 9216
   pci id:            device 8086:10ed subsystem 0000:0000
   pci address:       0000:00:04.00
   max rx packet len: 9728
   max num of queues: rx 2 tx 2
   promiscuous:       unicast off all-multicast on
   vlan offload:      strip on filter off qinq off
   rx offload caps:   vlan-strip ipv4-cksum udp-cksum tcp-cksum
   tx offload caps:   vlan-insert ipv4-cksum udp-cksum tcp-cksum sctp-cksum
                      tcp-tso
   rss active:        ipv4-tcp ipv6-tcp-ex ipv6-tcp ipv6-udp ipv6-ex
   rss supported:     none
   rx queues 2, rx desc 1024, tx queues 1, tx desc 1024
   cpu socket 0
 
   tx frames ok                                         719
   tx bytes ok                                        72021
   rx frames ok                                         723
   rx bytes ok                                        72401
   extended stats:
     rx good packets                                    723
     tx good packets                                    719
     rx good bytes                                    72401
     tx good bytes                                    72021
     rx errors                                            0
     tx errors                                            0
     rx mbuf allocation errors                            0
     rx q0packets                                         0
     rx q0bytes                                           0
     rx q0errors                                          0
     rx q1packets                                         0
     rx q1bytes                                           0
     rx q1errors                                          0
     tx q0packets                                         0
     tx q0bytes                                           0
     rx multicast packets                                 0