Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp627514imm; Fri, 31 Aug 2018 09:02:22 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb5UK6mKAij/TxlvQfmtIYHOfkcb1pirCraJQIA1KwSujd7jVwp5n0in1Z/vxg1UEg5PA0/ X-Received: by 2002:a17:902:710c:: with SMTP id a12-v6mr16294210pll.310.1535731342573; Fri, 31 Aug 2018 09:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535731342; cv=none; d=google.com; s=arc-20160816; b=bKhmPhu2ipViCgTv1qj6guy3/uru6D8XbUy+KFR+ZOsX5EClq3pVywrS1o+F9arBtx 6oRhQCJ75wCBtFXsyUHHEpZFDx+RQhhLhg9DPeD3AVkZeM99b55WUSPM9PaFLvaTIJFf ZO2mvy8rs9Koa8FKPozcBO1Oa41ZGw/c8Xf8rjUP6tsYzIkrceV2kvvu3x5F/sP58b3O uE5J1xC/hNeMfYV3C95OsQgRDu9ZvN//J1UwP0Da1OcSLP6EWFUDppGomayfGKJEWxd2 05hqNgpI/ljlUIi0gLwc4OuHIDE2skMOfpZZiV/sE2j2xFZJbxGljG040CqWSZB6twWh EZgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=3kXYkLRuWQss7TYqX729+PafjBFNZFYwim8AH1ssZZA=; b=Ovl9ofyfjgId791CUbJ/eGTFcsRkmHvUjseMtlZT34JbC9rqtOGc08tx88MOO1mRIg XSmoMyan4DMhADKZomAXXvHZHeqOzFjhnZKqjIHVQMFjwBxdc1t8ui2suJ/SoQT5FFCO wSg0Xv6yCePCJM6SzlFzfWbzG6RSzGwzV+LbWk/siTWmjjIt08Mug6yoFREg4NSjonYH iL+pZUkao3fKrOyKqeEDJiqq741049WD8L92e0v9dcOgyeeP8/XSNEV2X28GYYEz297n nYN0EweOU70c05IYjiDEFG66CEObBx1M0zmBRKxmp4TvcpFK/nkwpm/b4Je2SmEspDiC 8aZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fq5qLJ03; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r59-v6si9629676plb.39.2018.08.31.09.02.07; Fri, 31 Aug 2018 09:02:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fq5qLJ03; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728612AbeHaUJK (ORCPT + 99 others); Fri, 31 Aug 2018 16:09:10 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37182 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727286AbeHaUJK (ORCPT ); Fri, 31 Aug 2018 16:09:10 -0400 Received: by mail-wm0-f68.google.com with SMTP id n11-v6so5800784wmc.2; Fri, 31 Aug 2018 09:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3kXYkLRuWQss7TYqX729+PafjBFNZFYwim8AH1ssZZA=; b=Fq5qLJ03D9wOGlWhfXA7hp13SJYlWzKCxnvByz072qzHBkjf4jYLK2jMX0XzHhe8zb mpo4ZijHEuSVnPkvQGbvJ7Krr9ge1jbkA2iq20mE9xrsRsCh45mPRHmY/8kK7/1lYura ZwVWmF9fyS0K1AteQGafFSMTzKEvCk7Esw5btR/dt2B+CRtD53Wx6bKLO/Y+0CJp/+7f MtbdrDkshOhYJCkcsFBqNxtoKrBql2AivaXbXH2uF3P+uThGr5DyCuTjOqnfwJkzeki8 Jagm+LW4+movWSTKMeeAAqyG9WXy9fXi6t+WQqNChTu3KUMLQCLeD32VCkohAn5s7+9p fGSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3kXYkLRuWQss7TYqX729+PafjBFNZFYwim8AH1ssZZA=; b=lWH8H55pSTvhKrfoWdVUzzR67xz2YohEkfi8abbsn/N3kb+vPA1KZLBAHS1zRXs05b mQDCBHHskTmEkSvwLBHE0vODTvz69/ppJNuO0ey+tiCSS97r9qFRoE9XjJC+g9/v9wVG YyWW+elS8koNb3BVJIlqWYVCPIPdEzQ8Zs/5vUpJgE74bIo4x2wXwQMDsA2WrNIYE4Xo djs0wWlOx0g6/+MmQ1VVieLpbrG5WAXTwAV1RyijcrXO6Gj4SKyoDF6mMIGC9oYld9lC b3raVrT8j/eV/PNC9yNLkMO5dahpMp94uryC+PGvcxUs9ciOZmpePHR/FZgcqIM3XZzv 5b5g== X-Gm-Message-State: APzg51D02zNK5wVOeBJk931UkaaMvkQYqUFQuSFNzTKBYImLZwM/uPnJ VKaBtUIGLolOxDOs5ojuz3W6Rnl2DyOVf+VOh7I= X-Received: by 2002:a1c:b5d3:: with SMTP id e202-v6mr4824896wmf.23.1535731259103; Fri, 31 Aug 2018 09:00:59 -0700 (PDT) MIME-Version: 1.0 References: <1535453838-12154-1-git-send-email-sunil.kovvuri@gmail.com> <1535453838-12154-12-git-send-email-sunil.kovvuri@gmail.com> In-Reply-To: From: Sunil Kovvuri Date: Fri, 31 Aug 2018 21:30:47 +0530 Message-ID: Subject: Re: [PATCH 11/15] soc: octeontx2: Add Marvell OcteonTX2 CGX driver To: Arnd Bergmann Cc: LKML , olof@lixom.net, LAKML , linux-soc@vger.kernel.org, Sunil Goutham Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 31, 2018 at 7:50 PM Arnd Bergmann wrote: > > On Thu, Aug 30, 2018 at 7:55 PM Sunil Kovvuri wrote: > > On Thu, Aug 30, 2018 at 7:37 PM Arnd Bergmann wrote: > > > On Tue, Aug 28, 2018 at 3:10 PM Sunil Kovvuri wrote: > > > Ok, I think I understand the PF/VF distinction now. One (to me) > > > surprising aspect here is that you not just have one physical function > > > that you can use to assign resources to multiple virtual functions, > > > but also a second level of virtualization that is used to assign > > > resources to "physical functions" that are less physical than the > > > name suggests. > > > > Yes, PF is just for name sake, on-boot there is no difference between > > PFs/VFs as such. > > PF0 has privilege access to assign resources to all PFs and their VFs. > > This admin function driver loads for PF0. > > ok > > > > The part that I have not grasped yet is what the split between > > > the CGX and the AF is for, how they relate to one another, and > > > what the software abstraction for the two is going to be. > > > > In HW, CGX is a separate PCI device which handles the serdes and > > physical ethernet interface. > > Ethernet driver in drivers/net/ethernet can only communicate to > > admin function driver since they share a mailbox memory. > > So we had to bind both CGX and admin function drivers to almost work as one, > > inorder to provide relavent info to ethernet drivers. That's why we > > have many functions > > from CGX driver which AF uses. > > > > eg: Firmware gets to know about a physical interface status change, > > which CGX driver gets > > to know and it uses AF's mailbox communication to inform ethernet > > driver about the event. > > Would it make sense then to combine the CGX driver and the AF > driver into a single module? It sounds like you can never really > use one without the other anyway, and that would make it easier > to have a sensible abstraction to user space. > > Arnd Thanks for the suggestion, that does makes sense. Actually i did thought about it, but i was skeptical if it would be acceptable to make a single module out of drivers registering for two different PCI devices. Will wait for few more days for more feedback from anyone and port v2 series. Sunil.