From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx5.zte.com.cn (mx5.zte.com.cn [63.217.80.70]) by dpdk.org (Postfix) with ESMTP id 243B52904 for ; Mon, 25 Apr 2016 04:35:28 +0200 (CEST) Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Websense Email Security Gateway with ESMTPS id 80651EABEB5E3 for ; Mon, 25 Apr 2016 10:35:24 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id u3P2Z9u0096076 for ; Mon, 25 Apr 2016 10:35:10 +0800 (GMT-8) (envelope-from zhang.xinghua1@zte.com.cn) To: dev@dpdk.org MIME-Version: 1.0 X-KeepSent: 5EB35CA3:3635797E-48257FA0:0009AE06; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011 Message-ID: From: zhang.xinghua1@zte.com.cn Date: Mon, 25 Apr 2016 10:35:20 +0800 X-MIMETrack: Serialize by Router on notes_smtp/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2016-04-25 10:34:58, Serialize complete at 2016-04-25 10:34:58 X-MAIL: mse01.zte.com.cn u3P2Z9u0096076 Content-Type: text/plain; charset="US-ASCII" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Byte order of vlan_tci of rte_mbuf is different on different source 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: Mon, 25 Apr 2016 02:35:28 -0000 When using I350 working on SR-IOV mode, we got confused that byte order of vlan_tci in the VF received packet descriptor is different when the packet source is different. 1) Packets from VF to VF, the byte order is big-endian. (e.g. 0xF00) 2) Packets from PC to VF, the byte order is little-endian. (e.g. 0xF) Below is the testing net-work: VM0 VM1 PC VF0 VF1 | | | | +------+------+ | | | PF | hypervisor | SR-IOV NIC | | | | VLAN 15 | +---------switch-------+ We make a breakpoint at the following line of eth_igb_recv_pkts, the vlan_tci we observed that everytime. uint16_t eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) /* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */ rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan); Thanks. -------------------------------------------------------- ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.