[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B7138@saturn3.aculab.com>
Date: Wed, 6 Feb 2013 09:23:49 -0000
From: "David Laight" <David.Laight@...LAB.COM>
To: "Cong Wang" <amwang@...hat.com>, <netdev@...r.kernel.org>
Cc: "Jesse Gross" <jesse@...ira.com>,
"David S. Miller" <davem@...emloft.net>
Subject: RE: [PATCH net-next v2] net: adjust skb_gso_segment() for calling in rx path
> +/* openvswitch calls this on rx path, so we need a different check.
> + */
> +static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
> +{
> + if (tx_path)
> + return skb->ip_summed != CHECKSUM_PARTIAL;
> + else
> + return skb->ip_summed == CHECKSUM_NONE;
> +}
> +
That code wants a lot of unlikely() added.
It seems wrong to be adding code a very common path for one
obscure caller.
Perhaps the caller should be modifying the ip_summed field
(etc) to match the values expected for a tx skb.
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists