Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRE over IPv4 traffic from VM to Contrail is not destributed #99

Open
wants to merge 917 commits into
base: R3.2
Choose a base branch
from

Conversation

aalexeykhan
Copy link
Contributor

@aalexeykhan aalexeykhan commented Jul 12, 2017

When VMs exchange tunneled like GRE over IPv4 traffic between each other traffic is not geting destributed accross contrail cores which cause overload of one conrail core and leads to packet drops.

Following patch fix that:
branch R3.2 version cd1162a

diff --git a/dpdk/vr_dpdk_ethdev.c b/dpdk/vr_dpdk_ethdev.c
index c11fc4d..437e0f5 100644
--- a/dpdk/vr_dpdk_ethdev.c
+++ b/dpdk/vr_dpdk_ethdev.c
@@ -769,6 +769,20 @@ dpdk_mbuf_rss_hash(struct rte_mbuf *mbuf, struct vr_ip *ipv4_hdr,
case VR_IP_PROTO_UDP:
hash = rte_hash_crc_4byte(*l4_ptr, hash);
break;

  • case VR_IP_PROTO_GRE:

  •    if (likely(l4_ptr != NULL))
    
  •    {
    
  •        struct vr_gre_key* gre_hdr = (struct vr_gre_key *)l4_ptr;
    
  •        if (likely(gre_hdr->gre_comm_hdr.gre_flags & VR_GRE_FLAG_KEY))  {
    
  •            hash = rte_hash_crc_4byte(gre_hdr->gre_key , hash);
    
  •            RTE_LOG(DEBUG, VROUTER, "%s: GRE key %d, RSS hash: 0x%x (emulated)\n",
    
  •                __func__, gre_hdr->gre_key, hash);
    
  •        } else
    
  •            RTE_LOG(DEBUG, VROUTER, "%s: GRE without key, RSS hash: 0x%x (emulated)\n",
    
  •                __func__, hash);
    
  •    }
    
  •    break;
    

    }

    mbuf->ol_flags |= PKT_RX_RSS_HASH;
    @@ -873,7 +887,7 @@ dpdk_mbuf_parse_and_hash_packets(struct rte_mbuf mbuf)
    mbuf->ol_flags &= ~PKT_RX_RSS_HASH;
    /
    Go to parsing. */
    } else {

  •            return 0; /* Looks like GRE, but no MPLS. */
    
  •            return dpdk_mbuf_rss_hash(mbuf, ipv4_hdr, NULL); /* Looks like GRE, but no MPLS. */
           }
       } else if (ipv4_hdr->ip_proto == VR_IP_PROTO_UDP) {
           /* At this point the packet may be:
    

diff --git a/include/vr_packet.h b/include/vr_packet.h
index c9e542f..0257297 100644
--- a/include/vr_packet.h
+++ b/include/vr_packet.h
@@ -857,6 +857,12 @@ struct vr_gre {
unsigned short gre_proto;
} attribute((packed));

+struct vr_gre_key {

  • struct vr_gre gre_comm_hdr;
  • unsigned int gre_key;
    +} attribute((packed));

struct vr_pcap {
/* timestamp seconds */
unsigned int pcap_ts_sec;

jablonskim and others added 30 commits February 18, 2019 11:56
Implement per-CPU fragment queues.
For now, the implementation is partially copied from Linux implementation.
It will be refactored in followup PRs.

Change-Id: Ib448d0515b99c9b64035222a23e0c048348526bd
Partial-Jira-Bug: WIND-165
Atomic builtin functions should use 'volatile' for all pointers.

Change-Id: I5949dfde57c6adfa720cb79fc6c8507884bb78ff
Closes-Jira-Bug: WIND-177
Change-Id: Iabc976d1de4ce6e56957e2aec8aca36b653dbf17
Partial-Jira-Bug: WIND-165
Change-Id: I2801c30cced7913a9ce6268a4a7e108f9200ec4f
Partial-Jira-Bug: WIND-165
closes-jira-bug: CEM-2807
Limitation in rte_port_ethdev_writer_tx_bulk in the pkts_mask
field that we can transfer only 64 segments. The segmentation
code can send a max of 128 segments, which was causing the
mbuf leak. Fixed the code, by calling the tx_bulk function in
a loop

Change-Id: I81212f1ae32e47dd80c0938631e466db98242a3e
In scenarios where external implementations offload the full datapath to
hardware, flow and vrf stats do not propogate to vrouter on the host.
Add callbacks which enable such implementations to update these stats.

Change-Id: I92ed304003284a0b69a0c27e37b579fe35d453b3
Partial-Bug: #1767107
Signed-off-by: Frik Botha <frederick.botha@netronome.com>
With Smet routes, we only support sender outside contrail.
However, we should continue using broadcast routes for
sender inside contrail.

Closes Jira Bug: JCB-219096

Change-Id: I2f46809beb1b04b48ed43b29ad982d08312b12a8
This is a temporary commit to get more debug info for bug:JCB-160099
Suspecting hugepage request is not processed by vrouter code.
Added debug prints in hugepage request to get more data about the crash.
Partial Jira Bug: JCB-160099
Change-Id: I190265a9d0c687fe8a398b106d6a8d84266e89d3
vRouter-DPDK is unable to probe Netronome NICs, since the build system
does not link to the NFP PMD.

Change-Id: If5d9750a18348ae578cc413063a14cd75dd0ed3e
Partial-Bug: #1774414
Signed-off-by: Frik Botha <frederick.botha@netronome.com>
Prepare to move vr_linux_fragment_assembler, VrFragmentAssembler and dpdk_fragment_assemble_queue to dp-core:
1. Introduce os-dependent vr_fragment_sync_assemble callback.
2. Rename vr_fragment_assembler to vr_fragment_assemble.
3. Fix formatting issues.


Change-Id: Ia1cecaf06474df424d12fae8cca84fa9c8d8cc43
Partial-Jira-Bug: WIND-165
Move duplicated code from fragment assembler
on Windows, Linux and DPDK to dp-core.

Change-Id: I99c4a3b2b4df13277c21bbbec5a2060b7ca3f93b
Partial-Jira-Bug: WIND-165
closes-jira-bug: CEM-2996
Added a null check for variable.

Change-Id: I667f413a1d4604f7f2de8c7c04157c9b7317b2a0
If igmp is disabled, we should always use bcast mac for lookup.

Partial Jira Bug: JCB-219141

Change-Id: Iad007832801a7c79b3d0897e877209815c53ebeb
closes-jira-bug: CEM-2807
tx_bulk can support upto burst of 64 packets.
Change the send size to 64 instead of 32.

Change-Id: Ifbf45e9fc23dd4d8e0f69fefc745730d3fbf2726
(cherry picked from commit 26f0926)
Jenkins CI and others added 30 commits April 24, 2020 14:38
Devloped vr_info framework to process multiple CLI requests.
 - Have created CLI for DPDK(dpdkinfo) and for kernel(vrinfo)
 - Handles CLI request in parallel.
 - Supported for multiple platforms(Kernel/DPDK etc.)
 - For DPDK, Displaying the bond master & slave information.
 - For Kernel, Have written a sample code to display vRouter version.
 - Register callback function in vr_info.h(VR_INFO_REG macro) and based
   on CLI request, vr_info would call those callbacks and dispaly
   contents in CLI.
 - Added (--buffsz <value>) support to set output buffer size from CLI.

Closes-jira-bug: CEM-7025

Change-Id: Ic20da8f8c3e4f56acd0423c974ac060573774c20
Depends-On: Ie4733cc4cc9838bee0230b0668baa1d9ba191eb5
- Reorganize code to add basic topologies as base classes.
This allows re-usability of these classes.

- Move all the HBS related UTs to a separate file.

Closes-Jira-Bug: CEM-14859
Change-Id: Ie0b363f0c7c823702b2422865192769d87d25dfd
1. Create new GDB macros to dump rt and bridge details from vrouter core file.
2. Minor changes to vr_vif.gdb file.
3. Source inclusions for new files in vrouter.gdb file.
4. Address comments wrt vr_bridge.gdb and vr_rtable.gdb files.

Partial-Jira-Bug: CEM-8854
Change-Id: Ib317a01ba2c33973b12d1917ef5d5119ed27bcdd
Root cause:
In case of local ECMP processing, as in fip is on one VM on local
compute and another VM on remote compute, when the pkt is chosen
to be sent to remote compute (by agent selecting the remote ecmp idx),
the fabric vif rewrite (L2 rewrite) was not happening due to
some special checks in the code.

Fix:
Changed the check condition to also check for dst mac of the
pkt. If dmac of the pkt is equal to vhost0 mac, then the pkt
is being routed through vrouter and we need to honor the NH
found during route lookup. In such cases, we need to do the
L2 rewrite using NH information.

closes-jira-bug: CEM-13716
Change-Id: I90dc16b5e48aba6156eddfef7b1486b6faf10741
SIGKILL is being sent to kill vrouter instance at the end
every UT. Due to SIGKILL .gcda files required for code coverage report
are not being generated. Changed the kill signal SIGTERM instead.

Closes-Jira-Bug: CEM-15230
Change-Id: I415f285bda991ecae49e7dfbd33d075b8018736d
The DPDK rte_flow API is not thread safe. Using default configuration,
multiple dataplane threads are trying to insert or remove flows on the
same port, which is not supported.

Introduce one spinlock per ethdev port using DPDK implementation.
The spinlock is used when managing flows for this port.

Closes-Bug: TFB-1578

Signed-off-by: Gaetan Rivet <grive@u256.net>
Change-Id: I24e99bef331d0a15cf749ad3c5fa4552ead1b009
The following cases would be supported with this commit -
1) Packet mode + Fragmentation + Dst ECMP
2) Packet mode + Fragmentation + Dst ECMP + Mirror dst with ECMP
3) Packet mode + Fragmentation + Dst ECMP + Mirror dst without ECMP

