From: "Yuval Mintz" <yuvalmin@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: eilong@broadcom.com, ariele@broadcom.com,
"Yuval Mintz" <yuvalmin@broadcom.com>
Subject: [PATCH net-next 9/9] bnx2x: Get gso_segs from FW
Date: Mon, 18 Feb 2013 10:16:38 +0200 [thread overview]
Message-ID: <1361175398-12888-10-git-send-email-yuvalmin@broadcom.com> (raw)
In-Reply-To: <1361175398-12888-1-git-send-email-yuvalmin@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
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 525c2b5..dc8d135 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,
* Compute number of aggregated segments, and gso_type.
*/
static void bnx2x_set_gro_params(struct sk_buff *skb, u16 parsing_flags,
- u16 len_on_bd, unsigned int pkt_len)
+ u16 len_on_bd, unsigned int pkt_len,
+ u16 num_of_coalesced_segs)
{
/* TPA aggregation won't have either IP options or TCP options
* other than timestamp or IPv6 extension headers.
@@ -480,8 +481,7 @@ static void bnx2x_set_gro_params(struct sk_buff *skb, u16 parsing_flags,
/* tcp_gro_complete() will copy NAPI_GRO_CB(skb)->count
* to skb_shinfo(skb)->gso_segs
*/
- NAPI_GRO_CB(skb)->count = DIV_ROUND_UP(pkt_len - hdrs_len,
- skb_shinfo(skb)->gso_size);
+ NAPI_GRO_CB(skb)->count = num_of_coalesced_segs;
}
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,
/* This is needed in order to enable forwarding support */
if (frag_size)
bnx2x_set_gro_params(skb, tpa_info->parsing_flags, len_on_bd,
- le16_to_cpu(cqe->pkt_len));
+ le16_to_cpu(cqe->pkt_len),
+ le16_to_cpu(cqe->num_of_coalesced_segs));
#ifdef BNX2X_STOP_ON_ERROR
if (pages > min_t(u32, 8, MAX_SKB_FRAGS) * SGE_PAGES) {
--
1.7.9.GIT
prev parent reply other threads:[~2013-02-18 9:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-18 8:16 [PATCH net-next 0/9] bnx2x: patch series Yuval Mintz
2013-02-18 8:16 ` [PATCH net-next 1/9] bnx2x: Prevent NULL pointer dereference in vlan-mac Yuval Mintz
2013-02-18 8:16 ` [PATCH net-next 2/9] bnx2x: fix vlan-mac memory leak Yuval Mintz
2013-02-18 8:16 ` [PATCH net-next 3/9] bnx2x: handle spurious interrupts Yuval Mintz
2013-02-18 17:39 ` David Miller
2013-02-18 8:16 ` [PATCH net-next 4/9] bnx2x: Set ethtool ops for vfs Yuval Mintz
2013-02-18 8:16 ` [PATCH net-next 5/9] bnx2x: Take chip version from MFW Yuval Mintz
2013-02-18 8:16 ` [PATCH net-next 6/9] bnx2x: Prevent "Unknown MF" print in SF mode Yuval Mintz
2013-02-18 8:16 ` [PATCH net-next 7/9] bnx2x: Add iproute2 support for vfs Yuval Mintz
2013-02-18 8:16 ` [PATCH net-next 8/9] bnx2x: Control number of vfs dynamically Yuval Mintz
2013-02-18 8:16 ` Yuval Mintz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361175398-12888-10-git-send-email-yuvalmin@broadcom.com \
--to=yuvalmin@broadcom.com \
--cc=ariele@broadcom.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).