Thread (6 messages) flat view 6 messages, 4 authors, 2016-08-03

Re: [PATCH net 1/2] tg3: Fix for diasllow rx coalescing time to be 0

From: Michael Chan <michael.chan@broadcom.com>
Date: 2016-08-03 22:15:39

On Wed, Aug 3, 2016 at 9:04 AM, Rick Jones [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help