Hi Simon,

On Fri, Apr 21, 2023 at 5:57 PM Simon Horman <[email protected]> wrote:
>
> 1. I see that some users of dp_packet_data() are not modified by this patch.
>    I did check all of them, but one example is in lib/bfd.c:bfd_process_packet
>
>    Is that because they were not flagged by Coverity in your investigation?
>    Or for some other reason (I often miss obvious points).
>

To be honest, the reason was that they were not flagged by Coverity
when I perform my investigation. If you would like me to add the
`ovs_assert()` to the `bfd_process_packet()` function, I can do that
since that particular case seems to make sense. I am not sure about
other users of `dp_packet_data()` though.

> 2. Did you consider moving the ovs_assert() into dp_packet_data().
>    Perhaps that is more risky because perahps sometimes it can
>    legitimately be NULL.
>
>    But, OTOH, if it is correct for dp_packet_data() to ever return NULL
>    then it would nicely cover all cases.
>
>    Unless I am missing something. Which often happens...

Unfortunately, I don't think this can be done as it seems that
`dp_packet_data()` can legitimately return NULL in some cases. I
tested this by simply adding the `ovs_assert()` into
`dp_packet_data()` and 676 tests fail.

Best regards,
James Raphael Tiovalen
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to