summaryrefslogtreecommitdiffstats
path: root/src/pal/common/common_mbuf.h
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2017-02-15 17:17:18 +0200
committerIdo Barnea <ibarnea@cisco.com>2017-02-16 15:38:30 +0200
commitaf52e17f717ee272577bcaa3524b272531752423 (patch)
treed6e05ad8e24629776549da98910d43801295e9f3 /src/pal/common/common_mbuf.h
parent76338aa3565f381df1f415b10d3d22bb5b8d71b6 (diff)
VLAN keyword in platform config file will now make all traffic be sent over vlan
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/pal/common/common_mbuf.h')
-rw-r--r--src/pal/common/common_mbuf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pal/common/common_mbuf.h b/src/pal/common/common_mbuf.h
index c52842bd..3816d203 100644
--- a/src/pal/common/common_mbuf.h
+++ b/src/pal/common/common_mbuf.h
@@ -17,6 +17,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+static inline void add_vlan(rte_mbuf_t *m, uint16_t vlan_id) {
+ m->ol_flags = PKT_TX_VLAN_PKT;
+ m->l2_len = 14;
+ m->vlan_tci = vlan_id;
+}
+
static inline rte_mbuf_t * utl_rte_pktmbuf_add_after2(rte_mbuf_t *m1,rte_mbuf_t *m2){
utl_rte_pktmbuf_check(m1);
utl_rte_pktmbuf_check(m2);