Changes done:
1) Handle fragmentation in case of ECMP with packet mode
2) Pass packets through the fragment assembler in this case
3) Add a custom field in the hash key of the fragment assembler
4) For mirror packets, mark the custom field as 1
5) Delete frag_calc logic and in all cases, remove the fragment
entry from the table when the last fragment is received
4) Handle cases where fragment addition in fragment hash table
return error
5) Make the fragment hash table and assembler table scanning
more aggressive
6) Move all the #defines of fragmentation in one place
7) Add more comments to important fragmentation functions
8) Add UT suite for fragmentation
9) Some fixes in UT infrastructure

Closes-Jira-Bug: CEM-13355
Change-Id: I305efd007e7b3b6899f4bac356dc2d1bd44d2f1e
Fix is to calculate the number of fd's after deleting the interface.

Closes-jira-bug: CEM-15560
Change-Id: Ia9a7d7dd2b4fc31d5888584a44f3eb7045d7a380
Add a flag vr_close_flow_on_tcp_rst to enable/disable disconnection of TCP flow on receiving TCP RST packet.

Closes-Jira-Bug: CEM-10847
Change-Id: I828d1e1797dfdca9022fe74f9217e1e905be27e2
1. Adding code snippet in the main() to set coredump_filter for vrouter dpdk.
2. Addressing comments and making changes.

