[dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)

2015-03-04 Thread Jiajia, SunX
face name of your client.

Step2:

  Send ARP request packet tagged with VLAN header to bond0 from each 
client, verify bond0 will
  choose different slave to reply the request by the policy of round-robin. 
The VLAN header will not
  affect the policy of choosing slave to reply the request.
  You can use the scapy to send these packet as below:

  >>> eth = Ether(src='choose-client-port-mac')
  >>> arp = ARP(hwsrc='choose-client-port-mac', psrc='choose-port-ip', 
pdst='7.0.0.10')
  >>> dot1q = Dot1Q(vlan=1)
  >>> packet = eth/dot1q/arp
  >>> recv = srp1(packet, iface='choose-port-interface-name', timeout=2)

Test Case3: Mode 6(Adaptive load balance) TX test of mode6
=

Verify bond device can transmit load balance.

Use Setup#3

Use scapy to send 1000 IP packets to bond0, verify slave0, slave1 and slave2 
will transmit packets like this:
average = packet_num / slave_num; average*0.9 < slave_transmit_num < 
1.1*average; so each slave
will receive packets between 300 and 367.

You can use scapy to send packets as below:

>>> eth = Ether(src='choose-client-port-mac')
>>> ip = IP(len=66, dst='7.0.0.10')
>>> packet = eth/ip
>>> sendp(packet, iface='choose-port-interface-name', count=1000)



> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Declan Doherty
> Sent: Saturday, February 21, 2015 1:45 AM
> To: Jastrzebski, MichalX K; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)
> 
> On 20/02/15 16:09, Michal Jastrzebski wrote:
> > v4 changes:
> > - license year modified
> > - aded license to rte_eth_bond_alb files
> > - removed RTE_EXEC_ENV_BAREMETAL in #define
> >
> > v3 changes:
> > - completed description for mode 5 unit tests patch
> > - fixed errors required by checkpatch.pl
> > - moved patch version changes from patches to cover-letter
> >
> > v2 changes:
> > in mode 6 patch 2/6:
> > - add VLAN support
> > - fixed sending duplicated ARPupdates
> > - fixed assigning slaves for next clients
> > - fixed TLB mode
> >
> > in debug patch 3/6:
> > - add IPv4 RX/TX information
> > - add mode6_debug(..) function
> >
> > in the example application patch 4/6:
> > - remove count parameter from send command
> > - fixed quit command to use cmdline_quit(cl)
> > - add echo function - all IPv4 packets will be retransmitted. Bonding
> > driver will use TLB policy - this will show how TX works in mode
> 6
> > - remove unused structures rx_conf_default and tx_conf_default
> > - add VLAN support
> > - remove unnecessary comments
> > - nodify show command in term of printing DEBUG informations
> >
> > This patchset add support for link bonding mode 6.
> > Additionally it changes an arp_header structure definition.
> > Also a basic example is introduced. Using this example,
> > Bonding will configure each client ARP table,
> > that packets from each client will be received on different slave,
> > mode 6 uses round-robin policy to assign slave to client IP address.
> >
> > Daniel Mrzyglod (1):
> >bond: modify TLB unit tests
> >
> > Maciej Gajdzica (3):
> >net: changed arp_hdr struct declaration
> >bond: add link bonding mode 6 implementation
> >bond: add unit tests for link bonding mode 6.
> >
> > Michal Jastrzebski (2):
> >bond: add debug info for mode 6 link bonding
> >bond: add example application for link bonding mode 6
> >
> >   app/test-pmd/icmpecho.c|   27 +-
> >   app/test/packet_burst_generator.c  |   41 +-
> >   app/test/packet_burst_generator.h  |   11 +-
> >   app/test/test_link_bonding.c   |  450 +++-
> >   app/test/test_pmd_perf.c   |3 +-
> >   app/test/virtual_pmd.c |  109 ++--
> >   app/test/virtual_pmd.h |5 +-
> >   config/common_linuxapp |3 +-
> >   examples/bond/Makefile |   57 ++
> >   examples/bond/main.c   |  796
> 
> >   examples/bond/main.h   |   39 ++
> >   lib/librte_net/rte_arp.h   |   13 +-
> >   lib/librte_pmd_bond/Makefile   |1 +
> >   lib/librte_pmd_bond/rte_eth_bond.h |   11 +-
> >   lib/librte_pmd_bond/rte_eth_bond_alb.c |  289 ++
> >   lib/librte_pmd_bond/rte_eth_bond_alb.h |  142 +
> >   lib/librte_pmd_bond/rte_eth_bond_api.c |   28 +-
> >   lib/librte_pmd_bond/rte_eth_bond_args.c|3 +-
> >   lib/librte_pmd_bond/rte_eth_bond_pmd.c |  460 ++--
> >   lib/librte_pmd_bond/rte_eth_bond_private.h |   12 +
> >   20 files changed, 2354 insertions(+), 146 deletions(-)
> >   create mode 100644 examples/bond/Makefile
> >   create mode 100644 examples/bond/main.c
> >   create mode 100644 examples/bond/main.h
> >   create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.c
> >   create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.h
> >
> 
> Series Acked-by: Declan Doherty 


[dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)

2015-02-20 Thread Thomas Monjalon
> > v4 changes:
> > - license year modified
> > - aded license to rte_eth_bond_alb files
> > - removed RTE_EXEC_ENV_BAREMETAL in #define
> >
> > v3 changes:
> > - completed description for mode 5 unit tests patch
> > - fixed errors required by checkpatch.pl
> > - moved patch version changes from patches to cover-letter
> >
> > v2 changes:
> > in mode 6 patch 2/6:
> > - add VLAN support
> > - fixed sending duplicated ARPupdates
> > - fixed assigning slaves for next clients
> > - fixed TLB mode
> >
> > in debug patch 3/6:
> > - add IPv4 RX/TX information
> > - add mode6_debug(..) function
> >
> > in the example application patch 4/6:
> > - remove count parameter from send command
> > - fixed quit command to use cmdline_quit(cl)
> > - add echo function - all IPv4 packets will be retransmitted. Bonding
> > driver will use TLB policy - this will show how TX works in mode 6
> > - remove unused structures rx_conf_default and tx_conf_default
> > - add VLAN support
> > - remove unnecessary comments
> > - nodify show command in term of printing DEBUG informations
> >
> > This patchset add support for link bonding mode 6.
> > Additionally it changes an arp_header structure definition.
> > Also a basic example is introduced. Using this example,
> > Bonding will configure each client ARP table,
> > that packets from each client will be received on different slave,
> > mode 6 uses round-robin policy to assign slave to client IP address.
> >
> > Daniel Mrzyglod (1):
> >bond: modify TLB unit tests
> >
> > Maciej Gajdzica (3):
> >net: changed arp_hdr struct declaration
> >bond: add link bonding mode 6 implementation
> >bond: add unit tests for link bonding mode 6.
> >
> > Michal Jastrzebski (2):
> >bond: add debug info for mode 6 link bonding
> >bond: add example application for link bonding mode 6
> 
> Series Acked-by: Declan Doherty 

Applied, thanks

I've added the new example in MAINTAINERS file, so I assume Declan maintain it.



[dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)

2015-02-20 Thread Declan Doherty
On 20/02/15 16:09, Michal Jastrzebski wrote:
> v4 changes:
> - license year modified
> - aded license to rte_eth_bond_alb files
> - removed RTE_EXEC_ENV_BAREMETAL in #define
>
> v3 changes:
> - completed description for mode 5 unit tests patch
> - fixed errors required by checkpatch.pl
> - moved patch version changes from patches to cover-letter
>
> v2 changes:
> in mode 6 patch 2/6:
> - add VLAN support
> - fixed sending duplicated ARPupdates
> - fixed assigning slaves for next clients
> - fixed TLB mode
>
> in debug patch 3/6:
> - add IPv4 RX/TX information
> - add mode6_debug(..) function
>
> in the example application patch 4/6:
> - remove count parameter from send command
> - fixed quit command to use cmdline_quit(cl)
> - add echo function - all IPv4 packets will be retransmitted. Bonding
>   driver will use TLB policy - this will show how TX works in mode 6
> - remove unused structures rx_conf_default and tx_conf_default
> - add VLAN support
> - remove unnecessary comments
> - nodify show command in term of printing DEBUG informations
>
> This patchset add support for link bonding mode 6.
> Additionally it changes an arp_header structure definition.
> Also a basic example is introduced. Using this example,
> Bonding will configure each client ARP table,
> that packets from each client will be received on different slave,
> mode 6 uses round-robin policy to assign slave to client IP address.
>
> Daniel Mrzyglod (1):
>bond: modify TLB unit tests
>
> Maciej Gajdzica (3):
>net: changed arp_hdr struct declaration
>bond: add link bonding mode 6 implementation
>bond: add unit tests for link bonding mode 6.
>
> Michal Jastrzebski (2):
>bond: add debug info for mode 6 link bonding
>bond: add example application for link bonding mode 6
>
>   app/test-pmd/icmpecho.c|   27 +-
>   app/test/packet_burst_generator.c  |   41 +-
>   app/test/packet_burst_generator.h  |   11 +-
>   app/test/test_link_bonding.c   |  450 +++-
>   app/test/test_pmd_perf.c   |3 +-
>   app/test/virtual_pmd.c |  109 ++--
>   app/test/virtual_pmd.h |5 +-
>   config/common_linuxapp |3 +-
>   examples/bond/Makefile |   57 ++
>   examples/bond/main.c   |  796 
> 
>   examples/bond/main.h   |   39 ++
>   lib/librte_net/rte_arp.h   |   13 +-
>   lib/librte_pmd_bond/Makefile   |1 +
>   lib/librte_pmd_bond/rte_eth_bond.h |   11 +-
>   lib/librte_pmd_bond/rte_eth_bond_alb.c |  289 ++
>   lib/librte_pmd_bond/rte_eth_bond_alb.h |  142 +
>   lib/librte_pmd_bond/rte_eth_bond_api.c |   28 +-
>   lib/librte_pmd_bond/rte_eth_bond_args.c|3 +-
>   lib/librte_pmd_bond/rte_eth_bond_pmd.c |  460 ++--
>   lib/librte_pmd_bond/rte_eth_bond_private.h |   12 +
>   20 files changed, 2354 insertions(+), 146 deletions(-)
>   create mode 100644 examples/bond/Makefile
>   create mode 100644 examples/bond/main.c
>   create mode 100644 examples/bond/main.h
>   create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.c
>   create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.h
>

