Hi Marcelo,

thanks for your feedback.

Marcelo Ricardo Leitner <mleit...@redhat.com> writes:

> Hi,
>
> On Thu, Aug 05, 2021 at 11:55:51PM +0200, Paolo Valerio wrote:
>
> Now that you put these two together:
>
>> As an example, with this patch applied, the following generic message:
>> 
>> ovs|00239|netlink_socket|DBG|received NAK error=0 (Operation not supported)
>                                                  ^^^
>> 
>> becomes:
>> 
>> ovs|00239|netlink_socket|DBG|received NAK error=0 - Conntrack isn't enabled
>                                                  ^^^
> (more on the error below)
>
> Much better the msg!
>
> ...
>> @@ -910,15 +916,17 @@ nl_sock_transact_multiple__(struct nl_sock *sock,
>>          i = seq - base_seq;
>>          txn = transactions[i];
>>  
>> +        const char *err_msg = NULL;
>>          /* Fill in the results for 'txn'. */
>> -        if (nl_msg_nlmsgerr(buf_txn->reply, &txn->error)) {
>> +        if (nl_msg_nlmsgerr(buf_txn->reply, &txn->error, &err_msg)) {
>> +            if (txn->error) {
>> +                VLOG_DBG_RL(&rl, "received NAK error=%d - %s",
>> +                            error,
>
> Sounds like 'error' here should have been 'txn->error' ?
>
> error here is the return of nl_sock_recv__(). It's something else.
>
>> +                            err_msg ? err_msg : ovs_strerror(txn->error));
>> +            }
>>              if (txn->reply) {
>>                  ofpbuf_clear(txn->reply);
>>              }
>> -            if (txn->error) {
>> -                VLOG_DBG_RL(&rl, "received NAK error=%d (%s)",
>> -                            error, ovs_strerror(txn->error));
>                                ^^^^^
>

You're right, I think it should have been txn->error.
Thanks for noticing.

I'll resend.

>> -            }
>>          } else {
>>              txn->error = 0;
>>              if (txn->reply && txn != buf_txn) {
>
> Thanks,
> Marcelo

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to