On 1/4/18, 1:25 PM, "[email protected] on behalf of Ben Pfaff" 
<[email protected] on behalf of [email protected]> wrote:

    On Fri, Dec 15, 2017 at 07:32:48PM -0800, Darrell Ball wrote:
    > Presently, alg expectations are removed by being time expired.
    > This was intended to happen before the control connections and
    > was intended to minimize the extra work involved for tracking and
    > removing the expectations.  This is not the best option and
    > conceptually an expectation should not exist without a control
    > connection context.
    > 
    > The approach is changed to remove the expectations when the control
    > connections are removed.  The previous code to expire the expectations
    > is removed at the same time.
    > 
    > Fixes: bd5e81a0e ("Userspace Datapath: Add ALG infra and FTP.")
    > Reported-at: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_pipermail_ovs-2Ddev_2017-2DDecember_341683.html&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=Cw8yMQm0NI_eGCu3ls5EMhobxSS8HzuglFHnlV9tHm0&s=lCG_BbbJ5PvTUD5BOVhR4Qgeckk8RNB6yzR6La-ukeU&e=
    > Signed-off-by: Darrell Ball <[email protected]>
    > ---
    > 
    > v1->v2: Use single node for both expectations and expectation_refs.
    >         Remove outdated comment.
    >         Simplify an api.
    
    Thanks for working on this.
    
    It looks to me like the new alg_expectation_refs hmap is expected to
    have duplicate keys.  If so, then I recommend using an hindex instead of
    an hmap, because hindexes are designed for duplicates and will perform
    better.
    
    I would have guessed that the easiest way to do this would be to add to
    struct conn a linked list of child expectations (and possibly a pointer
    to the parent conn).  Then, there would be no need to look up anything
    in an hmap (or hindex), one would simply iterate the list of children.
    Did you consider that design?

[Darrell] I did consider just a LL of expectations.
               I had to remember why I choose a map - I wanted to additionally 
allow removal of expectations from other code paths with just the master key
               without holding a reference to the master conn itself.
               Upon further inspection, since the hindex map is more efficient 
at handling duplicates, I’ll use it.
               Thanks !
               
               
    
    Thanks,
    
    Ben.
    _______________________________________________
    dev mailing list
    [email protected]
    
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=Cw8yMQm0NI_eGCu3ls5EMhobxSS8HzuglFHnlV9tHm0&s=Ay4pYfl4Sl3Rac0UfzpaZsrZI3s7qLTOC5TZRvsqV48&e=
    

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

Reply via email to