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 2FC41C5D2 for ; Tue, 28 Apr 2015 15:52:11 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 28 Apr 2015 06:52:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,663,1422950400"; d="scan'208";a="717115501" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga002.fm.intel.com with ESMTP; 28 Apr 2015 06:52:09 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.76]) by IRSMSX153.ger.corp.intel.com ([169.254.9.197]) with mapi id 14.03.0224.002; Tue, 28 Apr 2015 14:52:09 +0100 From: "Mcnamara, John" To: Tero Aho , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/3] pcap: add support for jumbo frames Thread-Index: AQHQUpNiALjD7CNfLEuNLMuzXnEul51iz2qg Date: Tue, 28 Apr 2015 13:52:08 +0000 Message-ID: References: <1425044560-23397-1-git-send-email-tero.aho@coriant.com> <1425044560-23397-3-git-send-email-tero.aho@coriant.com> In-Reply-To: <1425044560-23397-3-git-send-email-tero.aho@coriant.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/3] pcap: add support for jumbo frames 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, 28 Apr 2015 13:52:11 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tero Aho > Sent: Friday, February 27, 2015 1:43 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 2/3] pcap: add support for jumbo frames >=20 > Extend eth_pcap_rx and eth_pcap_tx to support jumbo frames. > On receive side read large packets into multiple mbufs and on the transmi= t > side do the opposite. >=20 > +eth_pcap_tx_jumbo(pcap_t *pcap, > + struct rte_mbuf *mbuf) { > + u_char data[ETHER_MAX_JUMBO_FRAME_LEN]; > + uint16_t data_len =3D 0; > + > + while (mbuf !=3D NULL) { > + /* There is no writev style function in libpcap, */ > + /* we unfortunately have to copy data to a buffer. */ > + rte_memcpy(data + data_len, rte_pktmbuf_mtod(mbuf, void > *), > + mbuf->data_len); > + data_len +=3D mbuf->data_len; > + mbuf =3D mbuf->next; > + } Hi Tero, Not sure if it is possible in practice to overflow data[ETHER_MAX_JUMBO_FRA= ME_LEN] but there should probably be a check. John. --=20