Commit a04b2a4
committed
dpif-netdev: Reorder flow mark assignment.
During code-review, it seems like it could be possible to publish a
flow into the cmap, and the hw offload thread assistance could miss
the appropriate flow. This situation probably didn't occur much in
practice, and the result might be just a dropped packet (although, I'm
not sure that it couldn't also result in a weird duplicate flow
getting installed due to the check in mark_to_flow_find that gets
called during dfc_processing).
This change reorders the assignment to before the cmap_insert. The
cmap_insert should act as a barrier in this case to ensure that the
write to flow->mark is ready before the read (after the
CMAP_FOR_EACH_WITH_HASH).
Fixes: 241bad1 ("dpif-netdev: associate flow with a mark id")
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>1 parent 3ab712a commit a04b2a4
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2600 | 2600 | | |
2601 | 2601 | | |
2602 | 2602 | | |
| 2603 | + | |
2603 | 2604 | | |
2604 | 2605 | | |
2605 | 2606 | | |
2606 | | - | |
2607 | 2607 | | |
2608 | 2608 | | |
2609 | 2609 | | |
| |||
0 commit comments