[dpdk-dev,v3,2/3] test: Unit tests for mode 4

Message ID 54DC9353.2060209@intel.com (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Doherty, Declan Feb. 12, 2015, 11:49 a.m. UTC
On 29/01/15 08:51, Tomasz Kulasek wrote:
> This patch adds unit tests for mode 4. It is split into separate
> file to avoid problems with other modes that does not need to
> look into packets payload.
> This patch includes also a modification of maximum number of ports
> used in their tests for bonding modes 0-3 from 16 to 6.
>
> v3 changes
> - Patch re-created for current release to maintain consistency
>
>
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
> ---
>   app/test/Makefile                  |    1 +
>   app/test/test_link_bonding.c       |    2 +-
>   app/test/test_link_bonding_mode4.c | 1412 ++++++++++++++++++++++++++++++++++++
>   3 files changed, 1414 insertions(+), 1 deletion(-)
>   create mode 100644 app/test/test_link_bonding_mode4.c
>
>....
>

Hey Tomasz,

due to commit # ecd9d5193b85f22ff3d5fa76fb26d1363b293d94 which modified 
the initialize_eth_header API you need to make the following 
modification for a clean compilation.

                 initialize_ipv4_header(&pkt_ip_hdr.v4, ip_src[3], 
ip_dst[3], pktlen);
  

Patch

diff --git a/app/test/test_link_bonding_mode4.c 
b/app/test/test_link_bonding_mode4.c
index f8d0955..c35129f 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -684,7 +684,8 @@  generate_packets(struct ether_addr *src_mac,

         int retval;

-       initialize_eth_header(&pkt_eth_hdr, src_mac, dst_mac, 
vlan_enable, vlan_id);
+       initialize_eth_header(&pkt_eth_hdr, src_mac, dst_mac, ip4_type,
+                       vlan_enable, vlan_id);

         if (ip4_type)