Commit 504ad98d authored by Soren Brinkmann's avatar Soren Brinkmann Committed by David S. Miller

net: macb: Remove 'unlikely' optimization

Coverage data suggests that the unlikely case of receiving data while
the receive handler is running may not be that unlikely.
Coverage data after running iperf for a while:
    91320:  891:	work_done = bp->macbgem_ops.mog_rx(bp, budget);
    91320:  892:	if (work_done < budget) {
     2362:  893:		napi_complete(napi);
        -:  894:
        -:  895:		/* Packets received while interrupts were disabled */
     4724:  896:		status = macb_readl(bp, RSR);
     2362:  897:		if (unlikely(status)) {
      762:  898:			if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
      762:  899:				macb_writel(bp, ISR, MACB_BIT(RCOMP));
        -:  900:			napi_reschedule(napi);
        -:  901:		} else {
     1600:  902:			macb_writel(bp, IER, MACB_RX_INT_FLAGS);
        -:  903:		}
        -:  904:	}
Signed-off-by: default avatarSoren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 02f7a34f
...@@ -893,7 +893,7 @@ static int macb_poll(struct napi_struct *napi, int budget) ...@@ -893,7 +893,7 @@ static int macb_poll(struct napi_struct *napi, int budget)
/* Packets received while interrupts were disabled */ /* Packets received while interrupts were disabled */
status = macb_readl(bp, RSR); status = macb_readl(bp, RSR);
if (unlikely(status)) { if (status) {
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
macb_writel(bp, ISR, MACB_BIT(RCOMP)); macb_writel(bp, ISR, MACB_BIT(RCOMP));
napi_reschedule(napi); napi_reschedule(napi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment