Re: [PATCH net-next v2 3/7] ethtool: trim policy tables

2020-10-08 Thread Eric Dumazet
On 10/8/20 11:15 AM, Johannes Berg wrote: > On Thu, 2020-10-08 at 11:13 +0200, Johannes Berg wrote: > >>> This implies that all policy tables must be 'complete'. > > Also, yes they had to be complete already, perhaps *except* for NLA_FLAG > like this below use ... > >>> So when later strset_p

Re: [PATCH net-next v2 3/7] ethtool: trim policy tables

2020-10-08 Thread Johannes Berg
On Thu, 2020-10-08 at 11:13 +0200, Johannes Berg wrote: > > This implies that all policy tables must be 'complete'. Also, yes they had to be complete already, perhaps *except* for NLA_FLAG like this below use ... > > So when later strset_parse_request() does : > > > > req_info->counts_only = tb

Re: [PATCH net-next v2 3/7] ethtool: trim policy tables

2020-10-08 Thread Johannes Berg
On Thu, 2020-10-08 at 11:12 +0200, Eric Dumazet wrote: > > On 10/6/20 12:07 AM, Jakub Kicinski wrote: > > Since ethtool uses strict attribute validation there's no need > > to initialize all attributes in policy tables. 0 is NLA_UNSPEC > > which is going to be rejected. Remove the NLA_REJECTs. > >

Re: [PATCH net-next v2 3/7] ethtool: trim policy tables

2020-10-08 Thread Eric Dumazet
On 10/6/20 12:07 AM, Jakub Kicinski wrote: > Since ethtool uses strict attribute validation there's no need > to initialize all attributes in policy tables. 0 is NLA_UNSPEC > which is going to be rejected. Remove the NLA_REJECTs. > > Similarly attributes above maxattrs are rejected, so there's

[PATCH net-next v2 3/7] ethtool: trim policy tables

2020-10-05 Thread Jakub Kicinski
Since ethtool uses strict attribute validation there's no need to initialize all attributes in policy tables. 0 is NLA_UNSPEC which is going to be rejected. Remove the NLA_REJECTs. Similarly attributes above maxattrs are rejected, so there's no need to always size the policy tables to ETHTOOL_A_..