On Fri, Jan 26, 2018 at 10:49:46AM +0000, Stokes, Ian wrote:
> > > > +static int
> > > > +mark_to_flow_disassociate(struct dp_netdev_pmd_thread *pmd,
> > > > +                          struct dp_netdev_flow *flow) {
> > > > +    int ret = 0;
> > > > +    uint32_t mark = flow->mark;
> > > > +    struct cmap_node *mark_node = CONST_CAST(struct cmap_node *,
> > > > +                                             &flow->mark_node);
> > > > +
> > > > +    cmap_remove(&flow_mark.mark_to_flow, mark_node, mark);
> > > > +    flow->mark = INVALID_FLOW_MARK;
> > > > +
> > >
> > > A comment on this code block could be helpful. Mainly just to explain
> > how the reference could be missing and the required steps because of this.
> > 
> > It's not about "missing". It's that we are the last reference to the mark,
> > so that we could remove the mark and the related flow from hardware.
> 
> Ah ok, that clears it up. Again 'missing' was the wrong term on my part.
> 
> So would this removal of the flow from  HW be carried out by the PMD that 
> first installed the flow to the HW? Or can any PMD remove the flow from HW?

Yes, any PMD can remove the flow from HW. And of course, only the last
one will trigger the removal.

> I'd assume then every other PMD that had previously associated the flow with 
> a Mark must then dissociate it.

Yes.

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

Reply via email to