Re: [ovs-dev] [PATCH 2/2] netdev-linux: Simplify get_stats_via_netlink().

2013-12-30 Thread Ben Pfaff
Thanks, both applied. On Mon, Dec 30, 2013 at 02:07:21PM -0800, Alex Wang wrote: > Thanks for the explanation. It makes sense. > > > On Mon, Dec 30, 2013 at 2:04 PM, Ben Pfaff wrote: > > > On Mon, Dec 23, 2013 at 11:49:40AM -0800, Alex Wang wrote: > > > Both patches look good to me, > > > > >

Re: [ovs-dev] [PATCH 2/2] netdev-linux: Simplify get_stats_via_netlink().

2013-12-30 Thread Alex Wang
Thanks for the explanation. It makes sense. On Mon, Dec 30, 2013 at 2:04 PM, Ben Pfaff wrote: > On Mon, Dec 23, 2013 at 11:49:40AM -0800, Alex Wang wrote: > > Both patches look good to me, > > > > One comment below, > > > > > > > @@ -4432,57 +4432,38 @@ netdev_stats_from_rtnl_link_stats(struct

Re: [ovs-dev] [PATCH 2/2] netdev-linux: Simplify get_stats_via_netlink().

2013-12-30 Thread Ben Pfaff
On Mon, Dec 23, 2013 at 11:49:40AM -0800, Alex Wang wrote: > Both patches look good to me, > > One comment below, > > > > @@ -4432,57 +4432,38 @@ netdev_stats_from_rtnl_link_stats(struct > > netdev_stats *dst, > > static int > > get_stats_via_netlink(const struct netdev *netdev_, struct netdev

Re: [ovs-dev] [PATCH 2/2] netdev-linux: Simplify get_stats_via_netlink().

2013-12-23 Thread Alex Wang
Both patches look good to me, One comment below, > @@ -4432,57 +4432,38 @@ netdev_stats_from_rtnl_link_stats(struct > netdev_stats *dst, > static int > get_stats_via_netlink(const struct netdev *netdev_, struct netdev_stats > *stats) > { > -/* Policy for RTNLGRP_LINK messages. > - * >

[ovs-dev] [PATCH 2/2] netdev-linux: Simplify get_stats_via_netlink().

2013-12-04 Thread Ben Pfaff
There's no need to obtain the ifindex, because RTM_GETLINK is happy to take the interface name. There's no need to do a full nl_policy_parse(), because we only need a single attribute. Signed-off-by: Ben Pfaff --- lib/netdev-linux.c | 53 +--- 1