From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp65.iad3a.emailsrvr.com (smtp65.iad3a.emailsrvr.com [173.203.187.65]) by dpdk.org (Postfix) with ESMTP id 5B9A32BA3 for ; Thu, 27 Oct 2016 16:45:18 +0200 (CEST) Received: from smtp33.relay.iad3a.emailsrvr.com (localhost [127.0.0.1]) by smtp33.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id D43FB5543; Thu, 27 Oct 2016 10:45:17 -0400 (EDT) X-Auth-ID: padam.singh@inventum.net Received: by smtp33.relay.iad3a.emailsrvr.com (Authenticated sender: padam.singh-AT-inventum.net) with ESMTPSA id 8DC1955FF; Thu, 27 Oct 2016 10:45:16 -0400 (EDT) X-Sender-Id: padam.singh@inventum.net Received: from [172.16.1.31] ([UNAVAILABLE]. [103.25.205.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:25 (trex/5.7.7); Thu, 27 Oct 2016 10:45:17 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) From: Padam Jeet Singh In-Reply-To: Date: Thu, 27 Oct 2016 20:15:13 +0530 Content-Transfer-Encoding: quoted-printable Message-Id: <24C3E15F-108D-4812-985B-61B10FDDF69E@inventum.net> References: <73B7F896-A39A-4805-915B-6B7E80994681@inventum.net> To: "Wiles, Keith" X-Mailer: Apple Mail (2.2104) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Unable to change source MAC address of packet 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: Thu, 27 Oct 2016 14:45:18 -0000 > On 27-Oct-2016, at 7:37 pm, Wiles, Keith = wrote: >=20 >=20 >> On Oct 27, 2016, at 6:33 AM, Padam Jeet Singh = wrote: >>=20 >> Hi, >>=20 >> I am crafting a packet in which the source MAC address as set in the = Ethernet header is different than the transmit port=E2=80=99s default = MAC address. A packet capture of the packets coming out of this port = however comes with source MAC address of the port=E2=80=99s default MAC = address. >>=20 >> Altering the destination MAC address works fine and shows up = correctly in packet capture. >>=20 >> The underlying network interface is an i210 and some logs added to = the eth_igb_xmit_pkts function show that the packets I have crafted = indeed are reaching the driver with the source MAC address set in the = packet code of the application. >>=20 >> How can I disable this automatic source MAC address setting? >=20 > The packets sent with rte_eth_tx_burst() are not forced to a give MAC = address. If you are using something on top of DPDK like Pktgen or OVS or = something, then it may try to force a source MAC address. No=E2=80=A6 not using pktgen or OVS. Plain simple code to take a packets = from a KNI, change source mac address on all received packets, and then = tx_burst them to a port. > Maybe the hardware does it, but we need to know the NIC being used and = then someone maybe able to answer. I do not know of any Intel NICs do = that. Intel i210 NIC (gigabit Ethernet) is being used. I have gone through the = i210 documentation and can=E2=80=99t see anything specific to setting of = MAC address in hardware for TX side. For RX side there are validations = like MAC filtering, but nothing over TX. >=20 > Is this what you are doing. I agree that rte_eth_tx_burst does not overwrite the source MAC as I was = able to trace all the way to the IGB driver that source mac makes it = intact. There is no offload flags enabled in the mbuf. Yet the packets = to the other side comes out as with source mac address of the port. Is there any standard DPDK app which crafts packets with different = source MAC than the port=E2=80=99s physical mac? (I checked the l2fwd = example loads the port mac before transmitting and then uses the same in = TX function). >=20 >>=20 >> Thanks, >> Padam >=20 > Regards, > Keith >=20