From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from demumfd002.nsn-inter.net (demumfd002.nsn-inter.net [93.183.12.31]) by dpdk.org (Postfix) with ESMTP id C122B58D5 for ; Tue, 25 Mar 2014 13:27:07 +0100 (CET) Received: from demuprx016.emea.nsn-intra.net ([10.150.129.55]) by demumfd002.nsn-inter.net (8.14.3/8.14.3) with ESMTP id s2PCSeQF012601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 25 Mar 2014 12:28:40 GMT Received: from SGSIHTC001.nsn-intra.net ([10.159.225.18]) by demuprx016.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id s2PCSc0f006862 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 25 Mar 2014 13:28:39 +0100 Received: from SGSIMBX007.nsn-intra.net ([169.254.7.216]) by SGSIHTC001.nsn-intra.net ([10.159.225.18]) with mapi id 14.03.0123.003; Tue, 25 Mar 2014 20:28:37 +0800 From: "Jain, Neeraj 3. (NSN - IN/Bangalore)" To: "dev@dpdk.org" Thread-Topic: Question regarding multi-segment packet forwarding Thread-Index: AQHPSCW+8xTNvKm/Z0OniJ8VYOOeag== Date: Tue, 25 Mar 2014 12:28:37 +0000 Message-ID: <2AA69572D8087D4FA7345FB70631D59A1FD79E20@SGSIMBX007.nsn-intra.net> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.159.225.111] MIME-Version: 1.0 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 6936 X-purgate-ID: 151667::1395750520-0000137C-97613722/0/0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Question regarding multi-segment packet forwarding 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, 25 Mar 2014 12:27:07 -0000 Hi, I have a question regarding sending of multi-segment packets. I have modifi= ed the l2fwd sample application to send a multi-segment packet on tx queue = whenever the application receives any packet on Rx queue. Pseudo-code is as= below Function l2fwd_simple_forward(.....) { Allocate new mbuf with "rte_pktmbuf_alloc" Copy Ethernet, IP and UDP Headers into this new mbuf Remove the Ethernet, ip and udp header from the beginning of received mbuf = by calling rte_pktmbuf_adj api Join the received buffer with new mbuf as follows: { new_mbuf->pkt.next =3D mbuf /* accumulate number of segments and total length. */ new_mbuf ->pkt.nb_segs =3D new_mbuf->pkt.nb_segs + mbuf->pkt.nb= _segs; new_mbuf ->pkt.pkt_len +=3D mbuf->pkt.pkt_len; /* reset pkt_len and nb_segs for chained fragment. */ mbuf->pkt.pkt_len =3D mbuf->pkt.data_len; mbuf->pkt.nb_segs =3D 1; } } When I call rte_pktmbuf_dump on the new_mbuf, it shows both the segments. A= lso l2fwd_send_packet (which eventually calls rte_eth_tx_burst) returns 1 i= ndicating that packet was sent successfully. But I do not receive any packe= t on the other end. However, instead of multi-segment packet, if I try sending only the new_mbu= f that was created, then the packet is sent successfully. So, Can you please advice if I am correct in the way multi-segment packets = are created or if I am missing something here. Thanks ~Neeraj