[dpdk-dev] [PATCH] examples/l3fwd: force CRC stripping for i40evf

2016-11-10 Thread Yao, Lei A
I'm testing some DPDK sample under VMware. During the testing work, I find 
l3fwd+ ixgbe vf can work ,but  L3fwd + i40evf  can't work. So I reported this 
issue to Bjorn. From my perspective, if can add new parameter in l3fwd sample 
like what have already don?t in  testpmd "crc-strip enable" is a better way 
to resolve this issue. 

Lei 

-Original Message-
From: Topel, Bjorn 
Sent: Wednesday, November 9, 2016 9:10 PM
To: Zhang, Helin ; Ananyev, Konstantin 
; dev at dpdk.org
Cc: Xu, Qian Q ; Yao, Lei A ; 
Wu, Jingjing ; thomas.monjalon at 6wind.com
Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: force CRC stripping for i40evf

Bj?rn/Konstantin wrote:
>> Finally, why doesn't l3fwd have the CRC stripped?
>
> I don?t know any good reason for that for l3fwd or any other sample 
> app. I think it is just a 'historical' reason.

Ok! Then I'd suggest changing the l3fwd default to actually *strip* CRC instead 
of not doing it. Lei, any comments?

Helin wrote:
> Yes, i40e driver changed a little bit on that according to the review 
> comments during implementation, comparing to igb and ixgbe.
> I'd suggest to re-invesitgate if we can do the similar thing in igb 
> and ixgbe driver.

Good. Let's do that!

> Any critical issue now? Or just an improvement comments?

Not from my perspective. The issue is that Lei needs some kind of work-around 
for l3fwd with i40evf, so I'll let Lei comment on how critical it is.


Bj?rn


[dpdk-dev] [PATCH] examples/l3fwd: force CRC stripping for i40evf

2016-11-09 Thread Yao, Lei A
Tested-by: Lei Yao 
- Apply patch to v16.11-rc3
- Compile: Pass
- Host OS: VMware ESXi 6.0
- VM OS: Fedora 20
- GCC: 4.8.3

Tested with this patch, l3fwd sample can work with i40e VF with Fedora VM using 
VMware as the host.

-Original Message-
From: Topel, Bjorn 
Sent: Wednesday, November 9, 2016 4:24 PM
To: dev at dpdk.org
Cc: Xu, Qian Q ; Yao, Lei A ; 
Wu, Jingjing ; thomas.monjalon at 6wind.com; Topel, 
Bjorn 
Subject: [PATCH] examples/l3fwd: force CRC stripping for i40evf

