From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C8AE41B267 for ; Wed, 11 Oct 2017 02:10:28 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2017 17:10:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,359,1503385200"; d="scan'208";a="161210713" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 10 Oct 2017 17:10:23 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 10 Oct 2017 17:10:23 -0700 Received: from fmsmsx102.amr.corp.intel.com ([169.254.10.122]) by fmsmsx101.amr.corp.intel.com ([169.254.1.172]) with mapi id 14.03.0319.002; Tue, 10 Oct 2017 17:10:23 -0700 From: "Wiles, Keith" To: Stephen Hemminger CC: Shailja Pandey , "dev@dpdk.org" Thread-Topic: [dpdk-dev] How to update the sequence number in TCP packets using DPDK-pktgen? Thread-Index: AQHTQhub2RhBNtlBn020gyYot94saqLeO8uA Date: Wed, 11 Oct 2017 00:10:23 +0000 Message-ID: <51BC1B40-1E53-497A-A8A7-AE64CECC0AA3@intel.com> References: <20171010160000.348d2930@shemminger-XPS-13-9360> In-Reply-To: <20171010160000.348d2930@shemminger-XPS-13-9360> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.126.92] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] How to update the sequence number in TCP packets using DPDK-pktgen? 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, 11 Oct 2017 00:10:29 -0000 > On Oct 10, 2017, at 6:00 PM, Stephen Hemminger wrote: >=20 > On Mon, 9 Oct 2017 19:12:49 +0530 > Shailja Pandey wrote: >=20 >> pktgen_tcp_hdr_ctor(pkt_seq_t *pkt, tcpip_t *tip, int type __rte_unused) >> { >> uint16_t tlen; >>=20 >> /* Zero out the header space */ >> memset((char *)tip, 0, sizeof(tcpip_t)); >>=20 >> /* Create the TCP header */ >> tip->ip.src =3D htonl(pkt-> >=20 > FYI memset is a performance hit. Gcc generates a rep string instruction > which slows down CPU.. Better to do either set all fields individually > or fill in the pad values by doing structure assignment. Thanks for the info, will try and find some time to update pktgen. >=20 > *tip =3D (tcpi_ip_t) { > .ip.src =3D htonl(pkt->ip_src_addr.addr.ipv4_saddr), > ... > }; >=20 Regards, Keith