On Wed, Apr 25, 2018 at 10:17 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: > On Wed, Apr 25, 2018 at 7:17 AM, Jakub Kicinski > <jakub.kicin...@netronome.com> wrote: >> From: John Hurley <john.hur...@netronome.com> >> >> If a flower rule has a repr both as ingress and egress port then 2 >> callbacks may be generated for the same rule request. >> >> Add an indicator to each flow as to whether or not it was added from an >> ingress registered cb. If so then ignore add/del/stat requests to it from >> an egress cb. > > So on add() you ignore (return success) - I wasn't sure from the patch > what do you do for stat()/del() -- success? why not err? as you know I am > working on the same patch for mlx5, lets align here please. > > Or.
ok, this is way Ive implemented the calls... add: - if egress cb duplicate but the flow has been added on ingress cb then ignore (return success) - if egress cb duplicate and flow not added on ingress then err (this is a 'true duplicate') stats: - if egress cb but the flow has an ingress cb then ignore - stat request will have been covered on ingress cb so shouldn't error, just don't repeat del: - if egress cb and flow no longer exists then assume it was deleted on ingress so ignore (return success) - if ingress cb and flow no longer exists then (as ingress cb is hit first) this is a bad request whereby trying to delete a flow that was never added - return err