diff options
author | Jarno Rajahalme <jrajahalme@nicira.com> | 2014-08-11 08:38:58 -0700 |
---|---|---|
committer | Jarno Rajahalme <jrajahalme@nicira.com> | 2014-08-11 09:02:59 -0700 |
commit | 51cf5e71bbb3db50670a88588fc5f5837c9c99da (patch) | |
tree | fcd2dbcfb22b61475c00abe2ec8c65b90ee0bbd1 /datapath/actions.c | |
parent | f3ccd17db38d7f574fa26c1615c96b6b207c19df (diff) | |
download | openvswitch-51cf5e71bbb3db50670a88588fc5f5837c9c99da.tar.gz |
datapath/actions: Mark recalculate_csum as likely in set_ipv6_addr().
The ‘recalculate_csum’ is almost always ‘true’. It is false only if
the ipv6 nexthdr is an extension header, and a routing header is
found. For the majority of ipv6 packets this would not be the case,
so this can be marked as 'likely'.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath/actions.c')
-rw-r--r-- | datapath/actions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/actions.c b/datapath/actions.c index 4ca86f420..25c5d7725 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -394,7 +394,7 @@ static void set_ipv6_addr(struct sk_buff *skb, u8 l4_proto, __be32 addr[4], const __be32 new_addr[4], bool recalculate_csum) { - if (recalculate_csum) + if (likely(recalculate_csum)) update_ipv6_checksum(skb, l4_proto, addr, new_addr); skb_clear_hash(skb); |