On 8/14/25 7:52 AM, Ales Musil via dev wrote:
> On Wed, Aug 13, 2025 at 7:22 PM Mark Michelson via dev <
> [email protected]> wrote:
> 
>> From: Lorenzo Bianconi <[email protected]>
>>
>> Introduce Incremetal processing logic to datapath-sync node for
>> en_datapath_logical_switch and en_datapath_logical_router inputs.
>>
>> One test change that may seem unrelated is the propage sb_cfg test in
>> ovn-northd.at. That test checked for a specific sequence of events to
>> happen based on northbound database manipulation. The test had used the
>> insertion of a logical switch to test this. Now, inserting a logical
>> switch causes more than one engine run to occur because of the way
>> en-datapath-sync works. The easiest way to fix the test was to insert a
>> different type of row into the database, so this commit changes to
>> using a port group now.
>>
>> Reported-at: https://issues.redhat.com/browse/FDP-1519
>> Signed-off-by: Lorenzo Bianconi <[email protected]>
>> ---
>>
> 
> Hi Mark, Lorenzo and Dumitru,
> 
> I have one comment down below.
> 

Hi Lorenzo, Mark, Ales,

Thanks for the patch and reviews!

[...]

>> +enum engine_input_handler_result
>> +datapath_sync_sb_datapath_binding(struct engine_node *node, void *data)
>> +{
>> +    const struct sbrec_datapath_binding_table *sb_dp_table =
>> +        EN_OVSDB_GET(engine_get_input("SB_datapath_binding", node));
>> +    enum engine_input_handler_result ret = EN_HANDLED_UNCHANGED;
>> +    struct ovn_synced_datapaths *synced_datapaths = data;
>> +
>> +    const struct sbrec_datapath_binding *sb_dp;
>> +    SBREC_DATAPATH_BINDING_TABLE_FOR_EACH_TRACKED (sb_dp, sb_dp_table) {
>> +        struct ovn_synced_datapath *sdp =
>> +            find_synced_datapath_from_sb(&synced_datapaths->synced_dps,
>> sb_dp);
>> +        if (sbrec_datapath_binding_is_deleted(sb_dp)) {
>> +            if (sdp) {
>> +                /* The SB datapath binding was deleted, but we still have
>> a
>> +                 * record of it locally. This implies the SB datapath
>> binding
>> +                 * was deleted by something other than ovn-northd. We need
>> +                 * to recompute in this case.
>> +                 */
>> +                return EN_UNHANDLED;
>> +            }
>> +            continue;
>> +        }
>> +
>> +        if (sbrec_datapath_binding_is_new(sb_dp)) {
>> +            if (!sdp) {
>> +                /* There is a new datapath binding, but we have no record
>> +                 * of the synced datapath. This indicates that
>> +                 * something other than ovn-northd added this datapath
>> +                 * binding to the database, and we need to recompute.
>> +                 */
>> +                return EN_UNHANDLED;
>> +            } else {
>> +                if (sdp->pending_sb_dp) {
>> +                    /* Update the existing synced datapath pointer to the
>> safer
>> +                     * version to cache.
>> +                     */
>> +                    sdp->sb_dp = sb_dp;
>> +                    sdp->pending_sb_dp = false;
>> +                } else {
>> +                    /* Some jerk has inserted a duplicate datapath to try
>> to
>> +                     * fool us. Not on my watch!
>> +                     */
>>
> 
> I get the frustration from this specific condition,
> however that comment isn't really appropriate to be
> in the repo. So I would suggest to reword it:
> 
> "Someone inserted a duplicate datapath into SB,
> do a full recompute in that case."
> 
> 

Oops, good catch, thanks for pointing this out!  I rephrased it as you
suggested and then applied the patch to main.

Regards,
Dumitru

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

Reply via email to