From: Jeff Garzik <jeff@garzik.org>
To: Divy Le Ray <divy@chelsio.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
swise@opengridcomputing.com
Subject: Re: [PATCH 1/1 2.6.28] cxgb3 - remove duplicate tests in lro
Date: Sat, 13 Sep 2008 15:35:35 -0400 [thread overview]
Message-ID: <48CC1607.9060901@garzik.org> (raw)
In-Reply-To: <20080905053413.11654.33295.stgit@speedy5>
Divy Le Ray wrote:
> From: Divy Le Ray <divy@chelsio.com>
>
> The generic lro code checks TCP flags/options.
> Remove duplicate tests done in the driver.
>
> Signed-off-by: Divy Le Ray <divy@chelsio.com>
> ---
>
> drivers/net/cxgb3/sge.c | 35 -----------------------------------
> 1 files changed, 0 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
> index 1b0861d..f78a42c 100644
> --- a/drivers/net/cxgb3/sge.c
> +++ b/drivers/net/cxgb3/sge.c
> @@ -1937,38 +1937,6 @@ static inline int lro_frame_ok(const struct cpl_rx_pkt *p)
> eh->h_proto == htons(ETH_P_IP) && ih->ihl == (sizeof(*ih) >> 2);
> }
>
> -#define TCP_FLAG_MASK (TCP_FLAG_CWR | TCP_FLAG_ECE | TCP_FLAG_URG |\
> - TCP_FLAG_ACK | TCP_FLAG_PSH | TCP_FLAG_RST |\
> - TCP_FLAG_SYN | TCP_FLAG_FIN)
> -#define TSTAMP_WORD ((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |\
> - (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)
> -
> -/**
> - * lro_segment_ok - check if a TCP segment is eligible for LRO
> - * @tcph: the TCP header of the packet
> - *
> - * Returns true if a TCP packet is eligible for LRO. This requires that
> - * the packet have only the ACK flag set and no TCP options besides
> - * time stamps.
> - */
> -static inline int lro_segment_ok(const struct tcphdr *tcph)
> -{
> - int optlen;
> -
> - if (unlikely((tcp_flag_word(tcph) & TCP_FLAG_MASK) != TCP_FLAG_ACK))
> - return 0;
> -
> - optlen = (tcph->doff << 2) - sizeof(*tcph);
> - if (optlen) {
> - const u32 *opt = (const u32 *)(tcph + 1);
> -
> - if (optlen != TCPOLEN_TSTAMP_ALIGNED ||
> - *opt != htonl(TSTAMP_WORD) || !opt[2])
> - return 0;
> - }
> - return 1;
> -}
> -
> static int t3_get_lro_header(void **eh, void **iph, void **tcph,
> u64 *hdr_flags, void *priv)
applied
prev parent reply other threads:[~2008-09-13 19:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 5:34 [PATCH 1/1 2.6.28] cxgb3 - remove duplicate tests in lro Divy Le Ray
2008-09-13 19:35 ` Jeff Garzik [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=48CC1607.9060901@garzik.org \
--to=jeff@garzik.org \
--cc=divy@chelsio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=swise@opengridcomputing.com \
/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).