Re: [PATCH iproute2 1/3] ss: allow AF_FAMILY constants >32

2017-10-04 Thread Stephen Hemminger
On Wed, 4 Oct 2017 15:03:09 + David Laight wrote: > From: Stefan Hajnoczi > > Sent: 04 October 2017 16:01 > ... > > > > --- a/misc/ss.c > > > > +++ b/misc/ss.c > > > > @@ -170,55 +170,57 @@ enum { > > > > struct filter { > > > > int dbs; > > > >

RE: [PATCH iproute2 1/3] ss: allow AF_FAMILY constants >32

2017-10-04 Thread David Laight
From: Stefan Hajnoczi > Sent: 04 October 2017 16:01 ... > > > --- a/misc/ss.c > > > +++ b/misc/ss.c > > > @@ -170,55 +170,57 @@ enum { > > > struct filter { > > > int dbs; > > > int states; > > > - int families; > > > + __u64 families; > > > > Since this isn't a value that is coming from

Re: [PATCH iproute2 1/3] ss: allow AF_FAMILY constants >32

2017-10-04 Thread Stefan Hajnoczi
On Tue, Oct 03, 2017 at 11:26:53AM -0700, Stephen Hemminger wrote: > On Tue, 3 Oct 2017 13:57:42 -0400 > Stefan Hajnoczi wrote: > > > Linux has more than 32 address families defined in . Use > > a 64-bit type so all of them can be represented in the filter->families > >

Re: [PATCH iproute2 1/3] ss: allow AF_FAMILY constants >32

2017-10-03 Thread Stephen Hemminger
On Tue, 3 Oct 2017 13:57:42 -0400 Stefan Hajnoczi wrote: > Linux has more than 32 address families defined in . Use > a 64-bit type so all of them can be represented in the filter->families > bitmask. > > It's easy to introduce bugs when using (1 << AF_FAMILY) because the