Commit 1bbcc5d21129 ("i40evf: report error for unsupported CRC stripping 
config") broke l3fwd, since it was forcing that CRC was kept. Now, if i40evf is 
running, CRC stripping will be enabled.

Signed-off-by: Bj?rn T?pel 
---
 examples/l3fwd/main.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 
7223e773107e..b60278794135 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -906,6 +906,14 @@ main(int argc, char **argv)
n_tx_queue = MAX_TX_QUEUE_PER_PORT;
printf("Creating queues: nb_rxq=%d nb_txq=%u... ",
nb_rx_queue, (unsigned)n_tx_queue );
+   rte_eth_dev_info_get(portid, _info);
+   if (dev_info.driver_name &&
+   strcmp(dev_info.driver_name, "net_i40e_vf") == 0) {
+   /* i40evf require that CRC stripping is enabled. */
+   port_conf.rxmode.hw_strip_crc = 1;
+   } else {
+   port_conf.rxmode.hw_strip_crc = 0;
+   }
ret = rte_eth_dev_configure(portid, nb_rx_queue,
(uint16_t)n_tx_queue, _conf);
if (ret < 0)
@@ -946,7 +954,6 @@ main(int argc, char **argv)
printf("txq=%u,%d,%d ", lcore_id, queueid, socketid);
fflush(stdout);

-   rte_eth_dev_info_get(portid, _info);
txconf = _info.default_txconf;
if (port_conf.rxmode.jumbo_frame)
txconf->txq_flags = 0;
--
2.9.3



[dpdk-dev] [PATCH v2 00/10] net/virtio: fix queue reconfigure issue

2016-11-07 Thread Yao, Lei A
Tested-by: Lei Yao 
- Apply patch to v16.11-rc2
- Compile: Pass
- OS: Ubuntu16.04 4.4.0-45-generic
- GCC: 5.4.0

Most of the basic Virtio related test cases are tested with this patch. No 
function issue found and no obvious performance drop. The following is the pass 
case list:
TC1:? vhost/virtio PVP vector performance ?
TC2:? vhost/virtio PVP normal path performance 
TC3:? vhost/virtio PVP mergeable path performance 
TC7: vhost/virtio-net PVP ipv4 fwd normal path performance
TC8: vhost/virtio-net PVP ipv4 fwd mergeable path performance
TC9: vhost/virtio-net VM2VM iperf with TSO enabled performance
TC11: vhost/virtio-pmd PVP with 2q 2c vector performance
TC12: vhost/virtio-pmd PVP with 2q 1c vector performance
TC16: vhost/virtio1.0 PVP normal performance
TC17: vhost/virtio 1.0 PVP mergeable performance
TC18: vhost/virtio 1.0 PVP vector performance(should be same as normal)
TC19: dpdk vhost + virtio-pmd PVP vector performance
TC20: dpdk vhost + virtio-pmd PVP non-vector performance
TC21: dpdk vhost + virtio-pmd PVP mergeable performance
TC25: Test Vhost/virtio-pmd PVP vector performance with qemu2.5
TC26: Test Vhost/virtio-pmd PVP vector performance with qemu2.6
TC27: Test Vhost/virtio-pmd PVP vector performance with qemu2.7
test vhost-user reconnect with virtio-pmd
test virtio-pmd reconnect with vhost-user 
test vhost-user reconnect with multi virtio-pmd
multi test virtio-pmd reconnect with vhost-user

-Original Message-
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Yuanhan Liu
Sent: Saturday, November 5, 2016 5:41 PM
To: dev at dpdk.org
Cc: Thomas Monjalon ; Tan, Jianfeng ; Kevin Traynor ; Ilya Maximets 
; Kyle Larose ; Maxime 
Coquelin ; Yuanhan Liu 
Subject: [dpdk-dev] [PATCH v2 00/10] net/virtio: fix queue reconfigure issue

This patchset fixes few issues related to virtio queue reconfigure:
increase or shrink the queue number. The major issue and the reason behind is 
described with length details in patch 4 "net/virtio: allocate queue at init 
stage".

Those bugs can not be fixed by few lines of code, it's because the current 
driver init logic is quite wrong, that I need change quite many places to make 
it right. Meanwhile, I have already done my best to keep the changes being as 
minimal as possible, so that we could have fewer changes to break something 
else; also, it's would be easier for review.

v2: - fix two more minor issues regarding to queue enabling; see patch 9
  and 10.
- refined commit log a bit.

Thanks.

--yliu

---
Yuanhan Liu (10):
  net/virtio: revert fix restart
  net/virtio: simplify queue memzone name
  net/virtio: simplify queue allocation
  net/virtio: allocate queue at init stage
  net/virtio: initiate vring at init stage
  net/virtio: move queue configure code to proper place
  net/virtio: complete init stage at the right place
  net/virtio: remove started field
  net/virtio: fix less queues being enabled issue
  net/virtio: fix multiple queue enabling

 drivers/net/virtio/virtio_ethdev.c | 248 +--  
drivers/net/virtio/virtio_ethdev.h |  16 --
 drivers/net/virtio/virtio_pci.h|   3 +-
 drivers/net/virtio/virtio_rxtx.c   | 291 -
 drivers/net/virtio/virtqueue.h |   7 +
 5 files changed, 237 insertions(+), 328 deletions(-)

--
1.9.0



[dpdk-dev] [PATCH v3 02/12] net/virtio: setup and start cq in configure callback

2016-11-02 Thread Yao, Lei A
Hi, Olivier

During the validation work with v16.11-rc2, I find that this patch will cause 
VM crash if enable virtio bonding in VM. Could you have a check at your side? 
The following is steps at my side. Thanks a lot

1. bind PF port to igb_uio.
modprobe uio
insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
./tools/dpdk-devbind.py --bind=igb_uio 84:00.1

2. start vhost switch.
./examples/vhost/build/vhost-switch -c 0x1c -n 4 --socket-mem 4096,4096 - 
-p 0x1 --mergeable 0 --vm2vm 0 --socket-file ./vhost-net

3. bootup one vm with four virtio net device
qemu-system-x86_64 \
-name vm0 -enable-kvm -chardev 
socket,path=/tmp/vm0_qga0.sock,server,nowait,id=vm0_qga0 \
-device virtio-serial -device 
virtserialport,chardev=vm0_qga0,name=org.qemu.guest_agent.0 \
-daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait \
-net nic,vlan=0,macaddr=00:00:00:c7:56:64,addr=1f \
net user,vlan=0,hostfwd=tcp:10.239.129.127:6107:22 \
-chardev socket,id=char0,path=./vhost-net \
-netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \
-device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:01 \
-chardev socket,id=char1,path=./vhost-net \
-netdev type=vhost-user,id=netdev1,chardev=char1,vhostforce \
-device virtio-net-pci,netdev=netdev1,mac=52:54:00:00:00:02 \
-chardev socket,id=char2,path=./vhost-net \
-netdev type=vhost-user,id=netdev2,chardev=char2,vhostforce \
-device virtio-net-pci,netdev=netdev2,mac=52:54:00:00:00:03 \
-chardev socket,id=char3,path=./vhost-net \
-netdev type=vhost-user,id=netdev3,chardev=char3,vhostforce \
-device virtio-net-pci,netdev=netdev3,mac=52:54:00:00:00:04 \
-cpu host -smp 8 -m 4096 \
-object memory-backend-file,id=mem,size=4096M,mem-path=/mnt/huge,share=on \
-numa node,memdev=mem -mem-prealloc -drive file=/home/osimg/ubuntu16.img -vnc 
:10

4. on vm:
bind virtio net device to igb_uio
modprobe uio
insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
tools/dpdk-devbind.py --bind=igb_uio 00:04.0 00:05.0 00:06.0 00:07.0
5. startup test_pmd app
./x86_64-native-linuxapp-gcc/app/testpmd -c 0x1f -n 4 - -i --txqflags=0xf00 
--disable-hw-vlan-filter
6. create one bonding device (port 4)
create bonded device 0 0 (the first 0: mode, the second: the socket number)
show bonding config 4
7. bind port 0, 1, 2 to port 4
add bonding slave 0 4
add bonding slave 1 4
add bonding slave 2 4
port start 4
Result: just after port start 4(port 4 is bonded port), the vm shutdown 
immediately.

BRs
Lei

-Original Message-
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Olivier Matz
Sent: Thursday, October 13, 2016 10:16 PM
To: dev at dpdk.org; yuanhan.liu at linux.intel.com
Cc: Ananyev, Konstantin ; Chandran, Sugesh 
; Richardson, Bruce ; Tan, Jianfeng ; Zhang, Helin 
; adrien.mazarguil at 6wind.com; stephen at 
networkplumber.org; dprovan at bivio.net; Wang, Xiao W ; maxime.coquelin at redhat.com
Subject: [dpdk-dev] [PATCH v3 02/12] net/virtio: setup and start cq in 
configure callback

Move the configuration of control queue in the configure callback.
This is needed by next commit, which introduces the reinitialization of the 
device in the configure callback to change the feature flags.
Therefore, the control queue will have to be restarted at the same place.

As virtio_dev_cq_queue_setup() is called from a place where
config->max_virtqueue_pairs is not available, we need to store this in
the private structure. It replaces max_rx_queues and max_tx_queues which have 
the same value. The log showing the value of max_rx_queues and max_tx_queues is 
also removed since config->max_virtqueue_pairs is already displayed above.

Signed-off-by: Olivier Matz 
Reviewed-by: Maxime Coquelin 
---
 drivers/net/virtio/virtio_ethdev.c | 43 +++---
 drivers/net/virtio/virtio_ethdev.h |  4 ++--
 drivers/net/virtio/virtio_pci.h|  3 +--
 3 files changed, 24 insertions(+), 26 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c 
b/drivers/net/virtio/virtio_ethdev.c
index 77ca569..f3921ac 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -552,6 +552,9 @@ virtio_dev_close(struct rte_eth_dev *dev)
if (hw->started == 1)
virtio_dev_stop(dev);

+   if (hw->cvq)
+   virtio_dev_queue_release(hw->cvq->vq);
+
/* reset the NIC */
if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
vtpci_irq_config(hw, VIRTIO_MSI_NO_VECTOR); @@ -1191,16 +1194,7 
@@ virtio_init_device(struct rte_eth_dev *eth_dev)
config->max_virtqueue_pairs = 1;
}

