[ovs-dev] ofproto-dpif-rid: Don't include action_set_len as part of hash.
diff mbox

Message ID 1501208133-114772-1-git-send-email-jpettit@ovn.org
State Accepted
Headers show

Commit Message

Justin Pettit July 28, 2017, 2:15 a.m. UTC
It doesn't improve the hashing, since the number of bytes hashed is
included in hash_bytes64() hash calculation.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
---
 ofproto/ofproto-dpif-rid.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ben Pfaff July 28, 2017, 4:29 p.m. UTC | #1
On Thu, Jul 27, 2017 at 07:15:33PM -0700, Justin Pettit wrote:
> It doesn't improve the hashing, since the number of bytes hashed is
> included in hash_bytes64() hash calculation.
> 
> Signed-off-by: Justin Pettit <jpettit@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
Justin Pettit July 28, 2017, 4:47 p.m. UTC | #2
> On Jul 28, 2017, at 9:29 AM, Ben Pfaff <blp@ovn.org> wrote:
> 
> On Thu, Jul 27, 2017 at 07:15:33PM -0700, Justin Pettit wrote:
>> It doesn't improve the hashing, since the number of bytes hashed is
>> included in hash_bytes64() hash calculation.
>> 
>> Signed-off-by: Justin Pettit <jpettit@ovn.org>
> 
> Acked-by: Ben Pfaff <blp@ovn.org>

Thanks.  I pushed this to master.

--Justin

Patch
diff mbox

diff --git a/ofproto/ofproto-dpif-rid.c b/ofproto/ofproto-dpif-rid.c
index d546b150b938..cc08772ce72a 100644
--- a/ofproto/ofproto-dpif-rid.c
+++ b/ofproto/ofproto-dpif-rid.c
@@ -141,7 +141,6 @@  frozen_state_hash(const struct frozen_state *state)
         hash = hash_bytes(state->stack, state->stack_size, hash);
     }
     hash = hash_int(state->mirrors, hash);
-    hash = hash_int(state->action_set_len, hash);
     if (state->action_set_len) {
         hash = hash_bytes64(ALIGNED_CAST(const uint64_t *, state->action_set),
                             state->action_set_len, hash);