All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: "Mintz, Yuval" <Yuval.Mintz@cavium.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.
Date: Mon, 19 Sep 2016 02:40:45 -0700	[thread overview]
Message-ID: <CACKFLi=H2dnv4hVi4hGCZC4LJabr4SK3f=z5+JzJE7y9jEMvMw@mail.gmail.com> (raw)
In-Reply-To: <BL2PR07MB23063DF1E02AA72ABE37DB4B8DF40@BL2PR07MB2306.namprd07.prod.outlook.com>

On Mon, Sep 19, 2016 at 2:21 AM, Mintz, Yuval <Yuval.Mintz@cavium.com> wrote:
>> >> The existing code is inconsistent in reporting and accepting the
>> >> combined channel count.  bnxt_get_channels() reports maximum combined
>> >> as the maximum rx count.  bnxt_set_channels() accepts combined count
>> >> that cannot be bigger than max rx or max tx.
>> >>
>> >> For example, if max rx = 2 and max tx = 1, we report max supported
>> >> combined to be 2.  But if the user tries to set combined to 2, it
>> >> will fail because 2 is bigger than max tx which is 1.
>> >>
>> >> Fix the code to be consistent.  Max allowed combined = max(max_rx,
>> max_tx).
>> >> We will accept a combined channel count <= max(max_rx, max_tx).
>> >
>> > Don't you mean the 'max allowed combined = min(max_rx, max_tx)'.
>> > How does using 'max' change the faulty scenario you've described?
>>
>> I'm fixing the inconsistency described in the first 2 paragraphs.  The driver logic
>> allows a combined ring to be rx or tx only.  In the above example, we allow
>> combined to be set to 2.  The 2nd combined ring supports rx only.
>
> Then what makes it a combined channel?
> Sounds to me like in the above scenario you should have claimed support for:
>   - max rx == 2
>   - max tx == 1
>   - max combined == 1

Our implementation will report:

max rx 2
max tx 1
max combined 2

If the user chooses 2 rx and 1 tx, he will use 3 msix vectors (3
completion rings, etc).  If the user chooses 2 combined (1 with rx/tx,
1 with rx only), he will use 2 msix vectors (2 completion rings, etc).
With a large number of NPAR functions and SRIOV functions, the number
of rings available per function may not be symmetrical.  We just want
maximum flexibility to make use of all available resources in 2
different modes (one that uses more resources and one that uses less).

  reply	other threads:[~2016-09-19  9:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19  7:57 [PATCH net-next 00/10] bnxt: update for net-next Michael Chan
2016-09-19  7:58 ` [PATCH net-next 01/10] bnxt_en: Use RSS flags defined in the bnxt_hsi.h file Michael Chan
2016-09-19  7:58 ` [PATCH net-next 02/10] bnxt_en: Simplify PCI device names and add additinal PCI IDs Michael Chan
2016-09-19  7:58 ` [PATCH net-next 03/10] bnxt_en: Update to firmware interface spec 1.5.1 Michael Chan
2016-09-19  7:58 ` [PATCH net-next 04/10] bnxt_en: Added support for Secure Firmware Update Michael Chan
2016-09-19  8:16   ` Mintz, Yuval
2016-09-19  9:03     ` Michael Chan
2016-09-19 19:48   ` kbuild test robot
2016-09-19  7:58 ` [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts Michael Chan
2016-09-19  8:33   ` Mintz, Yuval
2016-09-19  8:57     ` Michael Chan
2016-09-19  9:21       ` Mintz, Yuval
2016-09-19  9:40         ` Michael Chan [this message]
2016-09-19  9:51           ` Mintz, Yuval
2016-09-19 16:39             ` Michael Chan
2016-09-19  7:58 ` [PATCH net-next 06/10] bnxt_en: Re-arrange bnxt_hwrm_func_qcaps() Michael Chan
2016-09-19  7:58 ` [PATCH net-next 07/10] bnxt_en: Call firmware to approve the random VF MAC address Michael Chan
2016-09-19  7:58 ` [PATCH net-next 08/10] bnxt_en: Pad TX packets below 52 bytes Michael Chan
2016-09-19  7:58 ` [PATCH net-next 09/10] bnxt_en: Support for "ethtool -r" command Michael Chan
2016-09-19  8:27   ` Mintz, Yuval
2016-09-19  7:58 ` [PATCH net-next 10/10] bnxt_en: Fixed the VF link status after a link state change Michael Chan
2016-09-20  1:32 ` [PATCH net-next 00/10] bnxt: update for net-next David Miller
2016-09-20  7:03   ` Michael Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACKFLi=H2dnv4hVi4hGCZC4LJabr4SK3f=z5+JzJE7y9jEMvMw@mail.gmail.com' \
    --to=michael.chan@broadcom.com \
    --cc=Yuval.Mintz@cavium.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.