Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752346AbbK3CCQ (ORCPT ); Sun, 29 Nov 2015 21:02:16 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:46249 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340AbbK3CCO (ORCPT ); Sun, 29 Nov 2015 21:02:14 -0500 Date: Sun, 29 Nov 2015 21:02:10 -0500 (EST) Message-Id: <20151129.210210.1777978635596463961.davem@davemloft.net> To: mw@semihalf.com Cc: f.fainelli@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, thomas.petazzoni@free-electrons.com, andrew@lunn.ch, linux@arm.linux.org.uk, jason@lakedaemon.net, myair@marvell.com, jaz@semihalf.com, simon.guinot@sequanux.org, xswang@marvell.com, nadavh@marvell.com, alior@marvell.com, tn@semihalf.com, gregory.clement@free-electrons.com, nitroshift@yahoo.com, sebastian.hesselbarth@gmail.com Subject: Re: [PATCH 00/13] mvneta Buffer Management and enhancements From: David Miller In-Reply-To: References: <1448178839-3541-1-git-send-email-mw@semihalf.com> <5655FF36.20202@gmail.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 29 Nov 2015 18:02:13 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1331 Lines: 28 From: Marcin Wojtas Date: Sun, 29 Nov 2015 14:21:35 +0100 >> Looking at your patches, it was not entirely clear to me how the buffer >> manager on these Marvell SoCs work, but other networking products have >> something similar, like Broadcom's Cable Modem SoCs (BCM33xx) FPM, and >> maybe Freescale's FMAN/DPAA seems to do something similar. >> >> Does the buffer manager allocation work by giving you a reference/token >> to a buffer as opposed to its address? If that is the case, it would be >> good to design support for such hardware in a way that it can be used by >> more drivers. > > It does not operate on a reference/token but buffer pointers (physical > adresses). It's a ring and you cannot control which buffer will be > taken at given moment. He understands this, he's asking you to make an "abstraction". FWIW, I know of at least one more chip that operates this way too and the code I wrote for it, particularly the buffer management, took a while to solidify. Common helpers for this kind of situation would have helped me back when I wrote it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/