[ovs-dev] [PATCHv2 3/7] netlink: Rename 'dump->seq' to 'dump->nl_seq'
Joe Stringer
joestringer at nicira.com
Tue Jan 21 19:29:26 UTC 2014
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 <joestringer at nicira.com>
---
v2: First post
---
lib/netlink-socket.c | 6 +++---
lib/netlink-socket.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index 6620b0e..b5eac0f 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -698,7 +698,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(). */
@@ -714,9 +714,9 @@ nl_dump_recv(struct nl_dump *dump, struct ofpbuf *buffer)
}
nlmsghdr = nl_msg_nlmsghdr(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 81f39fc..1d733c3 100644
--- a/lib/netlink-socket.h
+++ b/lib/netlink-socket.h
@@ -100,7 +100,7 @@ void nl_transact_multiple(int protocol, struct nl_transaction **, size_t n);
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. */
int status; /* 0=OK, EOF=done, or positive errno value. */
};
--
1.7.9.5
More information about the dev
mailing list