On Thu, Nov 15, 2012 at 9:02 AM, Ansis Atteka <aatt...@nicira.com> wrote:

> On Wed, Nov 14, 2012 at 1:48 AM, Jesse Gross <je...@nicira.com> wrote:
> > On Tue, Nov 13, 2012 at 9:52 AM, Ansis Atteka <aatt...@nicira.com>
> wrote:
> >>
> >> diff --git a/datapath/actions.c b/datapath/actions.c
> >> index 76c9823..5da4b74 100644
> >> --- a/datapath/actions.c
> >> +++ b/datapath/actions.c
> >> @@ -435,6 +435,10 @@ static int execute_set_action(struct sk_buff *skb,
> >>                 skb->priority = nla_get_u32(nested_attr);
> >>                 break;
> >>
> >> +       case OVS_KEY_ATTR_SKB_MARK:
> >> +               skb->mark = nla_get_u32(nested_attr);
> >
> >
> > One other thing that I forgot - skb->mark used to be called nfmark
> (before
> > 2.6.20) and in that case only existed if CONFIG_NETFILTER was defined so
> we
> > should handle that case as well.  If it doesn't exist then on the match
> we
> > can treat it as zero and if someone tries to use an action then we should
> > deny it on flow setup.
>
> Currently lowest supported kernel version is 2.6.18. Perhaps it is
> worth to bump it up to 2.6.20?
>

There aren't any distributions that I know of that use 2.6.20, so for
practical purposes that would really move us up to 2.6.26.  It might be
fine at this point (2.6.18 is more than 6 years old) but the compatibility
code for this is so minor that it doesn't seem worth dropping support over
it.


> I guess this skb mark get/set compatibility code should go into
> skbuff.h, right?


I would put it in compat.h since it doesn't correspond to a current or
proposed upstream kernel function.


> With "denying flow on setup" do you mean to return
> -EINVAL in validate_set() (if there is skb mark set action, but kernel
> does not support netfilter marks)?
>

Yes, that's right.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to