-   hw->max_rx_queues =
-   (VIRTIO_MAX_RX_QUEUES < config->max_virtqueue_pairs) ?
-   VIRTIO_MAX_RX_QUEUES : config->max_virtqueue_pairs;
-   hw->max_tx_queues =
-   (VIRTIO_MAX_TX_QUEUES < config->max_virtqueue_pairs) ?
-   VIRTIO_MAX_TX_QUEUES : config->max_virtqueue_pairs;
-
-   

[dpdk-dev] [PATCH] vhost: add pmd xstats

2016-08-30 Thread Yao, Lei A
Hi, Qian

The test setup at my side is Vhost/VirtIO loopback with 64B packets.


-Original Message-
From: Xu, Qian Q 
Sent: Tuesday, August 30, 2016 11:03 AM
To: Yao, Lei A ; Yang, Zhiyong ; Panu Matilainen ; Thomas Monjalon 
; Yuanhan Liu 
Cc: dev at dpdk.org
Subject: RE: [dpdk-dev] [PATCH] vhost: add pmd xstats

Lei
Could you list the test setup for below findings? I think we need at least to 
check below tests for mergeable=on/off path: 
1. Vhost/virtio loopback
2. PVP test : virtio-pmd IO fwd and virtio-net IPV4 fwd

-Original Message-
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Yao, Lei A
Sent: Tuesday, August 30, 2016 10:46 AM
To: Yang, Zhiyong ; Panu Matilainen ; Thomas Monjalon ; Yuanhan Liu 

Cc: dev at dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: add pmd xstats

Hi, Zhiyong

I have tested more  xstats performance drop data at my side.
Vhost Xstats patch  with mergeable on :  ~3% Vhost Xstats patch with  mergeable 
off : ~9%

Because Zhihong also submit patch to improve the performance on for the 
mergeable on: http://dpdk.org/dev/patchwork/patch/15245/  ~15249. If both 
patch integrated, the performance drop will be much higher 
Vhsot Xstats patch + Vhost mergeable on patch   with mergeable on : the 
performance drop is around  6%


Best Regards
Lei

-Original Message-
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Yang, Zhiyong
Sent: Thursday, August 25, 2016 5:22 PM
To: Panu Matilainen ; Thomas Monjalon ; Yuanhan Liu 
Cc: dev at dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: add pmd xstats



> -Original Message-
> From: Panu Matilainen [mailto:pmatilai at redhat.com]
> Sent: Wednesday, August 24, 2016 8:37 PM
> To: Thomas Monjalon ; Yuanhan Liu 
> 
> Cc: dev at dpdk.org; Yang, Zhiyong 
> Subject: Re: [dpdk-dev] [PATCH] vhost: add pmd xstats
> 
> On 08/24/2016 11:44 AM, Thomas Monjalon wrote:
> > 2016-08-24 13:46, Yuanhan Liu:
> >> On Tue, Aug 23, 2016 at 12:45:54PM +0300, Panu Matilainen wrote:
> >>>>>> Since collecting data of vhost_update_packet_xstats will have 
> >>>>>> some effect on RX/TX performance, so, Setting compiling switch 
> >>>>>> CONFIG_RTE_LIBRTE_PMD_VHOST_UPDATE_XSTATS=n by default
> in the
> >>>>> file
> >>>>>> config/common_base, if needing xstats data, you can enable it(y).
> >>>>>
> >>>>> NAK, such things need to be switchable at run-time.
> >>>>>
> >>>>> - Panu -
> >>>>
> >>>> Considering the following reasons using the compiler switch, not 
> >>>> command-line at run-time.
> >>>>
> >>>> 1.Similar xstats update functions are always collecting stats 
> >>>> data in the background when rx/tx are running, such as the 
> >>>> physical NIC or virtio, which have no switch. Compiler switch for 
> >>>> vhost pmd xstats is added as a option when performance is viewed 
> >>>> as critical
> factor.
> >>>>
> >>>> 2. No data structure and API in any layer support the xstats 
> >>>> update switch at run-time. Common data structure (struct
> >>>> rte_eth_dev_data) has no device-specific data member, if 
> >>>> implementing enable/disable of vhost_update _packet_xstats at 
> >>>> run-time, must define a
> >>>> flag(device-specific) in it, because the definition of struct 
> >>>> vhost_queue in the driver code (eth_vhost_rx/eth_vhost_tx
> processing)is not visible from device perspective.
> >>>>
> >>>> 3. I tested RX/TX with v1 patch (y) as reference based on
> >>>> Intel(R)
> >>>> Xeon(R) CPU E5-2699 v3 @ 2.30GHz, for 64byts packets in burst 
> >>>> mode,
> >>>> 32 packets in one RX/TX processing. Overhead of 
> >>>> vhost_update_packet_xstats is less than 3% for the rx/tx 
> >>>> processing. It looks that vhost_update_packet_xstats has a 
> >>>> limited
> effect on performance drop.
> >>>
> >>> Well, either the performance overhead is acceptable and it should 
> >>> always be on (like with physical NICs I think). Or it is not. In 
> >>> which case it needs to be turnable on and off, at run-time.
> >>> Rebuilding is not an option in the world of distros.
> >>
> >> I think the less than 3% overhead is acceptable here, that I agree 
> >> with Panu we should always keep it on. If someone compains it later 
> >> that even 3% is too big for them, let's consider to make it be 
> >> switchable at run-time. Either we 

