From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by dpdk.org (Postfix) with ESMTP id 67C9D8D90 for ; Wed, 3 Feb 2016 15:08:53 +0100 (CET) Received: by mail-ob0-f180.google.com with SMTP id is5so30745527obc.0 for ; Wed, 03 Feb 2016 06:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=izU/VjYRBERFw0Ner0A3WUZg0kZ41sIHm+LTokjxTLA=; b=ZAnZeASXPsizy4fFNL+Qnk0Jbr6c8b79xIHKocBIB6hVj9hQ4hyBrjBEy2hpwgrHXT 9qhJDcg7ubD0coyMBMPjRQlh1gwwYPwone5B7xLrSVtmvtC0AsZ2o4dahczGsRIGoPMF +Zg4WGQed9hFX7vXOPSAQ8iNS1xn3+j63vnMqdtYPXDJgilQAK7gOOf1cP5tF5QjOBAm 7DMsWOWU5AH3m2na/rYsUjWbWng2U3a73lCysxTLOkoboa1WG2hcOvtINbar8Y+6woN3 HXj+xqudPmf6aDnQRFbGevybNVlcUXlxu5lwNEAbgDTKKhXFCKIPsMP91SgD30J4vitU qUaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=izU/VjYRBERFw0Ner0A3WUZg0kZ41sIHm+LTokjxTLA=; b=QZfLy/XyfOuP8XPylfApij52YjyCp01T22s3M9k3jhWyLAwwffslMhQUtGXEl7/OFA RPdKQ79onlD3CtWs0am6o8bg7m5WOEYxLQM3NippMKb9uorxxjMIyJ/9clb7X4cZH6Je KlfofduRhlYjbFOO43wcZW9h5X4mnG8axZITZxaAa9aHx3Q08epXS6ePBDg41omljDk8 IYUQTaHPGjNEEKESe5wI/T1BeCJXDo/F9XNHbmbr3mmB4O/IXiB79LgyETYMzWFuJR2+ zzKl5tSnuQfxESh+HXo8zW9fQ/iQO+82XcWXmd8bSQOCgg56pXHxkEb9MQ626cR0d5TH y3uQ== X-Gm-Message-State: AG10YORmrGjO6XHfdR6RKMtRlPZMjcW7/yUbMeO7UwmxG3q0cO5ZHAHtng/ULI9BEPxGQS79hKlDojgVi0ugUoCE X-Received: by 10.182.131.202 with SMTP id oo10mr2287789obb.72.1454508532290; Wed, 03 Feb 2016 06:08:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.180.72 with HTTP; Wed, 3 Feb 2016 06:08:32 -0800 (PST) In-Reply-To: <56B1E70B.4070607@caviumnetworks.com> References: <1454423239-16382-1-git-send-email-krytarowski@caviumnetworks.com> <56B1E70B.4070607@caviumnetworks.com> From: David Marchand Date: Wed, 3 Feb 2016 15:08:32 +0100 Message-ID: To: Kamil Rytarowski Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: Allow to overload pci_drv.devinit and pci_drv.devuninit 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: Wed, 03 Feb 2016 14:08:53 -0000 On Wed, Feb 3, 2016 at 12:39 PM, Kamil Rytarowski wrote: > W dniu 03.02.2016 o 09:47, David Marchand pisze: >> And do your custom things in its devinit function ? > > I'm requesting from PF the mode of the device to be initialized. This part > is handled dynamically and depends of the current configuration in PF. > > In my use-case there are two device types: primary (master) and secondary > (slave). For the primary VF I'm creating a DPDK port normally, for secondary > I retain configured PCI device for further reuse (and there is no port > created). Well, again, if you don't want to associate a port to this pci resource, why are you registering a eth_driver ? A eth_driver driver supposes you have a 1 - 1 relation between ethdev and pci resource. For your case, register a pci driver, then in your pci probing function (.devinit), depending on what you want to do, you can either do nothing (?) or create one or more ethdevs (see mlx* and cxgbe drivers). -- David Marchand