diff options
| author | Jesse Gross <jesse@nicira.com> | 2011-03-11 14:58:18 -0800 |
|---|---|---|
| committer | Jesse Gross <jesse@nicira.com> | 2011-03-14 09:53:23 -0700 |
| commit | 9cb8d24da006b562fecd17d34971822e3f6d1a78 (patch) | |
| tree | e7651ca1316517558fc2f9a725a1d965f1a4f414 /datapath/vport-patch.c | |
| parent | 8da7ca8760cb84e8e8b443976d1b26391eab1873 (diff) | |
| download | openvswitch-9cb8d24da006b562fecd17d34971822e3f6d1a78.tar.gz | |
datapath: Use compat directory only for backported code.
Most necessary compatibility code is simply backported versions
of kernel functions from newer kernels. These belong in the compat
directory, where they can be transparently picked up when necessary.
However, in some situations there is code that is different
depending on the kernel version but is always needed in some form.
Here it is desirable to segregate the code but it does not really
belong in the compat directory because it does not exist in upstream
kernels. This moves those functions to a compat file, which makes
the meaning clear and prevents problems when Open vSwitch is integrated
into other projects.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath/vport-patch.c')
| -rw-r--r-- | datapath/vport-patch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/datapath/vport-patch.c b/datapath/vport-patch.c index 1c4d2c5e2..7cb221e4d 100644 --- a/datapath/vport-patch.c +++ b/datapath/vport-patch.c @@ -11,6 +11,7 @@ #include <linux/list.h> #include <linux/rtnetlink.h> +#include "compat.h" #include "datapath.h" #include "vport.h" #include "vport-generic.h" @@ -105,7 +106,8 @@ static int patch_set_config(struct vport *vport, const struct nlattr *options, if (err) return err; - if (!a[ODP_PATCH_ATTR_PEER] || VERIFY_NUL_STRING(a[ODP_PATCH_ATTR_PEER], IFNAMSIZ - 1)) + if (!a[ODP_PATCH_ATTR_PEER] || + CHECK_NUL_STRING(a[ODP_PATCH_ATTR_PEER], IFNAMSIZ - 1)) return -EINVAL; peer_name = nla_data(a[ODP_PATCH_ATTR_PEER]); |
