Message ID | 20240427072234.1658006-1-wushaohua@chinatelecom.cn |
---|---|
State | Superseded |
Headers | show |
Series | [ovs-dev] ofproto-dpif-rid:Fix duplicate entries. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | warning | apply and check: warning |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
Bleep bloop. Greetings wushaohua@chinatelecom.cn, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: The subject summary should start with a capital. Subject: ofproto-dpif-rid:Fix duplicate entries. Lines checked: 64, Warnings: 1, Errors: 0 Please check this out. If you feel there has been an error, please email aconole@redhat.com Thanks, 0-day Robot
diff --git a/ofproto/ofproto-dpif-rid.c b/ofproto/ofproto-dpif-rid.c index f01468025..651db6c53 100644 --- a/ofproto/ofproto-dpif-rid.c +++ b/ofproto/ofproto-dpif-rid.c @@ -234,6 +234,7 @@ recirc_alloc_id__(const struct frozen_state *state, uint32_t hash) { ovs_assert(state->action_set_len <= state->ofpacts_len); + struct recirc_id_node *hash_recirc_node = NULL; struct recirc_id_node *node = xzalloc(sizeof *node); node->hash = hash; @@ -241,6 +242,12 @@ recirc_alloc_id__(const struct frozen_state *state, uint32_t hash) frozen_state_clone(CONST_CAST(struct frozen_state *, &node->state), state); ovs_mutex_lock(&mutex); + hash_recirc_node = recirc_ref_equal(&node->state, node->hash); + if (hash_recirc_node) { + ovs_mutex_unlock(&mutex); + recirc_id_node_free(node); + return hash_recirc_node; + } for (;;) { /* Claim the next ID. The ID space should be sparse enough for the allocation to succeed at the first try. We do skip the first