aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x
diff options
context:
space:
mode:
authorVladislav Zolotarov <vladz@broadcom.com>2010-10-17 19:02:20 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-18 09:51:57 -0400
commitfe78d2637ad9acc6414e36ce781aadc8c77d560d (patch)
treef7a30b69036aac9c058a8c6a49e1cd27fc9fb72e /drivers/net/bnx2x
parentcdd861d68d27a0d0ebe4e641d20d8cfa5cef405f (diff)
bnx2x: Optimized the branching in the bnx2x_rx_int()
Optimized the branching in the bnx2x_rx_int() based on the fact that FP CQE will always have at least one of START or STOP flags set, so if not both bits are set and START bit is not set, then it's a STOP bit that is set. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 97ef674dcc34..cb2a3d625ad1 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -507,8 +507,11 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
507 len = le16_to_cpu(cqe->fast_path_cqe.pkt_len); 507 len = le16_to_cpu(cqe->fast_path_cqe.pkt_len);
508 pad = cqe->fast_path_cqe.placement_offset; 508 pad = cqe->fast_path_cqe.placement_offset;
509 509
510 /* If CQE is marked both TPA_START and TPA_END 510 /* - If CQE is marked both TPA_START and TPA_END it is
511 it is a non-TPA CQE */ 511 * a non-TPA CQE.
512 * - FP CQE will always have either TPA_START or/and
513 * TPA_STOP flags set.
514 */
512 if ((!fp->disable_tpa) && 515 if ((!fp->disable_tpa) &&
513 (TPA_TYPE(cqe_fp_flags) != 516 (TPA_TYPE(cqe_fp_flags) !=
514 (TPA_TYPE_START | TPA_TYPE_END))) { 517 (TPA_TYPE_START | TPA_TYPE_END))) {
@@ -526,9 +529,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
526 bnx2x_set_skb_rxhash(bp, cqe, skb); 529 bnx2x_set_skb_rxhash(bp, cqe, skb);
527 530
528 goto next_rx; 531 goto next_rx;
529 } 532 } else { /* TPA_STOP */
530
531 if (TPA_TYPE(cqe_fp_flags) == TPA_TYPE_END) {
532 DP(NETIF_MSG_RX_STATUS, 533 DP(NETIF_MSG_RX_STATUS,
533 "calling tpa_stop on queue %d\n", 534 "calling tpa_stop on queue %d\n",
534 queue); 535 queue);