[dpdk-dev] [PATCH] vhost: add pmd xstats

2016-08-30 Thread Yao, Lei A
Hi, Zhiyong

I have tested more  xstats performance drop data at my side.
Vhost Xstats patch  with mergeable on :  ~3%
Vhost Xstats patch with  mergeable off : ~9%

Because Zhihong also submit patch to improve the performance on for the 
mergeable on: http://dpdk.org/dev/patchwork/patch/15245/  ~15249. If both 
patch integrated, the performance drop will be much higher 
Vhsot Xstats patch + Vhost mergeable on patch   with mergeable on : the 
performance drop is around  6%


Best Regards
Lei

-Original Message-
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Yang, Zhiyong
Sent: Thursday, August 25, 2016 5:22 PM
To: Panu Matilainen ; Thomas Monjalon ; Yuanhan Liu 
Cc: dev at dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: add pmd xstats



> -Original Message-
> From: Panu Matilainen [mailto:pmatilai at redhat.com]
> Sent: Wednesday, August 24, 2016 8:37 PM
> To: Thomas Monjalon ; Yuanhan Liu 
> 
> Cc: dev at dpdk.org; Yang, Zhiyong 
> Subject: Re: [dpdk-dev] [PATCH] vhost: add pmd xstats
> 
> On 08/24/2016 11:44 AM, Thomas Monjalon wrote:
> > 2016-08-24 13:46, Yuanhan Liu:
> >> On Tue, Aug 23, 2016 at 12:45:54PM +0300, Panu Matilainen wrote:
> >> Since collecting data of vhost_update_packet_xstats will have 
> >> some effect on RX/TX performance, so, Setting compiling switch 
> >> CONFIG_RTE_LIBRTE_PMD_VHOST_UPDATE_XSTATS=n by default
> in the
> > file
> >> config/common_base, if needing xstats data, you can enable it(y).
> >
> > NAK, such things need to be switchable at run-time.
> >
> > - Panu -
> 
>  Considering the following reasons using the compiler switch, not 
>  command-line at run-time.
> 
>  1.Similar xstats update functions are always collecting stats 
>  data in the background when rx/tx are running, such as the 
>  physical NIC or virtio, which have no switch. Compiler switch for 
>  vhost pmd xstats is added as a option when performance is viewed 
>  as critical
> factor.
> 
>  2. No data structure and API in any layer support the xstats 
>  update switch at run-time. Common data structure (struct 
>  rte_eth_dev_data) has no device-specific data member, if 
>  implementing enable/disable of vhost_update _packet_xstats at 
>  run-time, must define a
>  flag(device-specific) in it, because the definition of struct 
>  vhost_queue in the driver code (eth_vhost_rx/eth_vhost_tx
> processing)is not visible from device perspective.
> 
>  3. I tested RX/TX with v1 patch (y) as reference based on 
>  Intel(R)
>  Xeon(R) CPU E5-2699 v3 @ 2.30GHz, for 64byts packets in burst 
>  mode,
>  32 packets in one RX/TX processing. Overhead of 
>  vhost_update_packet_xstats is less than 3% for the rx/tx 
>  processing. It looks that vhost_update_packet_xstats has a 
>  limited
> effect on performance drop.
> >>>
> >>> Well, either the performance overhead is acceptable and it should 
> >>> always be on (like with physical NICs I think). Or it is not. In 
> >>> which case it needs to be turnable on and off, at run-time.
> >>> Rebuilding is not an option in the world of distros.
> >>
> >> I think the less than 3% overhead is acceptable here, that I agree 
> >> with Panu we should always keep it on. If someone compains it later 
> >> that even 3% is too big for them, let's consider to make it be 
> >> switchable at run-time. Either we could introduce a generic eth API 
> >> for that, Or just introduce a vhost one if that doesn't make too 
> >> much sense to other eth drivers.
> >
> > +1
> > It may have sense to introduce a generic run-time option for stats.
> >
> 
> Yup, sounds good.
> 
It sounds better , if DPDK can add generic API and structure to the switch of 
xstats update. So, any device can use it at run time if necessary.

