netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: Rick Jones <rick.jones2@hpe.com>
Cc: skallam <siva.kallam@broadcom.com>,
	David Miller <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>,
	Prashant Sreedharan <prashant@broadcom.com>,
	Satish Baddipadige <satish.baddipadige@broadcom.com>
Subject: Re: [PATCH net 1/2] tg3: Fix for diasllow rx coalescing time to be 0
Date: Wed, 3 Aug 2016 15:15:35 -0700	[thread overview]
Message-ID: <CACKFLikoKktanhxgaMeSA0NGmA6RiaBnxnCXUYfcssYWefdMVg@mail.gmail.com> (raw)
In-Reply-To: <7d591d9f-463b-cedd-5590-c4ff8260ffa0@hpe.com>

On Wed, Aug 3, 2016 at 9:04 AM, Rick Jones <rick.jones2@hpe.com> wrote:
>
> Should anything then happen with:
>
>         /* No rx interrupts will be generated if both are zero */
>         if ((ec->rx_coalesce_usecs == 0) &&
>             (ec->rx_max_coalesced_frames == 0))
>                 return -EINVAL;
>
>
> which is the next block of code?  The logic there seems to suggest that it
> was intended to be able to have an rx_coalesce_usecs of 0 and rely on packet
> arrival to trigger an interrupt.  Presumably setting rx_max_coalesced_frames
> to 1 to disable interrupt coalescing.
>

I remember writing this block of code over 10 years ago for early
generations of the chip.  Newer chips seem to behave differently and
rx_coalesce_usecs can never be zero.  So this block can be removed now
that the condition can never be true.  We should probably leave a
comment there for future reference.

  reply	other threads:[~2016-08-03 22:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  4:13 [PATCH net 0/2] tg3: Disallow 0 rx coalesce time and correctly report RSS queues in tg3_get_rxnfc skallam
2016-08-03  4:13 ` [PATCH net 1/2] tg3: Fix for diasllow rx coalescing time to be 0 skallam
2016-08-03 16:04   ` Rick Jones
2016-08-03 22:15     ` Michael Chan [this message]
2016-08-03  4:14 ` [PATCH net 2/2] tg3: Report the correct number of RSS queues through tg3_get_rxnfc skallam
2016-08-03 18:56 ` [PATCH net 0/2] tg3: Disallow 0 rx coalesce time and correctly report RSS queues in tg3_get_rxnfc David Miller
  -- strict thread matches above, loose matches on Subject: below --
2016-08-05  5:44 [PATCH net 1/2] tg3: Fix for diasllow rx coalescing time to be 0 Siva Reddy Kallam

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=CACKFLikoKktanhxgaMeSA0NGmA6RiaBnxnCXUYfcssYWefdMVg@mail.gmail.com \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=prashant@broadcom.com \
    --cc=rick.jones2@hpe.com \
    --cc=satish.baddipadige@broadcom.com \
    --cc=siva.kallam@broadcom.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).