From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f43.google.com (mail-pg0-f43.google.com [74.125.83.43]) by dpdk.org (Postfix) with ESMTP id AAC1E2B94 for ; Sat, 24 Dec 2016 05:53:39 +0100 (CET) Received: by mail-pg0-f43.google.com with SMTP id y62so63751931pgy.1 for ; Fri, 23 Dec 2016 20:53:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsimple-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1gNunD14BWxeQb4bt5d6AB/5Mq7zeYdjA6AQuFLcsfs=; b=iwpvLGtRUkLRVt+pMjXei33IiuZBE+fO4kH+i/avfX876M3SjhQa0F8UFYASDphwmu vMvdcS3EPcSSr/cFQUL3pnM+rmUHZQPGE6w6DWnIhR0m3I2mDJgXiXTGtJrodw01Cr8X 47x28OjQaQQ0ZRq0XtXgNBRddn5FuxUv4aQKcdW720+oAljf4iN7sLomcLrKgCDSEKWg CUtQN1ZrnsWnqkioIKHSXat26peXQBCUK9kFqrldNhb9jglod5LtXmG/p9s90S8DeIY+ NP/ZC9jrmmS104a8sW0tfXcC/OGWLFhsONh1mhBSAkKV+E7iYMCKrGKu7HC4XAMQYpKd pJGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1gNunD14BWxeQb4bt5d6AB/5Mq7zeYdjA6AQuFLcsfs=; b=goWYk7q2Nk2IP/fchYOakG+h5LBmgnMUR24KcIbDRFehqxVe6nZpFQQnE/0d55K+17 uLZQ5gegELcT1S6xmvR2P1LjwHi2ssVFmmMfcsMTI0vIOzZxtBJvKVVsbJvxA5pJPCWE ojCxR+dxaOckj1a0vqwxX5cmcZHe9qyDEDuaoAIVYSpFlb05IsqjCtcpTdDE+uYTvM4G 2KcscBxMgZcP9exVeGNjwuhiZsW4+2rScDeDF+hkfsy4bBGbLwMs581GiHDlWT6bs8vi giLhaublqeorIaYTaYuVj5/vLIaGlxcZI27vJCjUzonvm6U4cL0xRMyBP3FJdbNZd+20 Bf4Q== X-Gm-Message-State: AIkVDXLKGvzEmbg7So2axmd4vnJgbKYHTrpPGtGgN7MENzJOD8XkFSjJdCfAdEEq/0M/sXeF X-Received: by 10.84.128.195 with SMTP id a61mr35873014pla.55.1482555218707; Fri, 23 Dec 2016 20:53:38 -0800 (PST) Received: from [192.168.1.104] ([116.202.130.161]) by smtp.gmail.com with ESMTPSA id y2sm65608203pff.82.2016.12.23.20.53.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Dec 2016 20:53:38 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) From: Kumaraparameshwaran Rathnavel In-Reply-To: Date: Sat, 24 Dec 2016 10:23:34 +0530 Cc: users@dpdk.org Content-Transfer-Encoding: quoted-printable Message-Id: <1E0F9EF4-CD19-4944-94B8-8CA273C77D83@cloudsimple.com> References: <35D0462D-761F-4C7A-A0F4-FD72EBDFA8EB@cloudsimple.com> To: Take Ceara X-Mailer: Apple Mail (2.3251) Subject: Re: [dpdk-users] Freeing up Mbuf 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: Sat, 24 Dec 2016 04:53:40 -0000 Hi Dumitru, Thankyou for the response. The rte_pktmbuf_clone routine allocates a new = mbuf right? I see that it allocated a newmbuf from the specified pool. Thanking You, Param. > On 22-Dec-2016, at 10:30 PM, Take Ceara = wrote: >=20 > Hi Param, >=20 > On Thu, Dec 22, 2016 at 5:47 PM, Kumaraparameshwaran Rathnavel > wrote: >> Hi All, >>=20 >> The mbuf implementation is similar to the Network Driver of the = FreeBSD Network Driver. In DPDK userspace driver it is the = responsibility of the rte_eth_dev implementation to free the memory = buffer associated with a Queue when descriptors reach below a threshold. = In FreeBSD the user can actually specify the free routine for the mbuf = when the transmit routine is called. Is this implemented in DPDK. I = basically will give the data buffer of the application layer that will = be chained with the Transport Layer Headers and I do not want to free up = the routines always. Is this possible? >=20 > You can send a clone of the mbuf (see rte_pktmbuf_clone). Cloning the > mbuf will increase the refcount of the direct mbuf (that stores the > actual data). When the driver is done transmitting the clone it will > decrement the refcount and only free the direct mbuf if the refcount > is 0 (see rte_pktmbuf_free_seg and __rte_pktmbuf_prefree_seg). >=20 > However, you need to be careful if you plan to change the data stored > in the direct mbuf and make sure there are no more clones of the data > pending transmission. >=20 >>=20 >> Thanking You, >> Param. >=20 > Regards, > Dumitru