diff mbox series

[net-next,2/6] ionic: reverse an interrupt coalesce calculation

Message ID 20191022203113.30015-3-snelson@pensando.io
State Changes Requested
Delegated to: David Miller
Headers show
Series ionic updates | expand

Commit Message

Shannon Nelson Oct. 22, 2019, 8:31 p.m. UTC
Fix the initial interrupt coalesce usec-to-hw setting
to actually be usec-to-hw.

Fixes: 780eded34ccc ("ionic: report users coalesce request")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn Oct. 23, 2019, 1:22 a.m. UTC | #1
On Tue, Oct 22, 2019 at 01:31:09PM -0700, Shannon Nelson wrote:
> Fix the initial interrupt coalesce usec-to-hw setting
> to actually be usec-to-hw.
> 
> Fixes: 780eded34ccc ("ionic: report users coalesce request")
> Signed-off-by: Shannon Nelson <snelson@pensando.io>

Hi Shannon

How bad is this? Should it be backported? If so, you should send it as
a separate patch for net.

  Andrew
Shannon Nelson Oct. 23, 2019, 2:09 a.m. UTC | #2
On 10/22/19 6:22 PM, Andrew Lunn wrote:
> On Tue, Oct 22, 2019 at 01:31:09PM -0700, Shannon Nelson wrote:
>> Fix the initial interrupt coalesce usec-to-hw setting
>> to actually be usec-to-hw.
>>
>> Fixes: 780eded34ccc ("ionic: report users coalesce request")
>> Signed-off-by: Shannon Nelson <snelson@pensando.io>
> Hi Shannon
>
> How bad is this? Should it be backported? If so, you should send it as
> a separate patch for net.
>
>    Andrew

Well, it doesn't "break" anything, but it does end up initializing the 
coalesce value to 0, aka turns it off.  The easy work-around is for the 
user to set a new value, then all is well.  However, since v5.4 is 
intended as an LTS, this probably should get promoted into net.  If 
there aren't many other comments, I'll likely turn this around tomorrow 
afternoon.

sln
Jakub Kicinski Oct. 23, 2019, 2:42 a.m. UTC | #3
On Tue, 22 Oct 2019 19:09:40 -0700, Shannon Nelson wrote:
> On 10/22/19 6:22 PM, Andrew Lunn wrote:
> > On Tue, Oct 22, 2019 at 01:31:09PM -0700, Shannon Nelson wrote:  
> >> Fix the initial interrupt coalesce usec-to-hw setting
> >> to actually be usec-to-hw.
> >>
> >> Fixes: 780eded34ccc ("ionic: report users coalesce request")
> >> Signed-off-by: Shannon Nelson <snelson@pensando.io>  
> > Hi Shannon
> >
> > How bad is this? Should it be backported? If so, you should send it as
> > a separate patch for net.
> 
> Well, it doesn't "break" anything, but it does end up initializing the 
> coalesce value to 0, aka turns it off.  The easy work-around is for the 
> user to set a new value, then all is well.  However, since v5.4 is 
> intended as an LTS, this probably should get promoted into net.  If 
> there aren't many other comments, I'll likely turn this around tomorrow 
> afternoon.

I think the commit in question only landed in net-next after the merge
window. Perhaps the larger problem with the coalescing could have been
fixed in net, but now I think it may be too late, no?
diff mbox series

Patch

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 559b96ae48f5..cf64dea53f82 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1686,7 +1686,7 @@  static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index
 
 	/* Convert the default coalesce value to actual hw resolution */
 	lif->rx_coalesce_usecs = IONIC_ITR_COAL_USEC_DEFAULT;
-	lif->rx_coalesce_hw = ionic_coal_hw_to_usec(lif->ionic,
+	lif->rx_coalesce_hw = ionic_coal_usec_to_hw(lif->ionic,
 						    lif->rx_coalesce_usecs);
 
 	snprintf(lif->name, sizeof(lif->name), "lif%u", index);