From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by dpdk.org (Postfix) with ESMTP id 21961FB62 for ; Tue, 20 Dec 2016 13:04:14 +0100 (CET) Received: by mail-qk0-f174.google.com with SMTP id u25so35141722qki.2 for ; Tue, 20 Dec 2016 04:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+9axUWv//Cck0sfEj6U/u27TmHgq/pmnFupQ7HAr/nc=; b=TJU49RFlRiVw/JFdaAXt7dwg0VZ1vMeBtDVJlkKywbhzZvw7YXb8bUGuO5kbbvYxTa u4pX9awviJ0tM3zsA4BZ2QRUAqBh5o2YiKCM1St9DGmvj4fkQ/GF+6Ac5XReRVbipvEf DAsHX5NjC/0LY5RrnE3gJHIV1F+5DN4qSDa+xbPzyGlIoddBUF/2hpL8zTaaDOnc1INw bpXfRfkhYBdOrX1gUkYT3dU/+VK3VxZXlUH0WWCX+ygv4DNPuK1Sa9myL0VbwRu6+Yze KIeXQu2r81GSbBmIu3JLLrTXBpqWvAwCNURmBu6QjJ4O9iO7Vs+mRUAy7bFHBNYHG6GS oB1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+9axUWv//Cck0sfEj6U/u27TmHgq/pmnFupQ7HAr/nc=; b=YSypcyDR8FkrOLmUI2lF+58/3ZHgSrLNiwo7kUcRkYPW8tdVd5Fu+DgOY1w49lhW0v luApoqFPj3r2iPIa70vOa15DJ4K7h45OyeiWs3CK6z1AtYDwyrHJqGIZnyKkCdXahB62 rYkv6EZy1zbXPnrVw3WAL1i/23sDhBjT068b5tbIODLBkGkJXlJijRGpbbf3uNhkKGa2 /OIIf7Ct+THhVcj8mmI2IbBjnJY5yi89lYzAxPDL4oF/xJV4b6lNOMNit64kGfdaBUA6 6pYawTyZwKRCrsGyhT9LsbsYksQ9G4O/TPrVOA8pDENMk57Zdw8G6f87Wb1ozYvL6gdN UWpA== X-Gm-Message-State: AIkVDXLgxx5pxJVm83n085lRqfWDXR+g9mf2XY0y2TxBLk6l36QzudsH2RMHFOkiNQNDDb+OjJP6JnqTeuuKfg== X-Received: by 10.55.42.34 with SMTP id q34mr7006338qkh.91.1482235453421; Tue, 20 Dec 2016 04:04:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.29.137 with HTTP; Tue, 20 Dec 2016 04:04:13 -0800 (PST) From: Nubin Stanley Date: Tue, 20 Dec 2016 17:34:13 +0530 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Usage of "rte_pktmbuf_attach" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 12:04:14 -0000 Hi All I have a doubt regarding the usage of : static inline void rte_pktmbuf_attach(struct rte_mbuf **mi*, struct rte_mbuf **m*) Say "mi" is a newly allocated buffer. "m" is a multi-segment buffer (say with 2 segments). Now, within the attach API, I see that "mi->nb_segs" is always set to 1. attach_frames(in_pkt) // in_pkt has 2 segments { pkt_1 = alloc(); // single segment pkt_2 = alloc(); // single segment rte_pktmbuf_attach(pkt_2, in_pkt); <> rte_pktmbuf_chain(pkt_1, pkt_2); } 1) Will the attach ensure that whatever pkt_2 points to has the 2 segments in in_pkt ? Or should I somehow loop and allocate new buffers and do multiple attaches ? 2) Say, attach is properly done, the "chain" API should work as usual ? Regards Nubin Stanley