Series Acked-by: Declan Doherty 


[dpdk-dev] [PATCH v4 0/6] Link Bonding mode 6 support (ALB)

2015-02-20 Thread Michal Jastrzebski
v4 changes:
- license year modified
- aded license to rte_eth_bond_alb files
- removed RTE_EXEC_ENV_BAREMETAL in #define

v3 changes:
- completed description for mode 5 unit tests patch
- fixed errors required by checkpatch.pl
- moved patch version changes from patches to cover-letter

v2 changes:
in mode 6 patch 2/6:
- add VLAN support
- fixed sending duplicated ARPupdates
- fixed assigning slaves for next clients
- fixed TLB mode

in debug patch 3/6:
- add IPv4 RX/TX information
- add mode6_debug(..) function

in the example application patch 4/6:
- remove count parameter from send command
- fixed quit command to use cmdline_quit(cl)
- add echo function - all IPv4 packets will be retransmitted. Bonding
driver will use TLB policy - this will show how TX works in mode 6
- remove unused structures rx_conf_default and tx_conf_default
- add VLAN support
- remove unnecessary comments
- nodify show command in term of printing DEBUG informations

This patchset add support for link bonding mode 6.
Additionally it changes an arp_header structure definition.
Also a basic example is introduced. Using this example,
Bonding will configure each client ARP table,
that packets from each client will be received on different slave,
mode 6 uses round-robin policy to assign slave to client IP address.

Daniel Mrzyglod (1):
  bond: modify TLB unit tests

Maciej Gajdzica (3):
  net: changed arp_hdr struct declaration
  bond: add link bonding mode 6 implementation
  bond: add unit tests for link bonding mode 6.

Michal Jastrzebski (2):
  bond: add debug info for mode 6 link bonding
  bond: add example application for link bonding mode 6

 app/test-pmd/icmpecho.c|   27 +-
 app/test/packet_burst_generator.c  |   41 +-
 app/test/packet_burst_generator.h  |   11 +-
 app/test/test_link_bonding.c   |  450 +++-
 app/test/test_pmd_perf.c   |3 +-
 app/test/virtual_pmd.c |  109 ++--
 app/test/virtual_pmd.h |5 +-
 config/common_linuxapp |3 +-
 examples/bond/Makefile |   57 ++
 examples/bond/main.c   |  796 
 examples/bond/main.h   |   39 ++
 lib/librte_net/rte_arp.h   |   13 +-
 lib/librte_pmd_bond/Makefile   |1 +
 lib/librte_pmd_bond/rte_eth_bond.h |   11 +-
 lib/librte_pmd_bond/rte_eth_bond_alb.c |  289 ++
 lib/librte_pmd_bond/rte_eth_bond_alb.h |  142 +
 lib/librte_pmd_bond/rte_eth_bond_api.c |   28 +-
 lib/librte_pmd_bond/rte_eth_bond_args.c|3 +-
 lib/librte_pmd_bond/rte_eth_bond_pmd.c |  460 ++--
 lib/librte_pmd_bond/rte_eth_bond_private.h |   12 +
 20 files changed, 2354 insertions(+), 146 deletions(-)
 create mode 100644 examples/bond/Makefile
 create mode 100644 examples/bond/main.c
 create mode 100644 examples/bond/main.h
 create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.c
 create mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.h

-- 
1.7.9.5