summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * net/smc: guarantee reset of write_blocked for heavy workloadUrsula Braun2017-04-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If peer indicates write_blocked, the cursor state of the received data should be send to the peer immediately (in smc_tx_consumer_update()). Afterwards the write_blocked indicator is cleared. If there is no free slot for another write request, sending is postponed to worker smc_tx_work, and the write_blocked indicator is not cleared. Therefore another clearing check is needed in smc_tx_work(). Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: return active RoCE port onlyUrsula Braun2017-04-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | SMC requires an active ib port on the RoCE device. smc_pnet_find_roce_resource() determines the matching RoCE device port according to the configured PNET table. Do not return the found RoCE device port, if it is not flagged active. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: remove useless smc_ib_devices_list checkUrsula Braun2017-04-123-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | The global event handler is created only, if the ib_device has already been used by at least one link group. It is guaranteed that there exists the corresponding entry in the smc_ib_devices list. Get rid of this superfluous check. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: get rid of old commentUrsula Braun2017-04-121-2/+0Star
|/ | | | | | | | This patch removes an outdated comment. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: use netif_set_real_num_{rx,tx}_queuesJoao Pinto2017-04-121-2/+2
| | | | | | | | | | In the submission of the lastest multiple buffer patch set, this fix was lost. I am sending this patch to put it right again. The fix was originally proposed by Arnd Bergmann. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bpf: pass sk to helper functionsWillem de Bruijn2017-04-112-2/+10
| | | | | | | | | | | | | BPF helper functions access socket fields through skb->sk. This is not set in ingress cgroup and socket filters. The association is only made in skb_set_owner_r once the filter has accepted the packet. Sk is available as socket lookup has taken place. Temporarily set skb->sk to sk in these cases. Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* devlink: fix return value check in devlink_dpipe_header_put()Wei Yongjun2017-04-111-1/+1
| | | | | | | | | | Fix the return value check which testing the wrong variable in devlink_dpipe_header_put(). Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 's390-qeth-updates'David S. Miller2017-04-114-393/+268Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Julian Wiedmann says: ==================== more s390/net updates here's a second batch of s390/net patches for net-next. A mixed bunch of qeth cleanups, and a few patches to add support for ETHTOOL_GLINKSETTINGS. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: remove unimplemented gdev routinesJulian Wiedmann2017-04-112-19/+2Star
| | | | | | | | | | | | | | | | | | | | prepare() and complete() are not implemented by any discipline, so just drop all the indirection. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Reviewed-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: use LINK_MODE_* to report the link characteristicsJulian Wiedmann2017-04-111-24/+47
| | | | | | | | | | | | | | | | | | | | LINK_MODE_* replaces the u32-limited SUPPORTED_* / ENABLED_* definitions. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: convert to ETHTOOL_GLINKSETTINGS APIJulian Wiedmann2017-04-114-42/+40Star
| | | | | | | | | | | | | | | | | | | | get_settings() is deprecated and lacks support for higher link speeds, so implement get_link_ksettings() instead. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: clean up qeth_set_ecmd_adv_sup()Julian Wiedmann2017-04-111-29/+28Star
| | | | | | | | | | | | | | | | | | | | In preparation for moving to get_link_ksettings(), clean up how we build the supported and advertised port/speed masks. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: use and remove some definesJulian Wiedmann2017-04-112-3/+2Star
| | | | | | | | | | | | | | | | | | 1. a buffer has 16 is_header flags, because that's its # of elements 2. replace the last occurrence of QETH_HEADER_SIZE, and remove it Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: use correct return type for hard_start_xmit()Julian Wiedmann2017-04-112-2/+4
| | | | | | | | | | | | | | | | ndo_start_xmit() expects us to return netdev_tx_t here... Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: remove unused parameterJulian Wiedmann2017-04-114-5/+4Star
| | | | | | | | | | | | | | | | | | 'elements_needed' is not used in qeth_do_send_packet_fast(), so consequently remove it. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: move gdev shutdown handler to coreJulian Wiedmann2017-04-114-27/+6Star
| | | | | | | | | | | | | | | | Duplicated code. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: move NAPI poll routine to coreJulian Wiedmann2017-04-114-169/+97Star
| | | | | | | | | | | | | | | | | | | | | | | | Identical code, we just need to call a layer-specific hook to process any received buffer. qeth_buffer_reclaim_work() is shuffled around to avoid a forward declaration for qeth_queue_input_buffer(). Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * s390/qeth: move common ioctl handling to coreJulian Wiedmann2017-04-114-99/+64Star
|/ | | | | | | | | | There's a number of layer-independent ioctls that we can handle in core, and reduce code duplication. For layer-specific ioctls, add a do_ioctl() discipline hook. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bpf: remove struct bpf_map_type_listJohannes Berg2017-04-117-165/+53Star
| | | | | | | | | | | | | | | | | | | There's no need to have struct bpf_map_type_list since it just contains a list_head, the type, and the ops pointer. Since the types are densely packed and not actually dynamically registered, it's much easier and smaller to have an array of type->ops pointer. Also initialize this array statically to remove code needed to initialize it. In order to save duplicating the list, move it to the types header file added by the previous patch and include it in the same fashion. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* bpf: remove struct bpf_prog_type_listJohannes Berg2017-04-115-122/+44Star
| | | | | | | | | | | | | | | | | | There's no need to have struct bpf_prog_type_list since it just contains a list_head, the type, and the ops pointer. Since the types are densely packed and not actually dynamically registered, it's much easier and smaller to have an array of type->ops pointer. Also initialize this array statically to remove code needed to initialize it. In order to save duplicating the list, move it to a new header file and include it in the places needing it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'fec-driver-code-clean'David S. Miller2017-04-111-17/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fugang Duan says: ==================== net: fec: driver code clean The patch series are for fec ethernet driver code clean up, each patch is independent. Patch #1,#4,#5 are code clean up. Patch #2,#3 are for aarch64 platform. Patch #6 is for i.MX6UL to add lost errata workaround. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: fec: add ERR007885 for i.MX6ul enet IPFugang Duan2017-04-111-2/+3
| | | | | | | | | | | | | | | | The errata ERR007885 HW fix don't add to i.MX6ul ENET IP version, so add sw workaroud for the chip. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: fec: correct the errata number comment typoFugang Duan2017-04-111-1/+1
| | | | | | | | | | | | | | Correct the errata number ERR006358 comment typo. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: fec: add phy-reset-gpios PROBE_DEFER checkFugang Duan2017-04-111-8/+18
| | | | | | | | | | | | | | | | | | Many boards use i2c/spi expander gpio as phy-reset-gpios and these gpios maybe registered after fec port, driver should check the return value of .of_get_named_gpio(). Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: fec: pass ->dev to dma_alloc__coherent() APIFugang Duan2017-04-111-2/+2
| | | | | | | | | | | | | | | | In aarch64 system, it requires to trasfer ->dev to dma_alloc_coherent() API, otherwise allocate failed and print kernel warning. Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: fec: avoid BD pointer type cast to 32bitFugang Duan2017-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | In aarch64 system, the BD pointer is 64bit, and the high-order 32-bits of the address is effective, so replace usigned with (void *) type to aovid 64bit address is casted to 32bit in .fec_enet_get_nextdesc() and .fec_enet_get_prevdesc() functions. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: fec: add return value check after calling .of_property_read_u32()Fugang Duan2017-04-111-2/+2
|/ | | | | | | | Add return value check after calling .of_property_read_u32() to avoid the warning reported by coverity. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'l2tp-drop-l2tp_session_find'David S. Miller2017-04-113-58/+1Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | Guillaume Nault says: ==================== l2tp: drop l2tp_session_find() l2tp_netlink is the last user of l2tp_session_find(), but that call is useless. Let's remove it and drop l2tp_session_find() definitely. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: remove l2tp_session_find()Guillaume Nault2017-04-112-53/+1Star
| | | | | | | | | | | | | | This function isn't used anymore. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: remove useless duplicate session detection in l2tp_netlinkGuillaume Nault2017-04-111-5/+0Star
|/ | | | | | | | | | | | | There's no point in checking for duplicate sessions at the beginning of l2tp_nl_cmd_session_create(); the ->session_create() callbacks already return -EEXIST when the session already exists. Furthermore, even if l2tp_session_find() returns NULL, a new session might be created right after the test. So relying on ->session_create() to avoid duplicate session is the only sane behaviour. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'net-remove-pci_enable_msix'David S. Miller2017-04-1110-253/+112Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christoph Hellwig says: ==================== remove pci_enable_msix() V3 this series removes the remaining callers of the pci_enable_msix() function and then the function itself. The final removal has been Acked by Bjorn. Changes since V2: - add another patch on Dave's request - add various acks - spelling fixes in the commit logs Changes since V1: - replace the two previous thunderx patches with a new one from Thanneeru ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * mlxsw: convert to pci_alloc_irq_vectorsChristoph Hellwig2017-04-111-7/+6Star
| | | | | | | | | | | | | | | | | | | | | | Trivial conversion as only one vector is supported, but at least we lose the useless msix_entry member in the per-device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Tested-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * PCI: remove pci_enable_msixChristoph Hellwig2017-04-112-25/+0Star
| | | | | | | | | | | | | | | | Unused now that all callers switched to pci_alloc_irq_vectors. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: thunderx: Switch to pci_alloc_irq_vectorsThanneeru Srinivasulu2017-04-113-96/+40Star
| | | | | | | | | | | | | | | | | | | | Remove deprecated pci_enable_msix API in favour of its successor pci_alloc_irq_vectors. Signed-off-by: Thanneeru Srinivasulu <tsrinivasulu@cavium.com> Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/ena: switch to pci_alloc_irq_vectorsChristoph Hellwig2017-04-112-45/+12Star
| | | | | | | | | | | | | | Remove the deprecated pci_enable_msix API in favour of its successor. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: alx: switch to pci_alloc_irq_vectorsChristoph Hellwig2017-04-112-80/+54Star
|/ | | | | | | | Remove the deprecated pci_enable_msix API in favour of its successor, and make sure to handle errors during IRQ setup properly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2017-04-114-10/+7Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2017-04-11 1) Remove unused field from struct xfrm_mgr. 2) Code size optimizations for the xfrm prefix hash and address match. 3) Branch optimization for addr4_match. All patches from Alexey Dobriyan. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * xfrm: branchless addr4_match() on 64-bitAlexey Dobriyan2017-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current addr4_match() code has special test for /0 prefixes because of standard required undefined behaviour. However, it is possible to omit it on 64-bit because shifting can be done within a 64-bit register and then truncated to the expected value (which is 0 mask). Implicit truncation by htonl() fits nicely into R32-within-R64 model on x86-64. Space savings: none (coincidence) Branch savings: 1 Before: movzx eax,BYTE PTR [rdi+0x2a] # ->prefixlen_d test al,al jne xfrm_selector_match + 0x23f ... movzx eax,BYTE PTR [rbx+0x2b] # ->prefixlen_s test al,al je xfrm_selector_match + 0x1c7 After (no branches): mov r8d,0x20 mov rdx,0xffffffffffffffff mov esi,DWORD PTR [rsi+0x2c] mov ecx,r8d sub cl,BYTE PTR [rdi+0x2a] xor esi,DWORD PTR [rbx] mov rdi,rdx xor eax,eax shl rdi,cl bswap edi Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
| * xfrm: use "unsigned int" in addr_match()Alexey Dobriyan2017-03-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86_64 is zero-extending arch so "unsigned int" is preferred over "int" for address calculations and extending to size_t. Space savings: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24) function old new delta xfrm_state_walk 708 696 -12 xfrm_selector_match 918 906 -12 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
| * xfrm: use "unsigned int" in __xfrm6_pref_hash()Alexey Dobriyan2017-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86_64 is zero-extending arch so "unsigned int" is preferred over "int" for address calculations. Space savings: add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-58 (-58) function old new delta xfrm_hash_resize 2752 2743 -9 policy_hash_bysel 985 973 -12 policy_hash_direct 1036 999 -37 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
| * xfrm: remove unused struct xfrm_mgr::idAlexey Dobriyan2017-03-243-3/+0Star
| | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
* | Merge branch 'ftgmac100-rework-batch3-tx-path'David S. Miller2017-04-102-209/+249
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benjamin Herrenschmidt says: ==================== ftgmac100: Rework batch 3 - TX path This is version 2 of the third batch of updates to the ftgmac100 driver. This one tackles the TX path of the driver. This provides the bulk of the performance improvements by adding support for fragmented sends along with a bunch of cleanups. Version 2 fixes a patch splitting mistake and uses eth_skb_pad() (which uses skb_put_padto) to pad ethernet frames rather than skb_padto(), thus removing the need to also pad the packet headlen in a couple of places. Subsequent batches will add various features (ethtool functions, vlan offlan, ...) and cleanups. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Remove tx descriptor accessorsBenjamin Herrenschmidt2017-04-102-114/+69Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Directly access the fields when needed. The accessors add clutter not clarity and in some cases cause unnecessary read-modify-write type access on the slow (uncached) descriptor memory. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Add support for fragmented txBenjamin Herrenschmidt2017-04-101-25/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add NETIF_F_SG and create multiple TX ring entries for skb fragments. On reclaim, the skb is only freed on the segment marked as "last". Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Don't clear tx desc fields unnecessarilyBenjamin Herrenschmidt2017-04-101-11/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Those are non-cachable stores, let's avoid those we don't need. Remove the helper, it's not particularly helpful and since it uses "priv" I can't move it to the header file. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Split tx packet freeing from ftgmac100_tx_complete_packet()Benjamin Herrenschmidt2017-04-101-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the packet freeing to a separate function which is also used by ftgmac100_free_buffers() and will be used more in the error path of fragmented sends. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Move the barrier out of ftgmac100_txdes_set_dma_own()Benjamin Herrenschmidt2017-04-101-5/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | We'll use variants of this accessor without barriers when building series of descriptors for fragmented sends Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Cleanup tx queue handlingBenjamin Herrenschmidt2017-04-101-35/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a private lock which isn't terribly useful, and we maintain a "tx_pending" counter for information that's already available via a trivial arithmetic operation. Then we unconditionaly wake the queue even when not stopped. Finally our code in tx isn't really safe vs. a concurrent reclaim. The aspeed chips aren't SMP today but I prefer the code being right and future proof. So rip that out and replace it with more "standard" queue handling, currently with a threshold of 1 queue element, which will be increased when we implement fragmented sends. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Store tx skbs in a separate arrayBenjamin Herrenschmidt2017-04-101-43/+16Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than in the descriptor. The descriptor is mapped non-cachable and rather slow to access. Since to do that we need to keep track of the tx "pointer" we also have no use of all the accesors to manipulate it, just open code it, it's as clear and will help when adding fragmented sends. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ftgmac100: Pad small frames properlyBenjamin Herrenschmidt2017-04-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Rather than just transmitting garbage past the end of the small packet. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>