From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: napi driver for multiport device with the only one dma channel - is it possible? Date: Thu, 13 Dec 2018 10:18:32 -0800 Message-ID: <20181213101832.00352dc2@xeon-e3> References: <6357c3732fba381aca915608e744571fcfbb2359.camel@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: Jan Petrous Return-path: Received: from mail-pf1-f170.google.com ([209.85.210.170]:34724 "EHLO mail-pf1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728123AbeLMSSf (ORCPT ); Thu, 13 Dec 2018 13:18:35 -0500 Received: by mail-pf1-f170.google.com with SMTP id h3so1512947pfg.1 for ; Thu, 13 Dec 2018 10:18:34 -0800 (PST) In-Reply-To: <6357c3732fba381aca915608e744571fcfbb2359.camel@nxp.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 13 Dec 2018 13:30:50 +0000 Jan Petrous wrote: > Hi, > > am I understand it right that I can not use NAPI-powered design in case > when there is only one rx queue and one tx queue (only two > dma channels) usable for data transfer with the ethernet controller for > all interfaces (2 ports or more)? > > I could imagine there would be possibility to declare for example rx > queue sharable between napi interfaces, but I was not able to find > anything like that. > > I agree that it is a bit strange configuration but we have to support > such corner case (when other dma channels are used by independent > systems). > > I seems like I have to create two drivers - one with napi, when at > least the same number of dma channels are free for use and second one > without napi (because of not enough dma channels). > > > Thanks. > /Jan It is possible. Sky2 for some hardware has a single NAPI (on port 0) and if the card is dual port the napi of port 0 is used by port 1.