From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30072.outbound.protection.outlook.com [40.107.3.72]) by dpdk.org (Postfix) with ESMTP id 1028E2C36 for ; Wed, 23 Jan 2019 20:45:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3volcJgchd69tuiwdW5ZHarY4ICU1NLIItO3puNPn4k=; b=GPXtpllfgFj8w8C9EtZq5QyTLPfhWjreC14r+DXyBtjE6F5+QzgNZJJXn9TGJsHrVschjklG9ln2MAzqgVSXxA0GyCq+wi7fGr+ossamPwTW0+Y8ptm+9jcoi8apDSAJrrKjwAsvlfTfi2PfEkUEHSeYqCruEklWB08w7Ntkb9A= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB3249.eurprd05.prod.outlook.com (10.171.186.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.17; Wed, 23 Jan 2019 19:45:08 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::f44e:1b2:9075:b7a9]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::f44e:1b2:9075:b7a9%4]) with mapi id 15.20.1558.016; Wed, 23 Jan 2019 19:45:08 +0000 From: Ori Kam To: Slava Ovsiienko , "dev@dpdk.org" CC: Shahaf Shuler Thread-Topic: [dpdk-dev] [PATCH v3] app/testpmd: add tos and ttl field to vxlan encapsulation Thread-Index: AQHUskE/IFosXKbYKU6JBIlRzPBunaW9Q3Aw Date: Wed, 23 Jan 2019 19:45:08 +0000 Message-ID: References: <1547390409-3530-1-git-send-email-viacheslavo@mellanox.com> <1548154624-14791-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1548154624-14791-1-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [141.226.122.110] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3249; 6:osIb/bb/+iaP9xs725ihn6eKCNQqkHNyDh78j66vNgFGygBA8HZVn0YSQxrjnUAPIxbqq03/9CMHLhCZQv3G6oJ9l7JX4CFhPBBl2XZKHhfMgictVadgn0+9nPgVeGetugjjnpilcpFKEi3nivT/8R8YG9u4eGpTtYjXUVOHhTHaWYLs2RGUEoMsSCENbLw7IniyuMRu/z6V0xlTE5/rV67/1HqWV05uYVgkp2bi6f4H/ipYAEHZKrSca5ZZyCMd5JwVss0Ezb0kE+RFARbDKJSDmqCut8zh3z2EsEt2hckOXsjvR3vrb4FxVhmPnvAeadv/YYf1sHaKS3Db8lmSl4jSW9aJh7Sezv/p6NFrbxJi8+W7wJHX++GTBaNinNf8GcURQ8ZwPVYJknKA0TawcIefJM2bTiMJHAHXuwiKhjQMGxPbFAjZdj8v0fTq47bHs51YcQrqyJZdb5+TtQGTlQ==; 5:bOMnjfmQxft4cDxO1vKD8kGFyc/n9rOtGmr+WiFTjHmIkbbP/EqKO+ze8AmMiqUcUmclVvOOC99IjFZugwI4DXlpZqthFka+w3fDGf49j/DmtDbiSVzchxeHw8npRM+HWW508hwzMU+jJmC0vW9MLwFHNqFzLuatISINqnVp68lQh1B3zfFLzJCfqUbhZFeuLvtPb9Br1KUBdOehlDZXLw==; 7:VR+Xkf3IM+LqS7dLo93LvWhJ6SbpEjbdSdHzWMfI93Ng0819A0wdQCHPSA2tKabmi/8uwcq26oxizqb1+uLdHieGb+yxlEQN/piLhPTVp/6JB4ig9SJVrX76tq3h2nCoiSAff6O2CgpMTXScQeNvHg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b8e65354-bcf7-480f-05b4-08d6816b47c6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605077)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM4PR05MB3249; x-ms-traffictypediagnostic: AM4PR05MB3249: x-microsoft-antispam-prvs: x-forefront-prvs: 0926B0E013 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39860400002)(136003)(396003)(376002)(13464003)(189003)(199004)(9686003)(229853002)(11346002)(6306002)(66066001)(107886003)(478600001)(2906002)(6246003)(86362001)(30864003)(55016002)(476003)(97736004)(106356001)(446003)(45080400002)(76176011)(53936002)(25786009)(4326008)(6436002)(966005)(14454004)(33656002)(6506007)(53546011)(105586002)(7696005)(305945005)(68736007)(486006)(74316002)(81156014)(81166006)(6116002)(99286004)(7736002)(3846002)(8936002)(102836004)(26005)(71190400001)(256004)(186003)(14444005)(110136005)(316002)(71200400001)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3249; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: nPti43qsEW1CBfZL3Viy9PoXvjJGVLmnDt8yOAP7YkIwGIedmHiDgfxKWfI6czDhKCryWKHV8o+EoziPFfa56HXrlBXfmdAvElnC7/hT0ox7dcFJ1O9GsjFllcNNg1hy2XT8l74eTfJtnzTzH+xPvb+0xQOitKMPOywgFCiYanPRFlR0evFWlJaIjXJh5ejrHI3EG19E9AmqavSKZkcBPW/aC/AHvLcXFXayO4owfhUMVakSjYhnn5yKkDXBp/RqqUMbWlIgZIzqPLEcPB7Epem6a+a84n/Ilu4AWiaSma6R8VOBStXpFrnqBBpDt5qzq4VkhHRtjXgH0s/2UX/505wQkIFi0ev/e/Y3SwfjKVDNkdEtoItYS7QNyBjDhdl+Gs/RiHwBC3aQmzTqY6GviyISfiBQew5lC5wA5WlJuzI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8e65354-bcf7-480f-05b4-08d6816b47c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2019 19:45:08.3866 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3249 Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: add tos and ttl field to vxlan encapsulation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2019 19:45:10 -0000 > -----Original Message----- > From: dev On Behalf Of Viacheslav Ovsiienko > Sent: Tuesday, January 22, 2019 12:57 PM > To: dev@dpdk.org > Cc: Shahaf Shuler > Subject: [dpdk-dev] [PATCH v3] app/testpmd: add tos and ttl field to vxla= n > encapsulation >=20 > The new testpmd set vxlan-tos-ttl command is added. It > allows to specify tos and tll fields for encapsulation IP > header. >=20 > IPv4 VXLAN outer header: >=20 > testpmd> set vxlan-tos-ttl ip-version ipv4 vni 4 udp-src 4 > udp-dst 4 ip-tos 0 ip-ttl 255 ip-src 127.0.0.1 > ip-dst 128.0.0.1 eth-src 11:11:11:11:11:11 > eth-dst 22:22:22:22:22:22 >=20 > IPv6 VXLAN outer header: > testpmd> set vxlan-tos-ttl ip-version ipv6 vni 4 udp-src 4 > udp-dst 4 ip-tos 0 ip-ttl 255 ::1 ip-dst ::2222 > eth-src 11:11:11:11:11:11 eth-dst > 22:22:22:22:22:22 >=20 > Note: ip-ttl parameter corresponds the nop_limits field for IPv6. >=20 > Signed-off-by: Viacheslav Ovsiienko > --- >=20 > v3: > Small nit, select_tos flag is renamed to select_tos_ttl. >=20 > v2: > The patchset is splitted into two parts, one is related to mlx5 PMD, an= d > another is update for testpmd, these parts are going to be merged into > different next branches. >=20 > v1: > Original patchset: >=20 > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fpatc= hes > .dpdk.org%2Fproject%2Fdpdk%2Flist%2F%3Fseries%3D2974&data=3D02%7C0 > 1%7Corika%40mellanox.com%7Cda73e11fc9ab4a7113a708d680586003%7Ca6 > 52971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636837514407774917&am > p;sdata=3DesyXLeazxdu1IPThorxOa8%2BErfsr1fhmuHw%2BSP6XHF0%3D&res > erved=3D0 >=20 > app/test-pmd/cmdline.c | 63 +++++++++++++++++++++++= ++++++ > app/test-pmd/cmdline_flow.c | 32 +++++++++++++++ > app/test-pmd/testpmd.c | 3 ++ > app/test-pmd/testpmd.h | 3 ++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 16 ++++++++ > 5 files changed, 117 insertions(+) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 3ddc3e0..fbbc808 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -794,6 +794,12 @@ static void cmd_help_long_parsed(void > *parsed_result, > " eth-dst (eth-dst)\n" > " Configure the VXLAN encapsulation for > flows.\n\n" >=20 > + "vxlan-tos-ttl ip-version (ipv4|ipv6) vni (vni) udp-src" > + " (udp-src) udp-dst (udp-dst) ip-tos (ip-tos) ip-ttl (ip-ttl)" > + " ip-src (ip-src) ip-dst (ip-dst) eth-src (eth-src)" > + " eth-dst (eth-dst)\n" > + " Configure the VXLAN encapsulation for > flows.\n\n" > + > "nvgre ip-version (ipv4|ipv6) tni (tni) ip-src" > " (ip-src) ip-dst (ip-dst) eth-src (eth-src) eth-dst" > " (eth-dst)\n" > @@ -15034,6 +15040,8 @@ struct cmd_set_vxlan_result { > cmdline_ipaddr_t ip_src; > cmdline_ipaddr_t ip_dst; > uint16_t tci; > + uint8_t tos; > + uint8_t ttl; > struct ether_addr eth_src; > struct ether_addr eth_dst; > }; > @@ -15042,6 +15050,9 @@ struct cmd_set_vxlan_result { > TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, set, "set"); > cmdline_parse_token_string_t cmd_set_vxlan_vxlan =3D > TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan, > "vxlan"); > +cmdline_parse_token_string_t cmd_set_vxlan_vxlan_tos_ttl =3D > + TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan, > + "vxlan-tos-ttl"); > cmdline_parse_token_string_t cmd_set_vxlan_vxlan_with_vlan =3D > TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan, > "vxlan-with-vlan"); > @@ -15066,6 +15077,16 @@ struct cmd_set_vxlan_result { > "udp-dst"); > cmdline_parse_token_num_t cmd_set_vxlan_udp_dst_value =3D > TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, udp_dst, > UINT16); > +cmdline_parse_token_string_t cmd_set_vxlan_ip_tos =3D > + TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token, > + "ip-tos"); > +cmdline_parse_token_num_t cmd_set_vxlan_ip_tos_value =3D > + TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, tos, UINT8); > +cmdline_parse_token_string_t cmd_set_vxlan_ip_ttl =3D > + TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token, > + "ip-ttl"); > +cmdline_parse_token_num_t cmd_set_vxlan_ip_ttl_value =3D > + TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, ttl, UINT8); > cmdline_parse_token_string_t cmd_set_vxlan_ip_src =3D > TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token, > "ip-src"); > @@ -15104,10 +15125,15 @@ static void cmd_set_vxlan_parsed(void > *parsed_result, > .vxlan_id =3D rte_cpu_to_be_32(res->vni) & > RTE_BE32(0x00ffffff), > }; >=20 > + vxlan_encap_conf.select_tos_ttl =3D 0; > if (strcmp(res->vxlan, "vxlan") =3D=3D 0) > vxlan_encap_conf.select_vlan =3D 0; > else if (strcmp(res->vxlan, "vxlan-with-vlan") =3D=3D 0) > vxlan_encap_conf.select_vlan =3D 1; > + else if (strcmp(res->vxlan, "vxlan-tos-ttl") =3D=3D 0) { > + vxlan_encap_conf.select_vlan =3D 0; > + vxlan_encap_conf.select_tos_ttl =3D 1; > + } > if (strcmp(res->ip_version, "ipv4") =3D=3D 0) > vxlan_encap_conf.select_ipv4 =3D 1; > else if (strcmp(res->ip_version, "ipv6") =3D=3D 0) > @@ -15117,6 +15143,8 @@ static void cmd_set_vxlan_parsed(void > *parsed_result, > rte_memcpy(vxlan_encap_conf.vni, &id.vni[1], 3); > vxlan_encap_conf.udp_src =3D rte_cpu_to_be_16(res->udp_src); > vxlan_encap_conf.udp_dst =3D rte_cpu_to_be_16(res->udp_dst); > + vxlan_encap_conf.ip_tos =3D res->tos; > + vxlan_encap_conf.ip_ttl =3D res->ttl; > if (vxlan_encap_conf.select_ipv4) { > IPV4_ADDR_TO_UINT(res->ip_src, vxlan_encap_conf.ipv4_src); > IPV4_ADDR_TO_UINT(res->ip_dst, vxlan_encap_conf.ipv4_dst); > @@ -15161,6 +15189,40 @@ static void cmd_set_vxlan_parsed(void > *parsed_result, > }, > }; >=20 > +cmdline_parse_inst_t cmd_set_vxlan_tos_ttl =3D { > + .f =3D cmd_set_vxlan_parsed, > + .data =3D NULL, > + .help_str =3D "set vxlan-tos-ttl ip-version ipv4|ipv6 vni udp-src= " > + " udp-dst ip-tos ip-ttl " > + " ip-src ip-dst eth-src " > + " eth-dst ", > + .tokens =3D { > + (void *)&cmd_set_vxlan_set, > + (void *)&cmd_set_vxlan_vxlan_tos_ttl, > + (void *)&cmd_set_vxlan_ip_version, > + (void *)&cmd_set_vxlan_ip_version_value, > + (void *)&cmd_set_vxlan_vni, > + (void *)&cmd_set_vxlan_vni_value, > + (void *)&cmd_set_vxlan_udp_src, > + (void *)&cmd_set_vxlan_udp_src_value, > + (void *)&cmd_set_vxlan_udp_dst, > + (void *)&cmd_set_vxlan_udp_dst_value, > + (void *)&cmd_set_vxlan_ip_tos, > + (void *)&cmd_set_vxlan_ip_tos_value, > + (void *)&cmd_set_vxlan_ip_ttl, > + (void *)&cmd_set_vxlan_ip_ttl_value, > + (void *)&cmd_set_vxlan_ip_src, > + (void *)&cmd_set_vxlan_ip_src_value, > + (void *)&cmd_set_vxlan_ip_dst, > + (void *)&cmd_set_vxlan_ip_dst_value, > + (void *)&cmd_set_vxlan_eth_src, > + (void *)&cmd_set_vxlan_eth_src_value, > + (void *)&cmd_set_vxlan_eth_dst, > + (void *)&cmd_set_vxlan_eth_dst_value, > + NULL, > + }, > +}; > + > cmdline_parse_inst_t cmd_set_vxlan_with_vlan =3D { > .f =3D cmd_set_vxlan_parsed, > .data =3D NULL, > @@ -18696,6 +18758,7 @@ struct cmd_show_tx_metadata_result { > (cmdline_parse_inst_t *)&cmd_set_port_tm_hierarchy_default, > #endif > (cmdline_parse_inst_t *)&cmd_set_vxlan, > + (cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl, > (cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan, > (cmdline_parse_inst_t *)&cmd_set_nvgre, > (cmdline_parse_inst_t *)&cmd_set_nvgre_with_vlan, > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 659908f..36659a6 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -3501,6 +3501,38 @@ static int comp_vc_action_rss_queue(struct context > *, const struct token *, > if (!vxlan_encap_conf.select_vlan) > action_vxlan_encap_data->items[1].type =3D > RTE_FLOW_ITEM_TYPE_VOID; > + if (vxlan_encap_conf.select_tos_ttl) { > + if (vxlan_encap_conf.select_ipv4) { > + static struct rte_flow_item_ipv4 ipv4_mask_tos; > + > + memcpy(&ipv4_mask_tos, > &rte_flow_item_ipv4_mask, > + sizeof(ipv4_mask_tos)); > + ipv4_mask_tos.hdr.type_of_service =3D 0xff; > + ipv4_mask_tos.hdr.time_to_live =3D 0xff; > + action_vxlan_encap_data- > >item_ipv4.hdr.type_of_service =3D > + vxlan_encap_conf.ip_tos; > + action_vxlan_encap_data->item_ipv4.hdr.time_to_live > =3D > + vxlan_encap_conf.ip_ttl; > + action_vxlan_encap_data->items[2].mask =3D > + &ipv4_mask_tos; > + } else { > + static struct rte_flow_item_ipv6 ipv6_mask_tos; > + > + memcpy(&ipv6_mask_tos, > &rte_flow_item_ipv6_mask, > + sizeof(ipv6_mask_tos)); > + ipv6_mask_tos.hdr.vtc_flow |=3D > + RTE_BE32(0xfful << IPV6_HDR_TC_SHIFT); > + ipv6_mask_tos.hdr.hop_limits =3D 0xff; > + action_vxlan_encap_data->item_ipv6.hdr.vtc_flow |=3D > + rte_cpu_to_be_32 > + ((uint32_t)vxlan_encap_conf.ip_tos << > + IPV6_HDR_TC_SHIFT); > + action_vxlan_encap_data->item_ipv6.hdr.hop_limits =3D > + vxlan_encap_conf.ip_ttl; > + action_vxlan_encap_data->items[2].mask =3D > + &ipv6_mask_tos; > + } > + } > memcpy(action_vxlan_encap_data->item_vxlan.vni, > vxlan_encap_conf.vni, > RTE_DIM(vxlan_encap_conf.vni)); > action->conf =3D &action_vxlan_encap_data->conf; > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 15a9488..98c1baa 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -469,6 +469,7 @@ struct rte_fdir_conf fdir_conf =3D { > struct vxlan_encap_conf vxlan_encap_conf =3D { > .select_ipv4 =3D 1, > .select_vlan =3D 0, > + .select_tos_ttl =3D 0, > .vni =3D "\x00\x00\x00", > .udp_src =3D 0, > .udp_dst =3D RTE_BE16(4789), > @@ -479,6 +480,8 @@ struct vxlan_encap_conf vxlan_encap_conf =3D { > .ipv6_dst =3D "\x00\x00\x00\x00\x00\x00\x00\x00" > "\x00\x00\x00\x00\x00\x00\x11\x11", > .vlan_tci =3D 0, > + .ip_tos =3D 0, > + .ip_ttl =3D 255, > .eth_src =3D "\x00\x00\x00\x00\x00\x00", > .eth_dst =3D "\xff\xff\xff\xff\xff\xff", > }; > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h > index 3ff11e6..fa48878 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -488,6 +488,7 @@ struct gso_status { > struct vxlan_encap_conf { > uint32_t select_ipv4:1; > uint32_t select_vlan:1; > + uint32_t select_tos_ttl:1; > uint8_t vni[3]; > rte_be16_t udp_src; > rte_be16_t udp_dst; > @@ -496,6 +497,8 @@ struct vxlan_encap_conf { > uint8_t ipv6_src[16]; > uint8_t ipv6_dst[16]; > rte_be16_t vlan_tci; > + uint8_t ip_tos; > + uint8_t ip_ttl; > uint8_t eth_src[ETHER_ADDR_LEN]; > uint8_t eth_dst[ETHER_ADDR_LEN]; > }; > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 854af2d..0291480 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -1583,6 +1583,10 @@ Configure the outer layer to encapsulate a packet > inside a VXLAN tunnel:: > udp-dst (udp-dst) ip-src (ip-src) ip-dst (ip-dst) vlan-tci (vlan-tci) \ > eth-src (eth-src) eth-dst (eth-dst) >=20 > + set vxlan-tos-ttl ip-version (ipv4|ipv6) vni (vni) udp-src (udp-src) \ > + udp-dst (udp-dst) ip-tos (ip-tos) ip-ttl (ip-ttl) ip-src (ip-src) \ > + ip-dst (ip-dst) eth-src (eth-src) eth-dst (eth-dst) > + > Those command will set an internal configuration inside testpmd, any > following > flow rule using the action vxlan_encap will use the last configuration s= et. > To have a different encapsulation header, one of those commands must be > called > @@ -4241,6 +4245,12 @@ IPv4 VXLAN outer header:: > testpmd> flow create 0 ingress pattern end actions vxlan_encap / > queue index 0 / end >=20 > + testpmd> set vxlan-tos-ttl ip-version ipv4 vni 4 udp-src 4 udp-dst 4 ip= -tos 0 > + ip-ttl 255 ip-src 127.0.0.1 ip-dst 128.0.0.1 eth-src 11:11:11:1= 1:11:11 > + eth-dst 22:22:22:22:22:22 > + testpmd> flow create 0 ingress pattern end actions vxlan_encap / > + queue index 0 / end > + > IPv6 VXLAN outer header:: >=20 > testpmd> set vxlan ip-version ipv6 vni 4 udp-src 4 udp-dst 4 ip-src ::1 > @@ -4254,6 +4264,12 @@ IPv6 VXLAN outer header:: > testpmd> flow create 0 ingress pattern end actions vxlan_encap / > queue index 0 / end >=20 > + testpmd> set vxlan-tos-ttl ip-version ipv6 vni 4 udp-src 4 udp-dst 4 > + ip-tos 0 ip-ttl 255 ::1 ip-dst ::2222 eth-src 11:11:11:11:11:11 > + eth-dst 22:22:22:22:22:22 > + testpmd> flow create 0 ingress pattern end actions vxlan_encap / > + queue index 0 / end > + > Sample NVGRE encapsulation rule > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > -- > 1.8.3.1 Acked-by: Ori Kam Thanks, Ori