From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp65.ord1c.emailsrvr.com (smtp65.ord1c.emailsrvr.com [108.166.43.65]) by dpdk.org (Postfix) with ESMTP id B65FF95EA for ; Tue, 23 Dec 2014 06:35:28 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp17.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 0F48D18020D; Tue, 23 Dec 2014 00:35:28 -0500 (EST) X-Virus-Scanned: OK Received: by smtp17.relay.ord1c.emailsrvr.com (Authenticated sender: padam.singh-AT-inventum.net) with ESMTPSA id 964841801C0; Tue, 23 Dec 2014 00:35:26 -0500 (EST) X-Sender-Id: padam.singh@inventum.net Received: from [172.16.1.231] ([UNAVAILABLE]. [103.25.205.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:465 (trex/5.4.2); Tue, 23 Dec 2014 05:35:27 GMT Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) From: "Padam J. Singh" In-Reply-To: Date: Tue, 23 Dec 2014 11:05:22 +0530 Message-Id: References: To: Alex Markuze X-Mailer: Apple Mail (2.1990.1) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] VLAN header insertion and removal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 05:35:29 -0000 Hello Alex, Thanks for the help - this worked! BR, Padam > On 21-Dec-2014, at 2:42 pm, Alex Markuze wrote: >=20 > On ingress when configuring the device=20 > 1.modify the = rte_eth_conf.rxmode.hw_vlan_strip =3D 1, >=20 > On egress you need to modify the rte_van_macip struct in the sent = mbuf*. (rte_mbuf.h) > 1. add the PKT_TX_VLAN_PKT to = the ol_flags fields. > 2. fill the plan_tci in = pkt.vlan_macip.f.vlan_tci=20 >=20 > *This is true for dpdk 1.7, structs may have moved in 1.8 >=20 > On Sat, Dec 20, 2014 at 8:39 PM, Padam Jeet Singh = > wrote: > Hello, >=20 > I have done a simple mbuf adjust and prepend to achieve the removal = and insertion of the vlan header and it works fine. The use case is = something similar to the l3fwd example where one port has traffic coming = in on multiple vlans and the other port has no vlans. The packet = processing path in the middle inserts or removes the vlan. >=20 > Is there an offload flag or mode where this can be done in hardware? = Or is there a more optimized way to do this in dpdk? For sake of = performance I want to avoid the copy ethernet header, modify mbuf, copy = back the header steps. >=20 > Thanks, > Padam > --------------------------- > Sent from my mobile. Please excuse the brevity, spelling and = punctuation. >=20 >=20 Padam J. Singh | VP Engg. | Inventum Technologies Private Limited www.inventum.net +91.9810146640 =20 Address: C-70, Phase II Extension, Noida 201305, UP, India =20 Tel : +91.120.4647000 =20 This email and any files transmitted with it are confidential and = intended solely for the use of the individual or entity to whom they are = addressed. If you have received this email in error please notify the = system manager. This message contains confidential information and is = intended only for the individual named. If you are not the named = addressee you should not disseminate, distribute or copy this e-mail. = Please notify the sender immediately by e-mail if you have received this = e-mail by mistake and delete this e-mail from your system. If you are = not the intended recipient you are notified that disclosing, copying, = distributing or taking any action in reliance on the contents of this = information is strictly prohibited. No employee or agent is authorized = to conclude any binding agreement on behalf of [Inventum Technologies = Private Limited] with another party by email without express written = confirmation by a whole-time Director of the Company who has been = authorized vide a valid board resolution to the effect. Our company = accepts no liability for the content of this email, or for the = consequences of any actions taken on the basis of the information = provided, unless that information is subsequently confirmed in writing. = If you are not the intended recipient you are notified that disclosing, = copying, distributing or taking any action in reliance on the contents = of this information is strictly prohibited. Any views or opinions = presented in this email are solely those of the author and do not = necessarily represent those of the company. Employees of [Inventum = Technologies Private Limited] are expressly required not to make = defamatory statements and not to infringe or authorize any infringement = of copyright or any other legal right by email communications. Any such = communication is contrary to company policy and outside the scope of the = employment of the individual concerned. The company will not accept any = liability in respect of such communication, and the employee responsible = will be personally liable for any damages or other liability arising.