summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-06-28 22:53:06 +0000
committerGuo Ruijing <ruijing.guo@intel.com>2016-06-28 22:53:06 +0000
commit6f5f62221049d130ad190030a36db3147d6deb10 (patch)
treef7d75d157cf88735bcd8443d8c90fc332d2c3324
parent1c6b6e5e83a776e6ba4d3f3d517025ec40135f66 (diff)
Fix NSH Patches
Change-Id: I206c1729608868200c07d340aaef274953744113 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Notes
Notes (review): Code-Review+2: Ruijing <ruijing.guo@intel.com> Workflow+1: Ruijing <ruijing.guo@intel.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 29 Jun 2016 05:59:48 +0000 Reviewed-on: https://review.openstack.org/335313 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rwxr-xr-xovs_build/build-ovs-nsh-dpdk.sh8
-rw-r--r--ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch885
2 files changed, 77 insertions, 816 deletions
diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh
index c7bdeba..834409a 100755
--- a/ovs_build/build-ovs-nsh-dpdk.sh
+++ b/ovs_build/build-ovs-nsh-dpdk.sh
@@ -1,10 +1,13 @@
1#!/bin/bash 1#!/bin/bash
2 2
3set -eux
4
3OVS_COMMIT=7d433ae57ebb90cd68e8fa948a096f619ac4e2d8 5OVS_COMMIT=7d433ae57ebb90cd68e8fa948a096f619ac4e2d8
4URL_OVS=https://github.com/openvswitch/ovs.git 6URL_OVS=https://github.com/openvswitch/ovs.git
5OVS_VER=${OVS_VER:-2.5.90} 7OVS_VER=${OVS_VER:-2.5.90}
6BUILD_HOME=$HOME/nsh 8BUILD_HOME=$HOME/nsh
7BUILD_DEST=${BUILD_DEST:-/deb} 9BUILD_DEST=${BUILD_DEST:-/deb}
10DIR="$(dirname `readlink -f $0`)"
8 11
9export DEB_BUILD_OPTIONS='parallel=8 nocheck' 12export DEB_BUILD_OPTIONS='parallel=8 nocheck'
10 13
@@ -73,11 +76,10 @@ sudo apt-get install -y autoconf \
73 76
74git clone https://github.com/openvswitch/ovs.git 77git clone https://github.com/openvswitch/ovs.git
75cd ovs; git checkout ${OVS_COMMIT} 78cd ovs; git checkout ${OVS_COMMIT}
76DIR="$(dirname `readlink -f $0`)" 79PATCHES=$(cd ${DIR}/patches; echo *patch)
77PATCHES=$(cd patches; echo *patch; cd ..)
78for patch in ${PATCHES} 80for patch in ${PATCHES}
79do 81do
80 patch -p1 < {DIR}/patches/${patch} 82 patch -p1 < ${DIR}/patches/${patch}
81done 83done
82cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs 84cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs
83rm -rf openvswitch-dpdk-${OVS_VER}* 85rm -rf openvswitch-dpdk-${OVS_VER}*
diff --git a/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch b/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch
index c8c8e1a..bfc62a9 100644
--- a/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch
+++ b/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch
@@ -1,815 +1,74 @@
1 1From 604bcfaf5211513f665ca05a370bc7f0c0dab39f Mon Sep 17 00:00:00 2001
2 2From: Yi Yang <yi.y.yang@intel.com>
3 3Date: Fri, 15 Apr 2016 14:17:54 +0800
4 4Subject: [PATCH 5/5] Ethernet header must be kept in VxLAN-gpe + eth + NSH for
5<!DOCTYPE html> 5 new ovs lwtunnel implementation
6<html lang="en" class=""> 6
7 <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#"> 7Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8 <meta charset='utf-8'> 8---
9 9 datapath/linux/compat/vxlan.c | 16 ++++++++++------
10 <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-536bcdee57776d99649d118d29a291c9d7b41d101696162d6456c87b07314253.css" media="all" rel="stylesheet" /> 10 1 file changed, 10 insertions(+), 6 deletions(-)
11 <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-62cdd177894e003285e5b8b6fa72b4a92fb79f11a1ec44c2f2ae0f6f4ad2e724.css" media="all" rel="stylesheet" /> 11
12 12diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
13 13index 888d431..3c05141 100644
14 <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/site-c4b4365da282e51c06e107368db8502a2ecf82e64094d29d791b797372212de2.css" media="all" rel="stylesheet" /> 14--- a/datapath/linux/compat/vxlan.c
15 15+++ b/datapath/linux/compat/vxlan.c
16 16@@ -821,7 +821,7 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,
17 <link as="script" href="https://assets-cdn.github.com/assets/frameworks-b0aaa1e644508a5d5c3f7509d91f5f950c180e1d933a999f21747c5ec5411d92.js" rel="preload" /> 17 struct vxlan_dev *vxlan;
18 18 struct pcpu_sw_netstats *stats;
19 <link as="script" href="https://assets-cdn.github.com/assets/github-7c9ed6fd84382ad236d74c9ec5853f75fca061537cb1914241807b12c289216e.js" rel="preload" /> 19 union vxlan_addr saddr;
20 20- struct eth_nsh_hdr *eth_nsh_header = NULL;
21 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 21+ //struct eth_nsh_hdr *eth_nsh_header = NULL;
22 <meta http-equiv="Content-Language" content="en"> 22 int err = 0;
23 <meta name="viewport" content="width=device-width"> 23
24 24 /* For flow based devices, map all packets to VNI 0 */
25 25@@ -891,12 +891,13 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,
26 <title>ovs_nsh_patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch at master · yyang13/ovs_nsh_patches · GitHub</title> 26 u64_stats_update_end(&stats->syncp);
27 <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> 27
28 <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> 28 /* Add a faked encap_eth_header for NSH */
29 <link rel="apple-touch-icon" href="/apple-touch-icon.png"> 29- if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
30 <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"> 30+ /* ovs changes have ensured it is here, so needn't add it any more */
31 <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"> 31+ /*if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
32 <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"> 32 skb_push(skb, ENCAP_ETH_LEN);
33 <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png"> 33 eth_nsh_header = (struct eth_nsh_hdr *)skb->data;
34 <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png"> 34 memmove(eth_nsh_header->encap_eth_header.encap_eth_dst, skb_mac_header(skb), ENCAP_ETH_LEN);
35 <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png"> 35 eth_nsh_header->encap_eth_header.encap_eth_type = htons(ETH_P_NSH);
36 <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png"> 36- }
37 <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png"> 37+ }*/
38 <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
39 <meta property="fb:app_id" content="1401488693436528">
40
41 <meta content="https://avatars0.githubusercontent.com/u/1381010?v=3&amp;s=400" name="twitter:image:src" /><meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="yyang13/ovs_nsh_patches" name="twitter:title" /><meta content="Contribute to ovs_nsh_patches development by creating an account on GitHub." name="twitter:description" />
42 <meta content="https://avatars0.githubusercontent.com/u/1381010?v=3&amp;s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="yyang13/ovs_nsh_patches" property="og:title" /><meta content="https://github.com/yyang13/ovs_nsh_patches" property="og:url" /><meta content="Contribute to ovs_nsh_patches development by creating an account on GitHub." property="og:description" />
43 <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
44 <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
45 <link rel="assets" href="https://assets-cdn.github.com/">
46
47 <meta name="pjax-timeout" content="1000">
48
49
50 <meta name="msapplication-TileImage" content="/windows-tile.png">
51 <meta name="msapplication-TileColor" content="#ffffff">
52 <meta name="selected-link" value="repo_source" data-pjax-transient>
53
54 <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
55<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
56 <meta name="google-analytics" content="UA-3769691-2">
57
58<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="C0C69725:55E6:90FE12E:57427806" name="octolytics-dimension-request_id" />
59<meta content="/&lt;user-name&gt;/&lt;repo-name&gt;/blob/show" data-pjax-transient="true" name="analytics-location" />
60
61
62
63 <meta class="js-ga-set" name="dimension1" content="Logged Out">
64
65
66
67 <meta name="hostname" content="github.com">
68 <meta name="user-login" content="">
69
70 <meta name="expected-hostname" content="github.com">
71 <meta name="js-proxy-site-detection-payload" content="OWZlYzg2YjY2MGNkZWMzYWIyMjEyODRmYjUxZDc3NDQ2NmZiMDU4MjIzOTM0YTM0M2QxN2UxMDI5ZThiYmMwZnx7InJlbW90ZV9hZGRyZXNzIjoiMTkyLjE5OC4xNTEuMzciLCJyZXF1ZXN0X2lkIjoiQzBDNjk3MjU6NTVFNjo5MEZFMTJFOjU3NDI3ODA2IiwidGltZXN0YW1wIjoxNDYzOTczODk5fQ==">
72
73
74 <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#4078c0">
75 <link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
76
77 <meta name="html-safe-nonce" content="d5a3f38662558f7acd81904f7ac14af9db6f4815">
78 <meta content="336822eb21d878aecfe61a4b1500927049b82186" name="form-nonce" />
79
80 <meta http-equiv="x-pjax-version" content="7af64f947f90d1be70195bdfb0943dda">
81
82
83
84 <meta name="description" content="Contribute to ovs_nsh_patches development by creating an account on GitHub.">
85 <meta name="go-import" content="github.com/yyang13/ovs_nsh_patches git https://github.com/yyang13/ovs_nsh_patches.git">
86
87 <meta content="1381010" name="octolytics-dimension-user_id" /><meta content="yyang13" name="octolytics-dimension-user_login" /><meta content="55125011" name="octolytics-dimension-repository_id" /><meta content="yyang13/ovs_nsh_patches" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="55125011" name="octolytics-dimension-repository_network_root_id" /><meta content="yyang13/ovs_nsh_patches" name="octolytics-dimension-repository_network_root_nwo" />
88 <link href="https://github.com/yyang13/ovs_nsh_patches/commits/master.atom" rel="alternate" title="Recent Commits to ovs_nsh_patches:master" type="application/atom+xml">
89
90
91 <link rel="canonical" href="https://github.com/yyang13/ovs_nsh_patches/blob/master/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch" data-pjax-transient>
92 </head>
93
94
95 <body class="logged-out env-production vis-public page-blob">
96 <div id="js-pjax-loader-bar" class="pjax-loader-bar"></div>
97 <a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
98
99
100
101
102
103
104
105 <header class="site-header js-details-container" role="banner">
106 <div class="container-responsive">
107 <a class="header-logo-invertocat" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
108 <svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59 0.4 0.07 0.55-0.17 0.55-0.38 0-0.19-0.01-0.82-0.01-1.49-2.01 0.37-2.53-0.49-2.69-0.94-0.09-0.23-0.48-0.94-0.82-1.13-0.28-0.15-0.68-0.52-0.01-0.53 0.63-0.01 1.08 0.58 1.23 0.82 0.72 1.21 1.87 0.87 2.33 0.66 0.07-0.52 0.28-0.87 0.51-1.07-1.78-0.2-3.64-0.89-3.64-3.95 0-0.87 0.31-1.59 0.82-2.15-0.08-0.2-0.36-1.02 0.08-2.12 0 0 0.67-0.21 2.2 0.82 0.64-0.18 1.32-0.27 2-0.27 0.68 0 1.36 0.09 2 0.27 1.53-1.04 2.2-0.82 2.2-0.82 0.44 1.1 0.16 1.92 0.08 2.12 0.51 0.56 0.82 1.27 0.82 2.15 0 3.07-1.87 3.75-3.65 3.95 0.29 0.25 0.54 0.73 0.54 1.48 0 1.07-0.01 1.93-0.01 2.2 0 0.21 0.15 0.46 0.55 0.38C13.71 14.53 16 11.53 16 8 16 3.58 12.42 0 8 0z"></path></svg>
109 </a>
110
111 <button class="btn-link right site-header-toggle js-details-target" type="button" aria-label="Toggle navigation">
112 <svg aria-hidden="true" class="octicon octicon-three-bars" height="24" version="1.1" viewBox="0 0 12 16" width="18"><path d="M11.41 9H0.59c-0.59 0-0.59-0.41-0.59-1s0-1 0.59-1h10.81c0.59 0 0.59 0.41 0.59 1s0 1-0.59 1z m0-4H0.59c-0.59 0-0.59-0.41-0.59-1s0-1 0.59-1h10.81c0.59 0 0.59 0.41 0.59 1s0 1-0.59 1zM0.59 11h10.81c0.59 0 0.59 0.41 0.59 1s0 1-0.59 1H0.59c-0.59 0-0.59-0.41-0.59-1s0-1 0.59-1z"></path></svg>
113 </button>
114
115 <div class="site-header-menu">
116 <nav class="site-header-nav site-header-nav-main">
117 <a href="/personal" class="js-selected-navigation-item nav-item nav-item-personal" data-ga-click="Header, click, Nav menu - item:personal" data-selected-links="/personal /personal">
118 Personal
119</a> <a href="/open-source" class="js-selected-navigation-item nav-item nav-item-opensource" data-ga-click="Header, click, Nav menu - item:opensource" data-selected-links="/open-source /open-source">
120 Open source
121</a> <a href="/business" class="js-selected-navigation-item nav-item nav-item-business" data-ga-click="Header, click, Nav menu - item:business" data-selected-links="/business /business/features /business/customers /business">
122 Business
123</a> <a href="/explore" class="js-selected-navigation-item nav-item nav-item-explore" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship /explore">
124 Explore
125</a> </nav>
126
127 <div class="site-header-actions">
128 <a class="btn btn-primary site-header-actions-btn" href="/join?source=header-repo" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
129 <a class="btn site-header-actions-btn mr-2" href="/login?return_to=%2Fyyang13%2Fovs_nsh_patches%2Fblob%2Fmaster%2F0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
130 </div>
131
132 <nav class="site-header-nav site-header-nav-secondary">
133 <a class="nav-item" href="/pricing">Pricing</a>
134 <a class="nav-item" href="/blog">Blog</a>
135 <a class="nav-item" href="https://help.github.com">Support</a>
136 <a class="nav-item header-search-link" href="https://github.com/search">Search GitHub</a>
137 <div class="header-search scoped-search site-scoped-search js-site-search" role="search">
138 <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/yyang13/ovs_nsh_patches/search" class="js-site-search-form" data-scoped-search-url="/yyang13/ovs_nsh_patches/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
139 <label class="form-control header-search-wrapper js-chromeless-input-container">
140 <div class="header-search-scope">This repository</div>
141 <input type="text"
142 class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
143 data-hotkey="s"
144 name="q"
145 placeholder="Search"
146 aria-label="Search this repository"
147 data-unscoped-placeholder="Search GitHub"
148 data-scoped-placeholder="Search"
149 tabindex="1"
150 autocapitalize="off">
151 </label>
152</form></div>
153
154 </nav>
155 </div>
156 </div>
157</header>
158
159
160
161 <div id="start-of-content" class="accessibility-aid"></div>
162
163 <div id="js-flash-container">
164</div>
165
166
167 <div role="main" class="main-content">
168 <div itemscope itemtype="http://schema.org/SoftwareSourceCode">
169 <div id="js-repo-pjax-container" data-pjax-container>
170
171<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
172 <div class="container repohead-details-container">
173
174
175
176<ul class="pagehead-actions">
177
178 <li>
179 <a href="/login?return_to=%2Fyyang13%2Fovs_nsh_patches"
180 class="btn btn-sm btn-with-count tooltipped tooltipped-n"
181 aria-label="You must be signed in to watch a repository" rel="nofollow">
182 <svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6c4.94 0 7.94-6 7.94-6S13 2 8.06 2z m-0.06 10c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4z m2-4c0 1.11-0.89 2-2 2s-2-0.89-2-2 0.89-2 2-2 2 0.89 2 2z"></path></svg>
183 Watch
184 </a>
185 <a class="social-count" href="/yyang13/ovs_nsh_patches/watchers">
186 3
187 </a>
188
189 </li>
190
191 <li>
192 <a href="/login?return_to=%2Fyyang13%2Fovs_nsh_patches"
193 class="btn btn-sm btn-with-count tooltipped tooltipped-n"
194 aria-label="You must be signed in to star a repository" rel="nofollow">
195 <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-0.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14l4.33-2.33 4.33 2.33L10.4 9.26 14 6z"></path></svg>
196 Star
197 </a>
198
199 <a class="social-count js-social-count" href="/yyang13/ovs_nsh_patches/stargazers">
200 3
201 </a>
202
203 </li>
204
205 <li>
206 <a href="/login?return_to=%2Fyyang13%2Fovs_nsh_patches"
207 class="btn btn-sm btn-with-count tooltipped tooltipped-n"
208 aria-label="You must be signed in to fork a repository" rel="nofollow">
209 <svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path d="M8 1c-1.11 0-2 0.89-2 2 0 0.73 0.41 1.38 1 1.72v1.28L5 8 3 6v-1.28c0.59-0.34 1-0.98 1-1.72 0-1.11-0.89-2-2-2S0 1.89 0 3c0 0.73 0.41 1.38 1 1.72v1.78l3 3v1.78c-0.59 0.34-1 0.98-1 1.72 0 1.11 0.89 2 2 2s2-0.89 2-2c0-0.73-0.41-1.38-1-1.72V9.5l3-3V4.72c0.59-0.34 1-0.98 1-1.72 0-1.11-0.89-2-2-2zM2 4.2c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2z m3 10c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2z m3-10c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2z"></path></svg>
210 Fork
211 </a>
212
213 <a href="/yyang13/ovs_nsh_patches/network" class="social-count">
214 2
215 </a>
216 </li>
217</ul>
218
219 <h1 class="entry-title public ">
220 <svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M4 9h-1v-1h1v1z m0-3h-1v1h1v-1z m0-2h-1v1h1v-1z m0-2h-1v1h1v-1z m8-1v12c0 0.55-0.45 1-1 1H6v2l-1.5-1.5-1.5 1.5V14H1c-0.55 0-1-0.45-1-1V1C0 0.45 0.45 0 1 0h10c0.55 0 1 0.45 1 1z m-1 10H1v2h2v-1h3v1h5V11z m0-10H2v9h9V1z"></path></svg>
221 <span class="author" itemprop="author"><a href="/yyang13" class="url fn" rel="author">yyang13</a></span><!--
222--><span class="path-divider">/</span><!--
223--><strong itemprop="name"><a href="/yyang13/ovs_nsh_patches" data-pjax="#js-repo-pjax-container">ovs_nsh_patches</a></strong>
224
225</h1>
226
227 </div>
228 <div class="container">
229
230<nav class="reponav js-repo-nav js-sidenav-container-pjax"
231 itemscope
232 itemtype="http://schema.org/BreadcrumbList"
233 role="navigation"
234 data-pjax="#js-repo-pjax-container">
235
236 <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
237 <a href="/yyang13/ovs_nsh_patches" aria-selected="true" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /yyang13/ovs_nsh_patches" itemprop="url">
238 <svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M9.5 3l-1.5 1.5 3.5 3.5L8 11.5l1.5 1.5 4.5-5L9.5 3zM4.5 3L0 8l4.5 5 1.5-1.5L2.5 8l3.5-3.5L4.5 3z"></path></svg>
239 <span itemprop="name">Code</span>
240 <meta itemprop="position" content="1">
241</a> </span>
242
243 <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
244 <a href="/yyang13/ovs_nsh_patches/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /yyang13/ovs_nsh_patches/issues" itemprop="url">
245 <svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v5h2V4z m0 6H6v2h2V10z"></path></svg>
246 <span itemprop="name">Issues</span>
247 <span class="counter">1</span>
248 <meta itemprop="position" content="2">
249</a> </span>
250
251 <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
252 <a href="/yyang13/ovs_nsh_patches/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /yyang13/ovs_nsh_patches/pulls" itemprop="url">
253 <svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M11 11.28c0-1.73 0-6.28 0-6.28-0.03-0.78-0.34-1.47-0.94-2.06s-1.28-0.91-2.06-0.94c0 0-1.02 0-1 0V0L4 3l3 3V4h1c0.27 0.02 0.48 0.11 0.69 0.31s0.3 0.42 0.31 0.69v6.28c-0.59 0.34-1 0.98-1 1.72 0 1.11 0.89 2 2 2s2-0.89 2-2c0-0.73-0.41-1.38-1-1.72z m-1 2.92c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2zM4 3c0-1.11-0.89-2-2-2S0 1.89 0 3c0 0.73 0.41 1.38 1 1.72 0 1.55 0 5.56 0 6.56-0.59 0.34-1 0.98-1 1.72 0 1.11 0.89 2 2 2s2-0.89 2-2c0-0.73-0.41-1.38-1-1.72V4.72c0.59-0.34 1-0.98 1-1.72z m-0.8 10c0 0.66-0.55 1.2-1.2 1.2s-1.2-0.55-1.2-1.2 0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2z m-1.2-8.8c-0.66 0-1.2-0.55-1.2-1.2s0.55-1.2 1.2-1.2 1.2 0.55 1.2 1.2-0.55 1.2-1.2 1.2z"></path></svg>
254 <span itemprop="name">Pull requests</span>
255 <span class="counter">0</span>
256 <meta itemprop="position" content="3">
257</a> </span>
258
259
260
261 <a href="/yyang13/ovs_nsh_patches/pulse" class="js-selected-navigation-item reponav-item" data-selected-links="pulse /yyang13/ovs_nsh_patches/pulse">
262 <svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0V10h3.6L4.5 8.2l0.9 5.4L9 8.5l1.6 1.5H14V8H11.5z"></path></svg>
263 Pulse
264</a>
265 <a href="/yyang13/ovs_nsh_patches/graphs" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors /yyang13/ovs_nsh_patches/graphs">
266 <svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M16 14v1H0V0h1v14h15z m-11-1H3V8h2v5z m4 0H7V3h2v10z m4 0H11V6h2v7z"></path></svg>
267 Graphs
268</a>
269
270</nav>
271
272 </div>
273</div>
274
275<div class="container new-discussion-timeline experiment-repo-nav">
276 <div class="repository-content">
277
278
279
280<a href="/yyang13/ovs_nsh_patches/blob/98e1d3d6b1ed49d902edaede11820853b0ad5037/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a>
281
282<!-- blob contrib key: blob_contributors:v21:9e16b7492ae4319416c7dc2e26b52f73 -->
283
284<div class="file-navigation js-zeroclipboard-container">
285
286<div class="select-menu branch-select-menu js-menu-container js-select-menu left">
287 <button class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
288 title="master"
289 type="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
290 <i>Branch:</i>
291 <span class="js-select-button css-truncate-target">master</span>
292 </button>
293
294 <div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
295
296 <div class="select-menu-modal">
297 <div class="select-menu-header">
298 <svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75-1.48-1.48 3.75-3.75L0.77 4.25l1.48-1.48 3.75 3.75 3.75-3.75 1.48 1.48-3.75 3.75z"></path></svg>
299 <span class="select-menu-title">Switch branches/tags</span>
300 </div>
301
302 <div class="select-menu-filters">
303 <div class="select-menu-text-filter">
304 <input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
305 </div>
306 <div class="select-menu-tabs">
307 <ul>
308 <li class="select-menu-tab">
309 <a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a>
310 </li>
311 <li class="select-menu-tab">
312 <a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a>
313 </li>
314 </ul>
315 </div>
316 </div>
317
318 <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu">
319
320 <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
321
322
323 <a class="select-menu-item js-navigation-item js-navigation-open selected"
324 href="/yyang13/ovs_nsh_patches/blob/master/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch"
325 data-name="master"
326 data-skip-pjax="true"
327 rel="nofollow">
328 <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M12 5L4 13 0 9l1.5-1.5 2.5 2.5 6.5-6.5 1.5 1.5z"></path></svg>
329 <span class="select-menu-item-text css-truncate-target js-select-menu-filter-text" title="master">
330 master
331 </span>
332 </a>
333 </div>
334
335 <div class="select-menu-no-results">Nothing to show</div>
336 </div>
337
338 <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
339 <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
340
341
342 </div>
343
344 <div class="select-menu-no-results">Nothing to show</div>
345 </div>
346
347 </div>
348 </div>
349</div>
350
351 <div class="btn-group right">
352 <a href="/yyang13/ovs_nsh_patches/find/master"
353 class="js-pjax-capture-input btn btn-sm"
354 data-pjax
355 data-hotkey="t">
356 Find file
357 </a>
358 <button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button>
359 </div>
360 <div class="breadcrumb js-zeroclipboard-target">
361 <span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/yyang13/ovs_nsh_patches"><span>ovs_nsh_patches</span></a></span></span><span class="separator">/</span><strong class="final-path">0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch</strong>
362 </div>
363</div>
364
365
366 <div class="commit-tease">
367 <span class="right">
368 <a class="commit-tease-sha" href="/yyang13/ovs_nsh_patches/commit/9f8ad552bbfb7f9678f1b6195b2d2c0f34a38352" data-pjax>
369 9f8ad55
370 </a>
371 <relative-time datetime="2016-04-15T07:18:08Z">Apr 15, 2016</relative-time>
372 </span>
373 <div>
374 <img alt="" class="avatar" height="20" src="https://1.gravatar.com/avatar/4dbafb666390db3bde85995883557645?d=https%3A%2F%2Fassets-cdn.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png&amp;r=x&amp;s=140" width="20" />
375 <span class="user-mention">Yi Yang</span>
376 <a href="/yyang13/ovs_nsh_patches/commit/9f8ad552bbfb7f9678f1b6195b2d2c0f34a38352" class="message" data-pjax="true" title="ovs nsh patches
377
378Signed-off-by: Yi Yang &lt;yi.y.yang@intel.com&gt;">ovs nsh patches</a>
379 </div>
380
381 <div class="commit-tease-contributors">
382 <button type="button" class="btn-link muted-link contributors-toggle" data-facebox="#blob_contributors_box">
383 <strong>0</strong>
384 contributors
385 </button>
386
387 </div>
388
389 <div id="blob_contributors_box" style="display:none">
390 <h2 class="facebox-header" data-facebox-id="facebox-header">Users who have contributed to this file</h2>
391 <ul class="facebox-user-list" data-facebox-id="facebox-description">
392 </ul>
393 </div>
394 </div>
395
396<div class="file">
397 <div class="file-header">
398 <div class="file-actions">
399
400 <div class="btn-group">
401 <a href="/yyang13/ovs_nsh_patches/raw/master/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch" class="btn btn-sm " id="raw-url">Raw</a>
402 <a href="/yyang13/ovs_nsh_patches/blame/master/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch" class="btn btn-sm js-update-url-with-hash">Blame</a>
403 <a href="/yyang13/ovs_nsh_patches/commits/master/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch" class="btn btn-sm " rel="nofollow">History</a>
404 </div>
405
406
407 <button type="button" class="btn-octicon disabled tooltipped tooltipped-nw"
408 aria-label="You must be signed in to make or propose changes">
409 <svg aria-hidden="true" class="octicon octicon-pencil" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path d="M0 12v3h3l8-8-3-3L0 12z m3 2H1V12h1v1h1v1z m10.3-9.3l-1.3 1.3-3-3 1.3-1.3c0.39-0.39 1.02-0.39 1.41 0l1.59 1.59c0.39 0.39 0.39 1.02 0 1.41z"></path></svg>
410 </button>
411 <button type="button" class="btn-octicon btn-octicon-danger disabled tooltipped tooltipped-nw"
412 aria-label="You must be signed in to make or propose changes">
413 <svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M10 2H8c0-0.55-0.45-1-1-1H4c-0.55 0-1 0.45-1 1H1c-0.55 0-1 0.45-1 1v1c0 0.55 0.45 1 1 1v9c0 0.55 0.45 1 1 1h7c0.55 0 1-0.45 1-1V5c0.55 0 1-0.45 1-1v-1c0-0.55-0.45-1-1-1z m-1 12H2V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9z m1-10H1v-1h9v1z"></path></svg>
414 </button>
415 </div>
416
417 <div class="file-info">
418 75 lines (61 sloc)
419 <span class="file-info-divider"></span>
420 2.85 KB
421 </div>
422</div>
423
424 38
425 39 netdev_port_receive(skb, skb_tunnel_info(skb));
426 <div itemprop="text" class="blob-wrapper data type-diff"> 40 return;
427 <table class="highlight tab-size js-file-line-container" data-tab-size="8"> 41@@ -985,7 +986,7 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
428 <tr> 42 struct vxlanhdr_gpe *gpe;
429 <td id="L1" class="blob-num js-line-number" data-line-number="1"></td> 43
430 <td id="LC1" class="blob-code blob-code-inner js-file-line">From 604bcfaf5211513f665ca05a370bc7f0c0dab39f Mon Sep 17 00:00:00 2001</td> 44 gpe = (struct vxlanhdr_gpe *)vxh;
431 </tr> 45- md->gpe = ntohs(gpe->next_proto);
432 <tr> 46+ md->gpe = gpe->next_proto;
433 <td id="L2" class="blob-num js-line-number" data-line-number="2"></td> 47
434 <td id="LC2" class="blob-code blob-code-inner js-file-line">From: Yi Yang &lt;yi.y.yang@intel.com&gt;</td> 48 buf.dst.u.tun_info.key.tun_flags |= TUNNEL_VXLAN_OPT;
435 </tr> 49
436 <tr> 50@@ -1189,9 +1190,10 @@ static int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *sk
437 <td id="L3" class="blob-num js-line-number" data-line-number="3"></td> 51 }
438 <td id="LC3" class="blob-code blob-code-inner js-file-line">Date: Fri, 15 Apr 2016 14:17:54 +0800</td> 52
439 </tr> 53 /* Skip encap_eth_header on sending Eth+NSH to vxlan-gpe port */
440 <tr> 54- if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
441 <td id="L4" class="blob-num js-line-number" data-line-number="4"></td> 55+ /* ovs needs to keep eth header here */
442 <td id="LC4" class="blob-code blob-code-inner js-file-line">Subject: [PATCH 5/5] Ethernet header must be kept in VxLAN-gpe + eth + NSH for</td> 56+ /*if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
443 </tr> 57 skb_pull(skb, ENCAP_ETH_LEN);
444 <tr> 58- }
445 <td id="L5" class="blob-num js-line-number" data-line-number="5"></td> 59+ }*/
446 <td id="LC5" class="blob-code blob-code-inner js-file-line"> new ovs lwtunnel implementation</td> 60
447 </tr> 61 min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
448 <tr> 62 + VXLAN_HLEN + sizeof(struct iphdr)
449 <td id="L6" class="blob-num js-line-number" data-line-number="6"></td> 63@@ -1236,6 +1238,8 @@ static int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *sk
450 <td id="LC6" class="blob-code blob-code-inner js-file-line"> 64 }
451</td> 65 if (vxflags & VXLAN_F_GBP)
452 </tr> 66 vxlan_build_gbp_hdr(vxh, vxflags, md);
453 <tr> 67+ else if (vxflags & VXLAN_F_GPE)
454 <td id="L7" class="blob-num js-line-number" data-line-number="7"></td> 68+ vxlan_build_gpe_hdr(vxh, vxflags, md);
455 <td id="LC7" class="blob-code blob-code-inner js-file-line">Signed-off-by: Yi Yang &lt;yi.y.yang@intel.com&gt;</td> 69
456 </tr> 70 ovs_skb_set_inner_protocol(skb, htons(ETH_P_TEB));
457 <tr> 71
458 <td id="L8" class="blob-num js-line-number" data-line-number="8"></td> 72--
459 <td id="LC8" class="blob-code blob-code-inner js-file-line"><span class="pl-ms">---</span></td> 731.9.3
460 </tr>
461 <tr>
462 <td id="L9" class="blob-num js-line-number" data-line-number="9"></td>
463 <td id="LC9" class="blob-code blob-code-inner js-file-line"> datapath/linux/compat/vxlan.c | 16 ++++++++++------</td>
464 </tr>
465 <tr>
466 <td id="L10" class="blob-num js-line-number" data-line-number="10"></td>
467 <td id="LC10" class="blob-code blob-code-inner js-file-line"> 1 file changed, 10 insertions(+), 6 deletions(-)</td>
468 </tr>
469 <tr>
470 <td id="L11" class="blob-num js-line-number" data-line-number="11"></td>
471 <td id="LC11" class="blob-code blob-code-inner js-file-line">
472</td>
473 </tr>
474 <tr>
475 <td id="L12" class="blob-num js-line-number" data-line-number="12"></td>
476 <td id="LC12" class="blob-code blob-code-inner js-file-line"><span class="pl-c1">diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c</span></td>
477 </tr>
478 <tr>
479 <td id="L13" class="blob-num js-line-number" data-line-number="13"></td>
480 <td id="LC13" class="blob-code blob-code-inner js-file-line">index 888d431..3c05141 100644</td>
481 </tr>
482 <tr>
483 <td id="L14" class="blob-num js-line-number" data-line-number="14"></td>
484 <td id="LC14" class="blob-code blob-code-inner js-file-line"><span class="pl-md">--- a/datapath/linux/compat/vxlan.c</span></td>
485 </tr>
486 <tr>
487 <td id="L15" class="blob-num js-line-number" data-line-number="15"></td>
488 <td id="LC15" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+++ b/datapath/linux/compat/vxlan.c</span></td>
489 </tr>
490 <tr>
491 <td id="L16" class="blob-num js-line-number" data-line-number="16"></td>
492 <td id="LC16" class="blob-code blob-code-inner js-file-line"><span class="pl-mdr">@@ -821,7 +821,7 @@</span> static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,</td>
493 </tr>
494 <tr>
495 <td id="L17" class="blob-num js-line-number" data-line-number="17"></td>
496 <td id="LC17" class="blob-code blob-code-inner js-file-line"> struct vxlan_dev *vxlan;</td>
497 </tr>
498 <tr>
499 <td id="L18" class="blob-num js-line-number" data-line-number="18"></td>
500 <td id="LC18" class="blob-code blob-code-inner js-file-line"> struct pcpu_sw_netstats *stats;</td>
501 </tr>
502 <tr>
503 <td id="L19" class="blob-num js-line-number" data-line-number="19"></td>
504 <td id="LC19" class="blob-code blob-code-inner js-file-line"> union vxlan_addr saddr;</td>
505 </tr>
506 <tr>
507 <td id="L20" class="blob-num js-line-number" data-line-number="20"></td>
508 <td id="LC20" class="blob-code blob-code-inner js-file-line"><span class="pl-md">- struct eth_nsh_hdr *eth_nsh_header = NULL;</span></td>
509 </tr>
510 <tr>
511 <td id="L21" class="blob-num js-line-number" data-line-number="21"></td>
512 <td id="LC21" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ //struct eth_nsh_hdr *eth_nsh_header = NULL;</span></td>
513 </tr>
514 <tr>
515 <td id="L22" class="blob-num js-line-number" data-line-number="22"></td>
516 <td id="LC22" class="blob-code blob-code-inner js-file-line"> int err = 0;</td>
517 </tr>
518 <tr>
519 <td id="L23" class="blob-num js-line-number" data-line-number="23"></td>
520 <td id="LC23" class="blob-code blob-code-inner js-file-line"> </td>
521 </tr>
522 <tr>
523 <td id="L24" class="blob-num js-line-number" data-line-number="24"></td>
524 <td id="LC24" class="blob-code blob-code-inner js-file-line"> /* For flow based devices, map all packets to VNI 0 */</td>
525 </tr>
526 <tr>
527 <td id="L25" class="blob-num js-line-number" data-line-number="25"></td>
528 <td id="LC25" class="blob-code blob-code-inner js-file-line"><span class="pl-mdr">@@ -891,12 +891,13 @@</span> static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,</td>
529 </tr>
530 <tr>
531 <td id="L26" class="blob-num js-line-number" data-line-number="26"></td>
532 <td id="LC26" class="blob-code blob-code-inner js-file-line"> u64_stats_update_end(&amp;stats-&gt;syncp);</td>
533 </tr>
534 <tr>
535 <td id="L27" class="blob-num js-line-number" data-line-number="27"></td>
536 <td id="LC27" class="blob-code blob-code-inner js-file-line"> </td>
537 </tr>
538 <tr>
539 <td id="L28" class="blob-num js-line-number" data-line-number="28"></td>
540 <td id="LC28" class="blob-code blob-code-inner js-file-line"> /* Add a faked encap_eth_header for NSH */</td>
541 </tr>
542 <tr>
543 <td id="L29" class="blob-num js-line-number" data-line-number="29"></td>
544 <td id="LC29" class="blob-code blob-code-inner js-file-line"><span class="pl-md">- if (md &amp;&amp; ((md-&gt;gpe &amp; VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {</span></td>
545 </tr>
546 <tr>
547 <td id="L30" class="blob-num js-line-number" data-line-number="30"></td>
548 <td id="LC30" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ /* ovs changes have ensured it is here, so needn&#39;t add it any more */</span></td>
549 </tr>
550 <tr>
551 <td id="L31" class="blob-num js-line-number" data-line-number="31"></td>
552 <td id="LC31" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ /*if (md &amp;&amp; ((md-&gt;gpe &amp; VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {</span></td>
553 </tr>
554 <tr>
555 <td id="L32" class="blob-num js-line-number" data-line-number="32"></td>
556 <td id="LC32" class="blob-code blob-code-inner js-file-line"> skb_push(skb, ENCAP_ETH_LEN);</td>
557 </tr>
558 <tr>
559 <td id="L33" class="blob-num js-line-number" data-line-number="33"></td>
560 <td id="LC33" class="blob-code blob-code-inner js-file-line"> eth_nsh_header = (struct eth_nsh_hdr *)skb-&gt;data;</td>
561 </tr>
562 <tr>
563 <td id="L34" class="blob-num js-line-number" data-line-number="34"></td>
564 <td id="LC34" class="blob-code blob-code-inner js-file-line"> memmove(eth_nsh_header-&gt;encap_eth_header.encap_eth_dst, skb_mac_header(skb), ENCAP_ETH_LEN);</td>
565 </tr>
566 <tr>
567 <td id="L35" class="blob-num js-line-number" data-line-number="35"></td>
568 <td id="LC35" class="blob-code blob-code-inner js-file-line"> eth_nsh_header-&gt;encap_eth_header.encap_eth_type = htons(ETH_P_NSH);</td>
569 </tr>
570 <tr>
571 <td id="L36" class="blob-num js-line-number" data-line-number="36"></td>
572 <td id="LC36" class="blob-code blob-code-inner js-file-line"><span class="pl-md">- }</span></td>
573 </tr>
574 <tr>
575 <td id="L37" class="blob-num js-line-number" data-line-number="37"></td>
576 <td id="LC37" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ }*/</span></td>
577 </tr>
578 <tr>
579 <td id="L38" class="blob-num js-line-number" data-line-number="38"></td>
580 <td id="LC38" class="blob-code blob-code-inner js-file-line"> </td>
581 </tr>
582 <tr>
583 <td id="L39" class="blob-num js-line-number" data-line-number="39"></td>
584 <td id="LC39" class="blob-code blob-code-inner js-file-line"> netdev_port_receive(skb, skb_tunnel_info(skb));</td>
585 </tr>
586 <tr>
587 <td id="L40" class="blob-num js-line-number" data-line-number="40"></td>
588 <td id="LC40" class="blob-code blob-code-inner js-file-line"> return;</td>
589 </tr>
590 <tr>
591 <td id="L41" class="blob-num js-line-number" data-line-number="41"></td>
592 <td id="LC41" class="blob-code blob-code-inner js-file-line"><span class="pl-mdr">@@ -985,7 +986,7 @@</span> static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)</td>
593 </tr>
594 <tr>
595 <td id="L42" class="blob-num js-line-number" data-line-number="42"></td>
596 <td id="LC42" class="blob-code blob-code-inner js-file-line"> struct vxlanhdr_gpe *gpe;</td>
597 </tr>
598 <tr>
599 <td id="L43" class="blob-num js-line-number" data-line-number="43"></td>
600 <td id="LC43" class="blob-code blob-code-inner js-file-line"> </td>
601 </tr>
602 <tr>
603 <td id="L44" class="blob-num js-line-number" data-line-number="44"></td>
604 <td id="LC44" class="blob-code blob-code-inner js-file-line"> gpe = (struct vxlanhdr_gpe *)vxh;</td>
605 </tr>
606 <tr>
607 <td id="L45" class="blob-num js-line-number" data-line-number="45"></td>
608 <td id="LC45" class="blob-code blob-code-inner js-file-line"><span class="pl-md">- md-&gt;gpe = ntohs(gpe-&gt;next_proto);</span></td>
609 </tr>
610 <tr>
611 <td id="L46" class="blob-num js-line-number" data-line-number="46"></td>
612 <td id="LC46" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ md-&gt;gpe = gpe-&gt;next_proto;</span></td>
613 </tr>
614 <tr>
615 <td id="L47" class="blob-num js-line-number" data-line-number="47"></td>
616 <td id="LC47" class="blob-code blob-code-inner js-file-line"> </td>
617 </tr>
618 <tr>
619 <td id="L48" class="blob-num js-line-number" data-line-number="48"></td>
620 <td id="LC48" class="blob-code blob-code-inner js-file-line"> buf.dst.u.tun_info.key.tun_flags |= TUNNEL_VXLAN_OPT;</td>
621 </tr>
622 <tr>
623 <td id="L49" class="blob-num js-line-number" data-line-number="49"></td>
624 <td id="LC49" class="blob-code blob-code-inner js-file-line"> </td>
625 </tr>
626 <tr>
627 <td id="L50" class="blob-num js-line-number" data-line-number="50"></td>
628 <td id="LC50" class="blob-code blob-code-inner js-file-line"><span class="pl-mdr">@@ -1189,9 +1190,10 @@</span> static int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *sk</td>
629 </tr>
630 <tr>
631 <td id="L51" class="blob-num js-line-number" data-line-number="51"></td>
632 <td id="LC51" class="blob-code blob-code-inner js-file-line"> }</td>
633 </tr>
634 <tr>
635 <td id="L52" class="blob-num js-line-number" data-line-number="52"></td>
636 <td id="LC52" class="blob-code blob-code-inner js-file-line"> </td>
637 </tr>
638 <tr>
639 <td id="L53" class="blob-num js-line-number" data-line-number="53"></td>
640 <td id="LC53" class="blob-code blob-code-inner js-file-line"> /* Skip encap_eth_header on sending Eth+NSH to vxlan-gpe port */</td>
641 </tr>
642 <tr>
643 <td id="L54" class="blob-num js-line-number" data-line-number="54"></td>
644 <td id="LC54" class="blob-code blob-code-inner js-file-line"><span class="pl-md">- if (md &amp;&amp; ((md-&gt;gpe &amp; VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {</span></td>
645 </tr>
646 <tr>
647 <td id="L55" class="blob-num js-line-number" data-line-number="55"></td>
648 <td id="LC55" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ /* ovs needs to keep eth header here */</span></td>
649 </tr>
650 <tr>
651 <td id="L56" class="blob-num js-line-number" data-line-number="56"></td>
652 <td id="LC56" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ /*if (md &amp;&amp; ((md-&gt;gpe &amp; VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {</span></td>
653 </tr>
654 <tr>
655 <td id="L57" class="blob-num js-line-number" data-line-number="57"></td>
656 <td id="LC57" class="blob-code blob-code-inner js-file-line"> skb_pull(skb, ENCAP_ETH_LEN);</td>
657 </tr>
658 <tr>
659 <td id="L58" class="blob-num js-line-number" data-line-number="58"></td>
660 <td id="LC58" class="blob-code blob-code-inner js-file-line"><span class="pl-md">- }</span></td>
661 </tr>
662 <tr>
663 <td id="L59" class="blob-num js-line-number" data-line-number="59"></td>
664 <td id="LC59" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ }*/</span></td>
665 </tr>
666 <tr>
667 <td id="L60" class="blob-num js-line-number" data-line-number="60"></td>
668 <td id="LC60" class="blob-code blob-code-inner js-file-line"> </td>
669 </tr>
670 <tr>
671 <td id="L61" class="blob-num js-line-number" data-line-number="61"></td>
672 <td id="LC61" class="blob-code blob-code-inner js-file-line"> min_headroom = LL_RESERVED_SPACE(rt-&gt;dst.dev) + rt-&gt;dst.header_len</td>
673 </tr>
674 <tr>
675 <td id="L62" class="blob-num js-line-number" data-line-number="62"></td>
676 <td id="LC62" class="blob-code blob-code-inner js-file-line"> + VXLAN_HLEN + sizeof(struct iphdr)</td>
677 </tr>
678 <tr>
679 <td id="L63" class="blob-num js-line-number" data-line-number="63"></td>
680 <td id="LC63" class="blob-code blob-code-inner js-file-line"><span class="pl-mdr">@@ -1236,6 +1238,8 @@</span> static int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *sk</td>
681 </tr>
682 <tr>
683 <td id="L64" class="blob-num js-line-number" data-line-number="64"></td>
684 <td id="LC64" class="blob-code blob-code-inner js-file-line"> }</td>
685 </tr>
686 <tr>
687 <td id="L65" class="blob-num js-line-number" data-line-number="65"></td>
688 <td id="LC65" class="blob-code blob-code-inner js-file-line"> if (vxflags &amp; VXLAN_F_GBP)</td>
689 </tr>
690 <tr>
691 <td id="L66" class="blob-num js-line-number" data-line-number="66"></td>
692 <td id="LC66" class="blob-code blob-code-inner js-file-line"> vxlan_build_gbp_hdr(vxh, vxflags, md);</td>
693 </tr>
694 <tr>
695 <td id="L67" class="blob-num js-line-number" data-line-number="67"></td>
696 <td id="LC67" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ else if (vxflags &amp; VXLAN_F_GPE)</span></td>
697 </tr>
698 <tr>
699 <td id="L68" class="blob-num js-line-number" data-line-number="68"></td>
700 <td id="LC68" class="blob-code blob-code-inner js-file-line"><span class="pl-mi1">+ vxlan_build_gpe_hdr(vxh, vxflags, md);</span></td>
701 </tr>
702 <tr>
703 <td id="L69" class="blob-num js-line-number" data-line-number="69"></td>
704 <td id="LC69" class="blob-code blob-code-inner js-file-line"> </td>
705 </tr>
706 <tr>
707 <td id="L70" class="blob-num js-line-number" data-line-number="70"></td>
708 <td id="LC70" class="blob-code blob-code-inner js-file-line"> ovs_skb_set_inner_protocol(skb, htons(ETH_P_TEB));</td>
709 </tr>
710 <tr>
711 <td id="L71" class="blob-num js-line-number" data-line-number="71"></td>
712 <td id="LC71" class="blob-code blob-code-inner js-file-line"> </td>
713 </tr>
714 <tr>
715 <td id="L72" class="blob-num js-line-number" data-line-number="72"></td>
716 <td id="LC72" class="blob-code blob-code-inner js-file-line"><span class="pl-md">-- </span></td>
717 </tr>
718 <tr>
719 <td id="L73" class="blob-num js-line-number" data-line-number="73"></td>
720 <td id="LC73" class="blob-code blob-code-inner js-file-line">1.9.3</td>
721 </tr>
722 <tr>
723 <td id="L74" class="blob-num js-line-number" data-line-number="74"></td>
724 <td id="LC74" class="blob-code blob-code-inner js-file-line">
725</td>
726 </tr>
727</table>
728
729 </div>
730
731</div>
732
733<button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump" data-hotkey="l" class="hidden">Jump to Line</button>
734<div id="jump-to-line" style="display:none">
735 <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
736 <input class="form-control linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line&hellip;" aria-label="Jump to line" autofocus>
737 <button type="submit" class="btn">Go</button>
738</form></div>
739
740 </div>
741 <div class="modal-backdrop"></div>
742</div>
743
744
745 </div>
746 </div>
747
748 </div>
749
750 <div class="container site-footer-container">
751 <div class="site-footer" role="contentinfo">
752 <ul class="site-footer-links right">
753 <li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
754 <li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
755 <li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
756 <li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
757 <li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
758 <li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
759
760 </ul>
761
762 <a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
763 <svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59 0.4 0.07 0.55-0.17 0.55-0.38 0-0.19-0.01-0.82-0.01-1.49-2.01 0.37-2.53-0.49-2.69-0.94-0.09-0.23-0.48-0.94-0.82-1.13-0.28-0.15-0.68-0.52-0.01-0.53 0.63-0.01 1.08 0.58 1.23 0.82 0.72 1.21 1.87 0.87 2.33 0.66 0.07-0.52 0.28-0.87 0.51-1.07-1.78-0.2-3.64-0.89-3.64-3.95 0-0.87 0.31-1.59 0.82-2.15-0.08-0.2-0.36-1.02 0.08-2.12 0 0 0.67-0.21 2.2 0.82 0.64-0.18 1.32-0.27 2-0.27 0.68 0 1.36 0.09 2 0.27 1.53-1.04 2.2-0.82 2.2-0.82 0.44 1.1 0.16 1.92 0.08 2.12 0.51 0.56 0.82 1.27 0.82 2.15 0 3.07-1.87 3.75-3.65 3.95 0.29 0.25 0.54 0.73 0.54 1.48 0 1.07-0.01 1.93-0.01 2.2 0 0.21 0.15 0.46 0.55 0.38C13.71 14.53 16 11.53 16 8 16 3.58 12.42 0 8 0z"></path></svg>
764</a>
765 <ul class="site-footer-links">
766 <li>&copy; 2016 <span title="0.04211s from github-fe139-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
767 <li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
768 <li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
769 <li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
770 <li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li>
771 <li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
772 </ul>
773 </div>
774</div>
775
776
777
778
779
780 <div id="ajax-error-message" class="ajax-error-message flash flash-error">
781 <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M15.72 12.5l-6.85-11.98C8.69 0.21 8.36 0.02 8 0.02s-0.69 0.19-0.87 0.5l-6.85 11.98c-0.18 0.31-0.18 0.69 0 1C0.47 13.81 0.8 14 1.15 14h13.7c0.36 0 0.69-0.19 0.86-0.5S15.89 12.81 15.72 12.5zM9 12H7V10h2V12zM9 9H7V5h2V9z"></path></svg>
782 <button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
783 <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75-1.48-1.48 3.75-3.75L0.77 4.25l1.48-1.48 3.75 3.75 3.75-3.75 1.48 1.48-3.75 3.75z"></path></svg>
784 </button>
785 Something went wrong with that request. Please try again.
786 </div>
787
788
789 <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/compat-7db58f8b7b91111107fac755dd8b178fe7db0f209ced51fc339c446ad3f8da2b.js"></script>
790 <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-b0aaa1e644508a5d5c3f7509d91f5f950c180e1d933a999f21747c5ec5411d92.js"></script>
791 <script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-7c9ed6fd84382ad236d74c9ec5853f75fca061537cb1914241807b12c289216e.js"></script>
792
793
794
795
796
797
798 <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner hidden">
799 <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M15.72 12.5l-6.85-11.98C8.69 0.21 8.36 0.02 8 0.02s-0.69 0.19-0.87 0.5l-6.85 11.98c-0.18 0.31-0.18 0.69 0 1C0.47 13.81 0.8 14 1.15 14h13.7c0.36 0 0.69-0.19 0.86-0.5S15.89 12.81 15.72 12.5zM9 12H7V10h2V12zM9 9H7V5h2V9z"></path></svg>
800 <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
801 <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
802 </div>
803 <div class="facebox" id="facebox" style="display:none;">
804 <div class="facebox-popup">
805 <div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
806 </div>
807 <button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
808 <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M7.48 8l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75-1.48-1.48 3.75-3.75L0.77 4.25l1.48-1.48 3.75 3.75 3.75-3.75 1.48 1.48-3.75 3.75z"></path></svg>
809 </button>
810 </div>
811</div>
812
813 </body>
814</html>
815 74