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 <jrajaha...@nicira.com>
---
 datapath/actions.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index efc64f1..81d1bb0 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -295,7 +295,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);
-- 
1.7.10.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to