netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eli Cohen <eli@dev.mellanox.co.il>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: invalid requirement from ethtool?
Date: Tue, 26 Jul 2011 15:42:22 +0300	[thread overview]
Message-ID: <20110726124222.GA4842@mtldesk30> (raw)

Hi,
I see the following text in include/linux/ethtool.h and wonder what is
the reasoning for requiring that both params cannot be zero. I could
not track when and who inserted this text as it dates before git was
used to track kernel code, but my feeling is that is related to a
specific hardware limitation.

        /* How many packets to delay an RX interrupt after
         * a packet arrives.  If 0, only rx_coalesce_usecs is
         * used.  It is illegal to set both usecs and max frames
         * to zero as this would cause RX interrupts to never be
         * generated.
         */
        __u32   rx_max_coalesced_frames;

        /* How many packets to delay a TX interrupt after
         * a packet is sent.  If 0, only tx_coalesce_usecs is
         * used.  It is illegal to set both usecs and max frames
         * to zero as this would cause TX interrupts to never be
         * generated.
         */
        __u32   tx_max_coalesced_frames;

I found this in tg3 driver:
         /* No rx interrupts will be generated if both are zero */
        if ((ec->rx_coalesce_usecs == 0) &&
            (ec->rx_max_coalesced_frames == 0))
                return -EINVAL;

However, bnx2 for example allows setting both to zero.

I think both params zero should be allowed and mean coalescing is not
operational, thus we can remove these comments from ethtool.h

             reply	other threads:[~2011-07-26 12:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 12:42 Eli Cohen [this message]
2011-07-28  5:43 ` invalid requirement from ethtool? David Miller
2011-07-28  7:23   ` Eli Cohen
2011-07-28  7:37     ` David Miller
2011-07-28 10:22       ` Ben Hutchings
2011-07-28 14:55         ` Eli Cohen
2011-08-15 17:24 ` Ben Hutchings
2011-08-15 20:49   ` David Miller

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=20110726124222.GA4842@mtldesk30 \
    --to=eli@dev.mellanox.co.il \
    --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 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).