From: Joe Stringer Date: Tue, 21 Jan 2014 19:29:26 +0000 (-0800) Subject: netlink: Rename 'dump->seq' to 'dump->nl_seq' X-Git-Tag: sliver-openvswitch-2.1.90-1~8^2~37 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9c8ad495ec332a29b4e101c00b0b0341631a4d20;hp=d15ae707727d8766f3bfa58f3923330ed078a636;p=sliver-openvswitch.git netlink: Rename 'dump->seq' to 'dump->nl_seq' An upcoming patch will introduce another, completely unrelated seq to 'struct nl_dump'. Giving this one a better name should reduce confusion. Signed-off-by: Joe Stringer Signed-off-by: Ben Pfaff --- diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 1463ff008..8cb1b8eef 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -699,7 +699,7 @@ nl_dump_start(struct nl_dump *dump, int protocol, const struct ofpbuf *request) nl_msg_nlmsghdr(request)->nlmsg_flags |= NLM_F_DUMP | NLM_F_ACK; dump->status = nl_sock_send__(dump->sock, request, nl_sock_allocate_seq(dump->sock, 1), true); - dump->seq = nl_msg_nlmsghdr(request)->nlmsg_seq; + dump->nl_seq = nl_msg_nlmsghdr(request)->nlmsg_seq; } /* Helper function for nl_dump_next(). */ @@ -715,9 +715,9 @@ nl_dump_recv(struct nl_dump *dump) } nlmsghdr = nl_msg_nlmsghdr(&dump->buffer); - if (dump->seq != nlmsghdr->nlmsg_seq) { + if (dump->nl_seq != nlmsghdr->nlmsg_seq) { VLOG_DBG_RL(&rl, "ignoring seq %#"PRIx32" != expected %#"PRIx32, - nlmsghdr->nlmsg_seq, dump->seq); + nlmsghdr->nlmsg_seq, dump->nl_seq); return EAGAIN; } diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h index 18db417b0..5fedfe957 100644 --- a/lib/netlink-socket.h +++ b/lib/netlink-socket.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,7 +98,7 @@ void nl_transact_multiple(int protocol, struct nl_transaction **, size_t n); /* Table dumping. */ struct nl_dump { struct nl_sock *sock; /* Socket being dumped. */ - uint32_t seq; /* Expected nlmsg_seq for replies. */ + uint32_t nl_seq; /* Expected nlmsg_seq for replies. */ struct ofpbuf buffer; /* Receive buffer currently being iterated. */ int status; /* 0=OK, EOF=done, or positive errno value. */ };