]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: Simplify mlxsw_sx_port_xmit function
authorIdo Schimmel <idosch@mellanox.com>
Thu, 6 Aug 2015 14:41:56 +0000 (16:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Aug 2015 05:54:10 +0000 (22:54 -0700)
commit193488c39f0905377ff45af24c8e8151680d75b9
tree3cee43925b4037dc5efd5b6212aa47f2945bbc27
parent5997f699d80b33b9ab8c0cbf74eaf7cf8985df0b
mlxsw: Simplify mlxsw_sx_port_xmit function

Previously we only checked if the transmission queue is not full in the
middle of the xmit function. This lead to complex logic due to the fact
that sometimes we need to reallocate the headroom for our Tx header.

Allow the switch driver to know if the transmission queue is not full
before sending the packet and remove this complex logic.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/pci.c
drivers/net/ethernet/mellanox/mlxsw/switchx2.c