On 5/5/23 10:41, Ales Musil wrote:
> On Thu, May 4, 2023 at 1:35 PM Tao Liu <[email protected]> wrote:
> 
>> In vxlan mode with more than 2047 lrp in router, build_ports()
>> prints "all port tunnel ids exhausted", and frees the lrp port.
>>
>> However, lsp of type "router" connected to the lrp still holds
>> the pointer in port->peer. This leads to northd crash in
>> build_lflows().
>>
>> CallTrace:
>>   build_lswitch_rport_arp_req_flows
>>   build_lswitch_ip_unicast_lookup
>>   build_lswitch_and_lrouter_iterate_by_op
>>   build_lflows
>>   en_lflow_run
>>   engine_recompute
>>   engine_run
>>   inc_proc_northd_run
>>   main
>>
>> Fixes: 3044132261d3 ("northd: Enhance implementation of port tunnel key
>> requests.")
>> Signed-off-by: Tao Liu <[email protected]>
>> ---
>> v2: clear port->peer->peer in ovn_port_destroy().
>> ---
>>  northd/northd.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/northd/northd.c b/northd/northd.c
>> index c10e5c20c..5e737bbba 100644
>> --- a/northd/northd.c
>> +++ b/northd/northd.c
>> @@ -1676,6 +1676,10 @@ ovn_port_destroy(struct hmap *ports, struct
>> ovn_port *port)
>>           * use it. */
>>          hmap_remove(ports, &port->key_node);
>>
>> +        if (port->peer) {
>> +            port->peer->peer = NULL;
>> +        }
>> +
>>          for (int i = 0; i < port->n_lsp_addrs; i++) {
>>              destroy_lport_addresses(&port->lsp_addrs[i]);
>>          }
>> --
>> 2.31.1
>>
>> _______________________________________________
>> dev mailing list
>> [email protected]
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>>
> Looks good to me, thanks.
> 
> Acked-by: Ales Musil <[email protected]>
> 

Thanks, Tao Liu, Ales and Simon!  I applied this patch to the main
branch and backported it to all stable branches down to 22.03 LTS.

I also pushed a commit to update the AUTHORS list.

Regards,
Dumitru

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to