We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c239f1a commit 0b8d6daCopy full SHA for 0b8d6da
src/dp_lb.c
@@ -71,8 +71,11 @@ int dp_create_lb(struct dpgrpc_lb *lb, const union dp_ipv6 *ul_ip)
71
lb_key.vni = lb->vni;
72
dp_copy_ipaddr(&lb_key.ip, &lb->addr);
73
74
- if (DP_SUCCESS(rte_hash_lookup(lb_table, &lb_key)))
+ if (DP_SUCCESS(rte_hash_lookup_data(lb_table, &lb_key, (void **)&lb_val))) {
75
+ DPS_LOG_WARNING("Loadbalancer for this IP already exists",
76
+ DP_LOG_IPV4(lb->addr.ipv4), DP_LOG_VNI(lb->vni), DP_LOG_LBID(lb_val->lb_id));
77
return DP_GRPC_ERR_ALREADY_EXISTS;
78
+ }
79
80
lb_val = rte_zmalloc("lb_val", sizeof(struct lb_value), RTE_CACHE_LINE_SIZE);
81
if (!lb_val)
0 commit comments