diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2013-03-11 01:17:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-12 07:54:24 -0400 |
commit | ab5777d7483026c9bf795eba573c22ef8d2e32cd (patch) | |
tree | d14f93ea63acaac954c8f3735cd7b024db0492bd | |
parent | 3c76feff68559bf9ec08d4d86abe57bc56a9847a (diff) |
bnx2x: Get gso_segs from FW
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index a923bc4d5a1f..cd74ee5be5f4 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -451,7 +451,8 @@ static void bnx2x_tpa_start(struct bnx2x_fastpath *fp, u16 queue, | |||
451 | * Compute number of aggregated segments, and gso_type. | 451 | * Compute number of aggregated segments, and gso_type. |
452 | */ | 452 | */ |
453 | static void bnx2x_set_gro_params(struct sk_buff *skb, u16 parsing_flags, | 453 | static void bnx2x_set_gro_params(struct sk_buff *skb, u16 parsing_flags, |
454 | u16 len_on_bd, unsigned int pkt_len) | 454 | u16 len_on_bd, unsigned int pkt_len, |
455 | u16 num_of_coalesced_segs) | ||
455 | { | 456 | { |
456 | /* TPA aggregation won't have either IP options or TCP options | 457 | /* TPA aggregation won't have either IP options or TCP options |
457 | * other than timestamp or IPv6 extension headers. | 458 | * other than timestamp or IPv6 extension headers. |
@@ -480,8 +481,7 @@ static void bnx2x_set_gro_params(struct sk_buff *skb, u16 parsing_flags, | |||
480 | /* tcp_gro_complete() will copy NAPI_GRO_CB(skb)->count | 481 | /* tcp_gro_complete() will copy NAPI_GRO_CB(skb)->count |
481 | * to skb_shinfo(skb)->gso_segs | 482 | * to skb_shinfo(skb)->gso_segs |
482 | */ | 483 | */ |
483 | NAPI_GRO_CB(skb)->count = DIV_ROUND_UP(pkt_len - hdrs_len, | 484 | NAPI_GRO_CB(skb)->count = num_of_coalesced_segs; |
484 | skb_shinfo(skb)->gso_size); | ||
485 | } | 485 | } |
486 | 486 | ||
487 | static int bnx2x_alloc_rx_sge(struct bnx2x *bp, | 487 | static int bnx2x_alloc_rx_sge(struct bnx2x *bp, |
@@ -537,7 +537,8 @@ static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp, | |||
537 | /* This is needed in order to enable forwarding support */ | 537 | /* This is needed in order to enable forwarding support */ |
538 | if (frag_size) | 538 | if (frag_size) |
539 | bnx2x_set_gro_params(skb, tpa_info->parsing_flags, len_on_bd, | 539 | bnx2x_set_gro_params(skb, tpa_info->parsing_flags, len_on_bd, |
540 | le16_to_cpu(cqe->pkt_len)); | 540 | le16_to_cpu(cqe->pkt_len), |
541 | le16_to_cpu(cqe->num_of_coalesced_segs)); | ||
541 | 542 | ||
542 | #ifdef BNX2X_STOP_ON_ERROR | 543 | #ifdef BNX2X_STOP_ON_ERROR |
543 | if (pages > min_t(u32, 8, MAX_SKB_FRAGS) * SGE_PAGES) { | 544 | if (pages > min_t(u32, 8, MAX_SKB_FRAGS) * SGE_PAGES) { |