From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by dpdk.org (Postfix) with ESMTP id A7E5311C5 for ; Mon, 23 Mar 2015 16:19:01 +0100 (CET) Received: by ieclw3 with SMTP id lw3so38116348iec.2 for ; Mon, 23 Mar 2015 08:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=cJRhAqQqMz5g31RkEOPI1ZkUBF2Q12r9ZxMQURJQ56I=; b=bi3tOltE0ScfKIxxqvvAWBrmyAaJexL+56oZuUkvgdh9+BZtSG3z8pbw9/qledXTp6 FmBRBUmyAQFREsuMy+H0GZVRkYXIO33s3KG3U4Qlf02luxEsontOtiEDWetD1OUk9C8p TLOqe1SwITKlB8Nwir2uYLo7wswqSEMeTCr4kTekkUFdXEK5Bd3y2HUPDi0fCAfK4YbP ADsuO+DTvvN2Ut2Ln70Amtr2VNnWh1vJNSi0zb55q/AvEXyVGkQMsLfHacc+KXx3wtxi qnd6h2BtnqMACJWtTgijz+9ck1e5v2MfuWoykBKzchhBDfABYmk/xTHbFfefXNjrGDDW E26A== MIME-Version: 1.0 X-Received: by 10.107.132.158 with SMTP id o30mr132477703ioi.9.1427123940881; Mon, 23 Mar 2015 08:19:00 -0700 (PDT) Sender: kimimarosan@gmail.com Received: by 10.36.85.200 with HTTP; Mon, 23 Mar 2015 08:19:00 -0700 (PDT) Received: by 10.36.85.200 with HTTP; Mon, 23 Mar 2015 08:19:00 -0700 (PDT) In-Reply-To: <20150323145958.GA12720@bricha3-MOBL3> References: <20150323145958.GA12720@bricha3-MOBL3> Date: Mon, 23 Mar 2015 17:19:00 +0200 X-Google-Sender-Auth: 62urTQTRJnUFgLzLT3syY5uK8Cc Message-ID: From: Dor Green To: Bruce Richardson Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Packet data out of bounds after rte_eth_rx_burst 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, 23 Mar 2015 15:19:02 -0000 I changed it to free and it still happens. Note that the segmentation fault happens before that anyway. I am using 1.7.1 at the moment. I can try using a newer version. On 23 Mar 2015 17:00, "Bruce Richardson" wrote: > On Mon, Mar 23, 2015 at 04:24:18PM +0200, Dor Green wrote: > > I'm running a small app which captures packets on a single lcore and > > then passes it to other workers for processing. > > > > Before even sending it to processing, when checking some minor > > information in the packet mbuf's data I get a segfault. > > > > This code, for example gets a segfault: > > > > struct rte_mbuf *pkts[PKTS_BURST_SIZE]; > > > > for (p = 0; p < portnb; ++p) { > > nbrx = rte_eth_rx_burst(p, 0, pkts, PKTS_BURST_SIZE); > > > > if (unlikely(nbrx == 0)) { > > continue; > > } > > > > for (i = 0; likely(i < nbrx); i++) { > > printf("Pkt %c\n", pkts[i]->pkt->data[0]); > > rte_mempool_put(pktmbuf_pool, (void *const)pkts[i]); > > } > > } > > > > This doesn't happen on most packets, but when I used packets from a > > certain cap it happened often (SSL traffic). In gdb the packet objects > > looked like this: > > {next = 0x0, data = 0x62132136406a6f6, data_len = 263, nb_segs = 1 > > '\001', in_port = 0 '\000', pkt_len = 263, vlan_macip = {data = 55111, > > f = {l3_len = 327, l2_len = 107, vlan_tci = 0}}, hash = { > > rss = 311317915, fdir = {hash = 21915, id = 4750}, sched = > > 311317915}} (Invalid) > > {next = 0x0, data = 0x7ffe43d8f640, data_len = 73, nb_segs = 1 > > '\001', in_port = 0 '\000', pkt_len = 73, vlan_macip = {data = 0, f = > > {l3_len = 0, l2_len = 0, vlan_tci = 0}}, hash = {rss = 311317915, > > fdir = {hash = 21915, id = 4750}, sched = 311317915}} (Valid) > > {next = 0x0, data = 0x7ffe43d7fa40, data_len = 74, nb_segs = 1 '\001', > > in_port = 0 '\000', pkt_len = 74, vlan_macip = {data = 0, f = {l3_len > > = 0, l2_len = 0, vlan_tci = 0}}, hash = {rss = 311317915, > > fdir = {hash = 21915, id = 4750}, sched = 311317915}} (Valid) > > {next = 0x0, data = 0x7ffe43d7ff80, data_len = 66, nb_segs = 1 '\001', > > in_port = 0 '\000', pkt_len = 66, vlan_macip = {data = 0, f = {l3_len > > = 0, l2_len = 0, vlan_tci = 0}}, hash = {rss = 311317915, > > fdir = {hash = 21915, id = 4750}, sched = 311317915}} (Valid) > > {next = 0x0, data = 0x28153a8e63b3afc4, data_len = 263, nb_segs = 1 > > '\001', in_port = 0 '\000', pkt_len = 263, vlan_macip = {data = 59535, > > f = {l3_len = 143, l2_len = 116, vlan_tci = 0}}, hash = { > > rss = 311317915, fdir = {hash = 21915, id = 4750}, sched = > > 311317915}} (Invalid) > > > > Note that in the first packet, the length does not match the actual > > packet length (it does in the last though). The rest of the packets > > are placed in the hugemem range as they should be. > > > > I'm running on Linux 3.2.0-77, the NIC is "10G 2P X520", I have 4 1GB > > huge pages. > > > > Any ideas will be appreciated. > > What version of DPDK are you using? If you update the code to work with the > latest code (or 2.0.0-rc2), does the problem still occur? Also, does it > make > any difference calling rte_pktmbuf_free rather thatn calling mempool_put > directly? > > /Bruce >