summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/rocker/rocker_main.c
Commit message (Collapse)AuthorAgeFilesLines
...
* rocker: move ageing_time from struct rocker to struct ofdpaJiri Pirko2016-03-121-2/+0
| | | | | | | | This is OF-DPA specific, used only there, similar to ofdpa_port->ageing_time. So move it to OF-DPA code. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: set FDB cleanup timer according to lowest ageing timeIdo Schimmel2016-03-111-0/+2
| | | | | | | | | | | | | In rocker, ageing time is a per-port attribute, so the next time the FDB cleanup timer fires should be set according to the lowest ageing time. This will later allow us to delete the BR_MIN_AGEING_TIME macro, which was added to guarantee minimum ageing time in the bridge layer, thereby breaking existing behavior. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: fix rocker_world_port_obj_vlan_add()Dan Carpenter2016-02-231-1/+0
| | | | | | | | | | We were changing return values and accidentally made rocker_world_port_obj_vlan_add() into a no-op. Fixes: fccd84d44912 ('rocker: return -EOPNOTSUPP for undefined world ops') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: return -EOPNOTSUPP for undefined world opsJiri Pirko2016-02-171-16/+17
| | | | | | Suggested-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: move OF-DPA stuff into separate fileJiri Pirko2016-02-171-2839/+6
| | | | | | | | | | | Carve out OF-DPA would specific code from the common file to the world file. This change required struct rocker and struct rocker_port split into world specific struct ofdpa and struct ofdpa_port. Along with this the world specific functions and defines were renamed from prefix "rocker_" to "ofdpa_". Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: call rocker_cmd_exec function with "nowait" boolean instead of flagsJiri Pirko2016-02-171-15/+23
| | | | | | | | No need to push down rocker flags just to check if this is nowait or not. Let the caller handle that. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: remove trans parameter to rocker_cmd_exec functionJiri Pirko2016-02-171-30/+35
| | | | | | | | | | | The only purpose of passing this parameter is to check for prepare phase. The only reason for a failure in that state is if TLVs don't fit into descriptor. That is highly unlikely and if that happens, it is a driver bug. So remove this parameter from rocker_cmd_exec, and check for prepare phase in caller. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: pre-allocate wait structures during cmd ring initJiri Pirko2016-02-171-21/+66
| | | | | | | This avoids need to alloc/free wait structure for every command call. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: pass "learning" value as a parameter to rocker_port_set_learningJiri Pirko2016-02-171-5/+9
| | | | | | | | Be consistent with the rest of the setting functions, and pass "learning" as a bool function parameter. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: introduce worlds infrastructureJiri Pirko2016-02-171-2/+448
| | | | | | | | | This is another step on the way to per-world clean cut. Introduce world ops hooks which each world can implement in world-specific way. Also introduce world infrastructure along with OF-DPA world stub. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: move rocker and rocker_port structs into headerJiri Pirko2016-02-171-73/+0
| | | | | | | | And take some other related thing along. They are going to be pushed into of-dpa part anyway. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: implement get settings mode commandJiri Pirko2016-02-171-0/+32
| | | | | | | Introduce a helper to ask HW for the port mode (world). Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: push tlv processing into separate filesJiri Pirko2016-02-171-220/+2
| | | | | | | | Carve out TLV processing helpers into separate files. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rocker: rename rocker.c to rocker_main.cJiri Pirko2016-02-171-0/+5493
Since "rocker.c" is going to be split into multiple files, start with renaming original "rocker.c" file to "rocker_main.c". Multiple code parts are going to be cut from "rocker_main.c" later on. Fix couple of checkpatch issues on the way. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud