[ovs-dev] [PATCH v2 2/7] nsh: userland support for network service headers
Ben Pfaff
blp at nicira.com
Wed Feb 26 21:11:07 UTC 2014
On Tue, Feb 25, 2014 at 03:44:15PM -0800, Pritesh Kothari wrote:
> NSH service path (nsp) can be set/unset while creating the port
> as well as nsp can be matched on incoming packets.
>
> Signed-off-by: Pritesh Kothari <pritesh.kothari at cisco.com>
Here are some preliminary comments.
"git am" says:
Applying: nsh: userland support for network service headers
/home/blp/ovs/.git/rebase-apply/patch:543: trailing whitespace.
static void tnl_match_idx_to_m(const struct flow *, unsigned int,
warning: 1 line adds whitespace errors.
"clang" says:
../ofproto/tunnel.c:602:9: error: writing variable 'tnl_match_maps_bm' requires
locking 'rwlock' exclusively [-Werror,-Wthread-safety-analysis]
tnl_match_maps_bm |= 1 << idx;
^
../ofproto/tunnel.c:610:9: error: writing variable 'tnl_match_maps_bm' requires
locking 'rwlock' exclusively [-Werror,-Wthread-safety-analysis]
tnl_match_maps_bm &= ~(1 << idx);
^
../ofproto/tunnel.c:619:1: error: control may reach end of non-void function
[-Werror,-Wreturn-type]
}
^
../ofproto/tunnel.c:618:17: error: reading variable 'tnl_match_maps_bm' requires
locking 'rwlock' [-Werror,-Wthread-safety-analysis]
return (tnl_match_maps_bm & (1 << idx)) != 0;
^
../lib/dpif-netdev.c:1594:31: error: missing field 'ip_ttl' initializer
[-Werror,-Wmissing-field-initializers]
= PKT_METADATA_INITIALIZER(port->port_no);
^
../lib/packets.h:43:46: note: expanded from macro 'PKT_METADATA_INITIALIZER'
(struct pkt_metadata){ { 0, 0, 0, 0, 0, 0}, 0, 0, (PORT) }
^
../ofproto/ofproto-dpif.c:949:18: error: missing field 'ip_ttl' initializer
[-Werror,-Wmissing-field-initializers]
execute.md = PKT_METADATA_INITIALIZER(0);
^
../lib/packets.h:43:46: note: expanded from macro 'PKT_METADATA_INITIALIZER'
(struct pkt_metadata){ { 0, 0, 0, 0, 0, 0}, 0, 0, (PORT) }
^
../ofproto/ofproto-dpif-xlate.c:2094:30: error: missing field 'ip_ttl'
initializer [-Werror,-Wmissing-field-initializers]
struct pkt_metadata md = PKT_METADATA_INITIALIZER(0);
^
../lib/packets.h:43:46: note: expanded from macro 'PKT_METADATA_INITIALIZER'
(struct pkt_metadata){ { 0, 0, 0, 0, 0, 0}, 0, 0, (PORT) }
^
"sparse" says:
../lib/match.c:890:39: warning: incorrect type in argument 3 (different base types)
../lib/match.c:890:39: expected unsigned int [unsigned] [usertype] value
../lib/match.c:890:39: got restricted __be32 const [usertype] nsp
../lib/match.c:890:62: warning: incorrect type in argument 4 (different base types)
../lib/match.c:890:62: expected unsigned int [unsigned] [usertype] mask
../lib/match.c:890:62: got restricted __be32 const [usertype] nsp
../lib/odp-util.c:1689:40: warning: incorrect type in argument 1 (different base types)
../lib/odp-util.c:1689:40: expected unsigned int [unsigned] [usertype] x
../lib/odp-util.c:1689:40: got restricted __be32 [addressable] [assigned] [usertype] nsp
CodingStyle requires even single statements (in userspace) to be in
{}. I see a number of violations.
More information about the dev
mailing list