public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@redhat•com>
To: Jesse Gross <jesse@nicira•com>
Cc: "dev@openvswitch•org" <dev@openvswitch•org>,
	netdev <netdev@vger•kernel.org>
Subject: Re: [PATCH v2] linux: Signal datapath that unaligned Netlink message can be received
Date: Tue, 17 Dec 2013 10:52:37 +0100	[thread overview]
Message-ID: <52B01EE5.4000704@redhat.com> (raw)
In-Reply-To: <CAEP_g=-XN+fHnLpvpQ4A9MadYH4z9uKHcRBa84vOjWaV_K_YDg@mail.gmail.com>

On 12/17/2013 02:23 AM, Jesse Gross wrote:
> On Sat, Nov 30, 2013 at 4:25 AM, Thomas Graf <tgraf@redhat•com> wrote:
>> diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
>> index 6c482d0..2d8a1aa 100644
>> --- a/lib/dpif-linux.c
>> +++ b/lib/dpif-linux.c
>> @@ -73,6 +73,7 @@ struct dpif_linux_dp {
>>       /* Attributes. */
>>       const char *name;                  /* OVS_DP_ATTR_NAME. */
>>       const uint32_t *upcall_pid;        /* OVS_DP_ATTR_UPCALL_PID. */
>> +    uint32_t user_features;            /* OVS_DP_ATTR_USER_FEATURES */
>>       struct ovs_dp_stats stats;         /* OVS_DP_ATTR_STATS. */
>>       struct ovs_dp_megaflow_stats megaflow_stats;
>>                                          /* OVS_DP_ATTR_MEGAFLOW_STATS.*/
>> @@ -228,6 +229,7 @@ dpif_linux_open(const struct dpif_class *class OVS_UNUSED, const char *name,
>>           dp_request.cmd = OVS_DP_CMD_NEW;
>>           upcall_pid = 0;
>>           dp_request.upcall_pid = &upcall_pid;
>> +        dp_request.user_features |= OVS_DP_F_UNALIGNED;
>>       } else {
>>           dp_request.cmd = OVS_DP_CMD_GET;
>>       }
>
> Does this handle the case where we are opening an existing datapath
> and need to update the features?

The patch (''openvswitch: Drop user features if old user space attempted
to create datapath'') takes care of resetting the features for the
downgrade case. The upgrade case with a persistent datapath object is
currently not implemented. The datapath object needs to be recreated.

Defining the NLM_F_REPLACE semantics is non trivial if we want to do
more than just update the settings. I will propose this in a follow up
patch.

  reply	other threads:[~2013-12-17  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30 12:25 [PATCH v2] linux: Signal datapath that unaligned Netlink message can be received Thomas Graf
     [not found] ` <a960865f3ad68da1016f35085c1d84126e92f0a5.1385814128.git.tgraf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-17  1:23   ` Jesse Gross
2013-12-17  9:52     ` Thomas Graf [this message]
     [not found]       ` <52B01EE5.4000704-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-17 17:49         ` Jesse Gross
     [not found]           ` <CAEP_g=8MtthzO=P-JpTE0jH23_EaU+rp4qiwv_Y721vxyZuFTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-17 18:08             ` Thomas Graf
2013-12-17 19:21               ` Jesse Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B01EE5.4000704@redhat.com \
    --to=tgraf@redhat$(echo .)com \
    --cc=dev@openvswitch$(echo .)org \
    --cc=jesse@nicira$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox