lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 16 Apr 2015 21:48:12 -0700
From:	roopa <roopa@...ulusnetworks.com>
To:	sfeldma@...il.com
CC:	netdev@...r.kernel.org, jiri@...nulli.us, linux@...ck-us.net,
	f.fainelli@...il.com, sridhar.samudrala@...el.com,
	ronen.arad@...el.com, andrew@...n.ch
Subject: Re: [PATCH net-next v4 00/24] switchdev: spring cleanup

On 4/13/15, 10:47 PM, roopa wrote:
> On 4/12/15, 11:16 PM, sfeldma@...il.com wrote:
>> From: Scott Feldman <sfeldma@...il.com>
>>
>> v4:
>>
>> Well, it was a lot of work, but now prepare-commit transaction model 
>> is how
>> davem advises: if prepare fails, abort the transaction.  The driver 
>> must do
>> resource reservations up front in prepare phase and return those 
>> resources if
>> aborting.  Commit phase would use reserved resources.  The good news 
>> is the
>> driver code (for rocker) now handles resource allocation failures 
>> better by not
>> leaving partially device or driver states.  This is a side-effect of the
>> prepare phase where state isn't modified; only validation of inputs and
>> resource reservations happen in the prepare phase.  Since we're 
>> supporting
>> setting attrs and add objs across lower devs in the stacked case, we 
>> need to
>> hold rtnl_lock (or ensure rtnl_lock is held) so lower devs don't move 
>> on us
>> during the prepare-commit transaction.  DSA driver code skips the 
>> prepare phase
>> and goes straight for the commit phase since no up-front allocations 
>> are done
>> and no device failures (that could be detected in the prepare phase) can
>> happen.
>
> thanks for the series. It definitely does look cleaner and less 
> confusing now!.
> I do love the abstraction but i was one of the people voting against 
> duplicating the
> kernel objects into swdev objs which this patches does (which i am 
> still not convinced
> we should have).
>
>>
>> Remove NETIF_F_HW_SWITCH_OFFLOAD from rocker and the swdev_attr_set/get
>> wrappers.  DSA doesn't set NETIF_F_HW_SWITCH_OFFLOAD, so it can't be in
>> swdev_attr_set/get.  rocker doesn't need it; or rather can't support
>> NETIF_F_HW_SWITCH_OFFLOAD being set/cleared at run-time after the device
>> port is already up and offloading L2/L3. NETIF_F_HW_SWITCH_OFFLOAD is 
>> still
>> left as a feature flag for drivers that can use it.
>
> I see that this series removes all uses of it in the switchdev api 
> later. I had summarized
> the need for the flag in reply to one of your questions a few weeks 
> back. Since you have moved all
> ndo ops to swdev ops (including ndo_bridge_setlink/dellink), I don't 
> want to hold on to the
>  feature flag if no one is using it. yes, my userspace driver uses it 
> today.
> I will come back with stronger justification to keep it or
> will submit a patch to remove it and add it back at a later point if 
> needed.
>
scott,  I see that you will be spinning v5 of the series. In which case 
feel free to remove the feature flag during your
code restructuring effort. If i need it again, i will resubmit. thanks.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