Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-11-08 Thread Greg
On Tue, 2016-11-08 at 22:29 +0100, Phil Sutter wrote: > Commit 7b8179c780a1a ("iproute2: Add new command to ip link to > enable/disable VF spoof check") tried to add support for > IFLA_VF_SPOOFCHK in a backwards-compatible manner, but aparently overdid > it: parse_rtattr_nested() handles missing at

[iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-11-08 Thread Phil Sutter
Commit 7b8179c780a1a ("iproute2: Add new command to ip link to enable/disable VF spoof check") tried to add support for IFLA_VF_SPOOFCHK in a backwards-compatible manner, but aparently overdid it: parse_rtattr_nested() handles missing attributes perfectly fine in that it will leave the relevant fie

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-08-17 Thread Phil Sutter
On Wed, Jun 01, 2016 at 10:03:49PM +0200, Phil Sutter wrote: > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks > overly complicated. Instead rely upon parse_rtattr_nested() to assign > the relevant pointer if requested rtattr fields are present. In order to validate correctness

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-07-20 Thread Phil Sutter
On Wed, Jun 01, 2016 at 03:36:09PM -0700, Greg Rose wrote: > On Wed, Jun 1, 2016 at 3:07 PM, Phil Sutter wrote: > > On Wed, Jun 01, 2016 at 03:00:08PM -0700, Greg Rose wrote: > >> On Wed, Jun 1, 2016 at 1:03 PM, Phil Sutter wrote: > >> > Not sure whether I misinterpret commit 7b8179c780a1a, but i

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-07-01 Thread Phil Sutter
On Wed, Jun 01, 2016 at 03:36:09PM -0700, Greg Rose wrote: > On Wed, Jun 1, 2016 at 3:07 PM, Phil Sutter wrote: > > On Wed, Jun 01, 2016 at 03:00:08PM -0700, Greg Rose wrote: > >> On Wed, Jun 1, 2016 at 1:03 PM, Phil Sutter wrote: > >> > Not sure whether I misinterpret commit 7b8179c780a1a, but i

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-06-01 Thread Greg Rose
On Wed, Jun 1, 2016 at 3:07 PM, Phil Sutter wrote: > On Wed, Jun 01, 2016 at 03:00:08PM -0700, Greg Rose wrote: >> On Wed, Jun 1, 2016 at 1:03 PM, Phil Sutter wrote: >> > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks >> > overly complicated. Instead rely upon parse_rtattr_nes

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-06-01 Thread Phil Sutter
On Wed, Jun 01, 2016 at 03:00:08PM -0700, Greg Rose wrote: > On Wed, Jun 1, 2016 at 1:03 PM, Phil Sutter wrote: > > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks > > overly complicated. Instead rely upon parse_rtattr_nested() to assign > > the relevant pointer if requested rta

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-06-01 Thread Greg Rose
On Wed, Jun 1, 2016 at 1:03 PM, Phil Sutter wrote: > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks > overly complicated. Instead rely upon parse_rtattr_nested() to assign > the relevant pointer if requested rtattr fields are present. I'm not sure if newer iproute2 utilities a

[iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-06-01 Thread Phil Sutter
Not sure whether I misinterpret commit 7b8179c780a1a, but it looks overly complicated. Instead rely upon parse_rtattr_nested() to assign the relevant pointer if requested rtattr fields are present. Signed-off-by: Phil Sutter --- ip/ipaddress.c | 44 ++-- 1