Commit fe78d263 authored by Vladislav Zolotarov's avatar Vladislav Zolotarov Committed by David S. Miller

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: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarVladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cdd861d6
...@@ -507,8 +507,11 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget) ...@@ -507,8 +507,11 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
len = le16_to_cpu(cqe->fast_path_cqe.pkt_len); len = le16_to_cpu(cqe->fast_path_cqe.pkt_len);
pad = cqe->fast_path_cqe.placement_offset; pad = cqe->fast_path_cqe.placement_offset;
/* If CQE is marked both TPA_START and TPA_END /* - If CQE is marked both TPA_START and TPA_END it is
it is a non-TPA CQE */ * a non-TPA CQE.
* - FP CQE will always have either TPA_START or/and
* TPA_STOP flags set.
*/
if ((!fp->disable_tpa) && if ((!fp->disable_tpa) &&
(TPA_TYPE(cqe_fp_flags) != (TPA_TYPE(cqe_fp_flags) !=
(TPA_TYPE_START | TPA_TYPE_END))) { (TPA_TYPE_START | TPA_TYPE_END))) {
...@@ -526,9 +529,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget) ...@@ -526,9 +529,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
bnx2x_set_skb_rxhash(bp, cqe, skb); bnx2x_set_skb_rxhash(bp, cqe, skb);
goto next_rx; goto next_rx;
} } else { /* TPA_STOP */
if (TPA_TYPE(cqe_fp_flags) == TPA_TYPE_END) {
DP(NETIF_MSG_RX_STATUS, DP(NETIF_MSG_RX_STATUS,
"calling tpa_stop on queue %d\n", "calling tpa_stop on queue %d\n",
queue); queue);
......
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