Can we define one bit data member (xstats_update) in the data structure struct 
rte_eth_dev_data?
such as:
uint8_t promiscuous : 1, /**< RX promiscuous mode ON(1) / OFF(0). */
scattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */
all_multicast : 1, /**< RX all multicast mode ON(1) / OFF(0). */
dev_started : 1,   /**< Device state: STARTED(1) / STOPPED(0). */
lro : 1,   /**< RX LRO is ON(1) / OFF(0) */
xstats_update: 1;   /**< xstats update is ON(1) / OFF(0) */

Define 3 functions:

void rte_eth_xstats_update_enable(uint8_t port_id); void 
rte_eth_xstats_update_disable(uint8_t port_id); int 
rte_eth_xstats_update_get(uint8_t port_id);

Or define two:

/* uint8_t xstats_update ; 1 on, 0 off*/ void 
rte_eth_xstats_update_enable(uint8_t port_id, uint8_t xstats_update); int 
rte_eth_xstats_update_get(uint8_t port_id);

In the struct eth_dev_ops, adding two functions to pass xstats_update to 
driver, because the rxq/txq can't access xstats_update directly.
So, add a xstats flag per queue data structure. 
for example
struct vhost_queue {
..
  

[dpdk-dev] [PATCH v3] i40e: enable i40e pmd on ARM platform

2016-08-10 Thread Yao, Lei A
Hi, Jianbo

I have tested you patch , this v3 patch didn't impact the performance on X86 
platform. 
Non-vector PMD single core performance with patch   :  ~35 Mpps
Non-vector PMD single core performance without patch:  ~35 Mpps

BRs
Lei

-Original Message-
Date: Fri,  5 Aug 2016 14:36:23 +0530
From: Jianbo Liu 
To: dev at dpdk.org,helin.zhang at intel.com,   jingjing.wu at intel.com
Cc: Jianbo Liu 
Subject: [dpdk-dev] [PATCH v3] i40e: enable i40e pmd on ARM platform
Message-ID: <1470387983-12713-1-git-send-email-jianbo.liu at linaro.org>

And add read memory barrier to avoid status inconsistency between two RX 
descriptors readings.

Signed-off-by: Jianbo Liu 
---
 config/defconfig_arm64-armv8a-linuxapp-gcc | 2 +-
 doc/guides/nics/features/i40e.ini  | 1 +
 drivers/net/i40e/i40e_rxtx.c   | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/config/defconfig_arm64-armv8a-linuxapp-gcc 
b/config/defconfig_arm64-armv8a-linuxapp-gcc
index 1a17126..08f282b 100644
--- a/config/defconfig_arm64-armv8a-linuxapp-gcc
+++ b/config/defconfig_arm64-armv8a-linuxapp-gcc
@@ -46,6 +46,6 @@ CONFIG_RTE_EAL_IGB_UIO=n

 CONFIG_RTE_LIBRTE_IVSHMEM=n
 CONFIG_RTE_LIBRTE_FM10K_PMD=n
-CONFIG_RTE_LIBRTE_I40E_PMD=n
+CONFIG_RTE_LIBRTE_I40E_INC_VECTOR=n

 CONFIG_RTE_SCHED_VECTOR=n
diff --git a/doc/guides/nics/features/i40e.ini 
b/doc/guides/nics/features/i40e.ini
index fb3fb60..0d143bc 100644
--- a/doc/guides/nics/features/i40e.ini
+++ b/doc/guides/nics/features/i40e.ini
@@ -45,3 +45,4 @@ Linux UIO= Y
 Linux VFIO   = Y
 x86-32   = Y
 x86-64   = Y
+ARMv8= Y
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 
554d167..57825fb 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -994,6 +994,8 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
I40E_RXD_QW1_STATUS_SHIFT;
}

+   rte_smp_rmb();
+
/* Compute how many status bits were set */
for (j = 0, nb_dd = 0; j < I40E_LOOK_AHEAD; j++)
nb_dd += s[j] & (1 << I40E_RX_DESC_STATUS_DD_SHIFT);
--
2.4.11






[dpdk-dev] [PATCH] i40e: enable i40e pmd on ARM platform

2016-08-03 Thread Yao, Lei A
Hi, Jianbo

I have tested you patch on my X86 platform,  the single core performance for 
Non-vector PMD will have about 1Mpps drop
Non-vector PMD single core performance with patch   :  ~33.9 Mpps
Non-vector PMD single core performance without patch:  ~35.1 Mpps
Is there any way to avoid such performance drop on X86? Thanks.

BRs
Lei

-Original Message-
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jianbo Liu
Sent: Tuesday, August 2, 2016 2:58 PM
To: dev at dpdk.org; Zhang, Helin ; Wu, Jingjing 

Cc: Jianbo Liu 
Subject: [dpdk-dev] [PATCH] i40e: enable i40e pmd on ARM platform

And add read memory barrier to avoid status inconsistency between two RX 
descriptors readings.

Signed-off-by: Jianbo Liu 
---
 config/defconfig_arm64-armv8a-linuxapp-gcc | 2 +-
 doc/guides/nics/overview.rst   | 2 +-
 drivers/net/i40e/i40e_rxtx.c   | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config/defconfig_arm64-armv8a-linuxapp-gcc 
b/config/defconfig_arm64-armv8a-linuxapp-gcc
index 1a17126..08f282b 100644
--- a/config/defconfig_arm64-armv8a-linuxapp-gcc
+++ b/config/defconfig_arm64-armv8a-linuxapp-gcc
@@ -46,6 +46,6 @@ CONFIG_RTE_EAL_IGB_UIO=n

 CONFIG_RTE_LIBRTE_IVSHMEM=n
 CONFIG_RTE_LIBRTE_FM10K_PMD=n
-CONFIG_RTE_LIBRTE_I40E_PMD=n
+CONFIG_RTE_LIBRTE_I40E_INC_VECTOR=n

 CONFIG_RTE_SCHED_VECTOR=n
diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst index 
6abbae6..5175591 100644
--- a/doc/guides/nics/overview.rst
+++ b/doc/guides/nics/overview.rst
@@ -138,7 +138,7 @@ Most of these differences are summarized below.
Linux VFIO Y Y   Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y  
   Y   Y Y
Other kdrv Y Y  
 Y
ARMv7   
 Y Y Y
-   ARMv8  Y Y Y Y  
 Y Y   Y Y
+   ARMv8  Y   Y Y Y Y  
 Y Y   Y Y
Power8 Y Y  
 Y
TILE-Gx 
 Y
x86-32 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y  
 Y   Y Y Y
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 
554d167..4004b8e 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -994,6 +994,8 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
I40E_RXD_QW1_STATUS_SHIFT;
}

+   rte_rmb();
+
/* Compute how many status bits were set */
for (j = 0, nb_dd = 0; j < I40E_LOOK_AHEAD; j++)
nb_dd += s[j] & (1 << I40E_RX_DESC_STATUS_DD_SHIFT);
--
2.4.11