Closes-Jira-Bug: CEM-14017
Change-Id: Idd6be41350728150088e8ed046a8433f7baeeb93
When vRouter was stopped, rte_exit() calls log write function.
But, the log file pointer is closed by an earlier call of dpdk_exit()
Hence there was a crash. Fix is to close the log file after rte_exit()

Closes-Jira-Bug: CEM-15695
Change-Id: I46a42aadb44f6e08dfd0c0272fe9259e73b82f1c
… information

Below commands are supported for Dpdkinfo:
1. Bond:
       --bond (Display the bond master and slave information)
2. Lacp:
       --lacp all (Display all information related to lacp)
       --lacp conf (Display config information)
3. Mempool:
       --mempool all  (Show summary of used/avail mbuf for all mempools)
       --mempool <mempool-name> (Display information about the specified mempool)
4. Nic info:
       --stats eth
       --xstats  (Display non zero values for Master and slaves)
       --xstats=all  (Display all values for Master and slaves)
       --xstats=<interface-id>  (Display non zero values for given interface-id, =0 (Master), =1 (Slave(0)), =2 (Slave(1)))

5. Lcore:
       --lcore (Display lcore information)

Closes-Jira-Bug: CEM-15000
Change-Id: I2c94eb8a44df19915ca0d23d10e2824a6462dbd7
Fix: When vRouter acts as gateway, Allow traffic between fabric-fabric,
otherwise drop it.
Closes-jira-bug: CEM-13067

Change-Id: I05e390fcbf8ce9391ea0713706a582aa93c97a4a
1. Added Wireshark plugin files that parses through the buffer
2. Added 22 sandesh object scripts that are used to parse the objects' buffers
3. Added Sandump tool (formats and converts sniffed bytes to pcapng)

Closes-Jira-Bug: CEM-9260
Change-Id: Idf9a842021a0d8f5e1188d4e869f0111d64d3f41
Adding an automated UT test case for the bug.

closes-jira-bug: CEM-13716
Change-Id: I25556a5a17d371a6319da28958540d3dd0308e18
warnings as errors.

Closes-Jira-Bug: CEM-10978
Change-Id: Icbd33700185fd93f5e9962ef78cbf3f178883e6a
…out migration.

Automated change

Depends-On: I76b24276f0f9f7dbd4361d06ec9a2bad07f1349e
Depends-On: Ia502f7994fe5c3935838fb31a5210e5389fa943b
Depends-On: Ia92e5a026af7ebbd1b479e372e8b4b447a8e9b67
Depends-On: Ib28e845dd30bb42034ff6dbeecc2dd7cb7e85c64
Depends-On: Ib52824a4677be5745b265f3a2b9c3fac58a9b0a0
Depends-On: If2956c78c81d8a62dfdf9ad610b04e0c41a3565d
Change-Id: I6fc67f02ea6e9ba1f82b23063c976fba9a779f89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet