aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ncsi.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-08net: iwlwifi: use skb_list_walk_safe helper for gso segmentsJason A. Donenfeld1-7/+2
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: myri10ge: use skb_list_walk_safe helper for gso segmentsJason A. Donenfeld1-5/+3
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: sfc: use skb_list_walk_safe helper for gso segmentsJason A. Donenfeld1-5/+2
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: sunvnet: use skb_list_walk_safe helper for gso segmentsJason A. Donenfeld1-6/+3
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: tg3: use skb_list_walk_safe helper for gso segmentsJason A. Donenfeld1-7/+5
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: r8152: use skb_list_walk_safe helper for gso segmentsJason A. Donenfeld1-7/+5
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: tap: use skb_list_walk_safe helper for gso segmentsJason A. Donenfeld1-8/+6
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: introduce skb_list_walk_safe for skb segment walkingJason A. Donenfeld2-8/+5
As part of the continual effort to remove direct usage of skb->next and skb->prev, this patch adds a helper for iterating through the singly-linked variant of skb lists, which are used for lists of GSO packet. The name "skb_list_..." has been chosen to match the existing function, "kfree_skb_list, which also operates on these singly-linked lists, and the "..._walk_safe" part is the same idiom as elsewhere in the kernel. This patch removes the helper from wireguard and puts it into linux/skbuff.h, while making it a bit more robust for general usage. In particular, parenthesis are added around the macro argument usage, and it now accounts for trying to iterate through an already-null skb pointer, which will simply run the iteration zero times. This latter enhancement means it can be used to replace both do { ... } while and while (...) open-coded idioms. This should take care of these three possible usages, which match all current methods of iterations. skb_list_walk_safe(segs, skb, next) { ... } skb_list_walk_safe(skb, skb, next) { ... } skb_list_walk_safe(segs, skb, segs) { ... } Gcc appears to generate efficient code for each of these. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08socket: fix unused-function warningArnd Bergmann1-11/+12
When procfs is disabled, the fdinfo code causes a harmless warning: net/socket.c:1000:13: error: 'sock_show_fdinfo' defined but not used [-Werror=unused-function] static void sock_show_fdinfo(struct seq_file *m, struct file *f) Move the function definition up so we can use a single #ifdef around it. Fixes: b4653342b151 ("net: Allow to show socket-specific information in /proc/[pid]/fdinfo/[fd]") Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move common tx codeAlex Maftei (amaftei)3-296/+311
Once again, a tiny bit of refactoring was required to stitch the code together (i.e. adding headers). The moved code deals with managing tx queues and mappings. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move common rx codeAlex Maftei (amaftei)6-375/+383
The moved code deals with managing rx buffers and queues. A tiny bit of refactoring was required in other files to stitch the code together. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move event queue management codeAlex Maftei (amaftei)2-92/+91
Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move channel interrupt management codeAlex Maftei (amaftei)2-316/+322
Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move channel alloc/removal codeAlex Maftei (amaftei)5-435/+441
Reallocation and copying code is included, as well as some housekeeping code. Other files have been patched up a bit to accommodate the changes. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move channel start/stop codeAlex Maftei (amaftei)3-188/+190
Also includes interrupt enabling/disabling code. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move some channel-related codeAlex Maftei (amaftei)3-170/+190
Just a handful of function, but also removed many 'static' identifiers so the code builds. These will, of course, be moved. Module parameters for IRQ moderation threshold also moved. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move struct init and fini codeAlex Maftei (amaftei)2-371/+415
The hardware monitor code and the reset work queue code were also moved, with supporting macros and parameters, because they are assigned to function pointers in the struct. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move some device reset codeAlex Maftei (amaftei)2-227/+237
The rest of the reset code will be moved later. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move datapath management codeAlex Maftei (amaftei)2-303/+335
The code that manages the datapath (starting, stopping, including the port-related bits) will be common. Three functions have been added that contain bits from other functions. These will be moved to their final files in later patches. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move mac configuration and status functionsAlex Maftei (amaftei)2-44/+45
Two small functions with different purposes. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: move reset workqueue codeAlex Maftei (amaftei)3-17/+70
Small functions doing work that will be common, related to reset workqueue management. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: further preparation for code splitAlex Maftei (amaftei)2-26/+20
Added more arguments for a couple of functions. Also moved a function to the common header. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08sfc: add new headers in preparation for code splitAlex Maftei (amaftei)19-141/+365
New headers contain prototypes of functions that will be common between ef10 and upcoming driver. Removed static modifier from the affected functions. Some function prototypes were removed from existing headers. Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08hsr: fix dummy hsr_debugfs_rename() declarationArnd Bergmann1-1/+1
The hsr_debugfs_rename prototype got an extra 'void' that needs to be removed again: In file included from /git/arm-soc/net/hsr/hsr_main.c:12: net/hsr/hsr_main.h:194:20: error: two or more data types in declaration specifiers static inline void void hsr_debugfs_rename(struct net_device *dev) Fixes: 4c2d5e33dcd3 ("hsr: rename debugfs file when interface name is changed") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net/ncsi: Send device address as source addressVijay Khemka1-1/+9
After receiving device mac address from device, send this as a source address for further commands instead of broadcast address. This will help in multi host NIC cards. Signed-off-by: Vijay Khemka <vijaykhemka@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-08net: 3com: 3c59x: remove set but not used variable 'mii_reg1'yu kuai1-2/+2
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/3com/3c59x.c: In function ‘vortex_up’: drivers/net/ethernet/3com/3c59x.c:1551:9: warning: variable ‘mii_reg1’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai <yukuai3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07net/rose: remove redundant assignment to variable failedColin Ian King1-1/+0
The variable failed is being assigned a value that is never read, the following goto statement jumps to the end of the function and variable failed is not referenced at all. Remove the redundant assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07ptp: clockmatrix: Rework clockmatrix version information.Vincent Cheng2-64/+15
Simplify and fix the version information displayed by the driver. The new info better relects what is needed to support the hardware. Prev: Version: 4.8.0, Pipeline 22169 0x4001, Rev 0, Bond 5, CSR 311, IRQ 2 New: Version: 4.8.0, Id: 0x4001 Hw Rev: 5 OTP Config Select: 15 - Remove pipeline, CSR and IRQ because version x.y.z already incorporates this information. - Remove bond number because it is not used. - Remove rev number because register was not implemented, always 0 - Add HW Rev ID register to replace rev number - Add OTP config select to show the user configuration chosen by the configurable GPIO pins on start-up Signed-off-by: Vincent Cheng <vincent.cheng.xh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07enetc: Fix inconsistent IS_ERR and PTR_ERRYueHaibing1-1/+1
The proper pointer to be passed as argument is hw Detected using Coccinelle. Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07enetc: Fix an off by one in enetc_setup_tc_txtime()Dan Carpenter1-1/+1
The priv->tx_ring[] has 16 elements but only priv->num_tx_rings are set up, the rest are NULL. This ">" comparison should be ">=" to avoid a potential crash. Fixes: 0d08c9ec7d6e ("enetc: add support time specific departure base on the qos etf") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07Documentation: networking: Add stmmac to device drivers listJose Abreu1-0/+1
Add the stmmac RST file to the index. Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07Documentation: networking: Convert stmmac documentation to RST formatJose Abreu2-401/+697
Convert the documentation of the driver to RST format and delete the old txt and old information that no longer applies. Also, add some new information. Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07MAINTAINERS: Add stmmac Ethernet driver documentation entryJose Abreu1-0/+1
Add the missing entry for the file that documents the stmicro Ethernet driver stmmac. Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07drivers: net: cisco_hdlc: use __func__ in debug messageChen Zhou1-2/+2
Use __func__ to print the function name instead of hard coded string. BTW, replace printk(KERN_DEBUG, ...) with netdev_dbg. Signed-off-by: Chen Zhou <chenzhou10@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07net: ch9200: remove unnecessary returnChen Zhou1-2/+0
The return is not needed, remove it. Signed-off-by: Chen Zhou <chenzhou10@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07net: ch9200: use __func__ in debug messageChen Zhou1-11/+11
Use __func__ to print the function name instead of hard coded string. Signed-off-by: Chen Zhou <chenzhou10@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07ionic: clear compiler warning on hb use before setShannon Nelson1-1/+1
Build checks have pointed out that 'hb' can theoretically be used before set, so let's initialize it and get rid of the compiler complaint. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07ionic: restrict received packets to mtu sizeShannon Nelson1-2/+9
Make sure the NIC drops packets that are larger than the specified MTU. The front end of the NIC will accept packets larger than MTU and will copy all the data it can to fill up the driver's posted buffers - if the buffers are not long enough the packet will then get dropped. With the Rx SG buffers allocagted as full pages, we are currently setting up more space than MTU size available and end up receiving some packets that are larger than MTU, up to the size of buffers posted. To be sure the NIC doesn't waste our time with oversized packets we need to lie a little in the SG descriptor about how long is the last SG element. At dealloc time, we know the allocation was a page, so the deallocation doesn't care about what length we put in the descriptor. Signed-off-by: Shannon Nelson <snelson@pensando.io> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07ionic: add Rx dropped packet counterShannon Nelson3-3/+11
Add a counter for packets dropped by the driver, typically for bad size or a receive error seen by the device. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07ionic: drop use of subdevice tagsShannon Nelson1-4/+0
The subdevice concept is not being used in the driver, so drop the references to it. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-07net/mlx5: DR, Create multiple destination action from dr_create_fteAlex Vesker1-16/+72
Until now it was possible to pass a packet to a single destination such as vport or flow table. With the new support if multiple vports or multiple tables are provided as destinations, fs_dr will create a multiple destination table action, this action should replace other destination actions provided to mlx5dr_create_rule. Each vport destination can be provided with a reformat actions which will be done before forwarding the packet to the vport. Signed-off-by: Alex Vesker <valex@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: DR, Add support for multiple destination table actionAlex Vesker3-0/+132
A multiple destination table action allows HW packet duplication to multiple destinations, this is useful for multicast or mirroring traffic for debug. Duplicating is done using a FW flow table with multiple destinations. The new action creation function, mlx5dr_action_create_mult_dest_tbl will allow creating a single table to iterate over several dr actions. Signed-off-by: Alex Vesker <valex@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: DR, Align dest FT action creation to APIAlex Vesker4-17/+23
Function prefix was changed to be similar to other action APIs. In order to support other FW tables the mlx5_flow_table struct was replaced with table id and type. Signed-off-by: Alex Vesker <valex@mellanox.com> Reviewed-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: DR, Pass table flags at creation to lower layerErez Shitrit4-4/+10
We need to have the flow-table flags when creation sw-steering tables, this parameter exists in the layer between fs_core to sw_steering, this patch gives it to the creation function. Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: DR, Create multi-destination table for SW-steering useErez Shitrit2-0/+75
Currently SW steering doesn't have the means to access HW iterators to support multi-destination (FTEs) flow table entries. In order to support multi-destination FTEs for port-mirroring, SW steering will create a dedicated multi-destination FW managed flow table and FTEs via direct FW commands that we introduced in the previous patch. Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: DR, Create FTE entry in the FW from SW-steeringErez Shitrit2-0/+242
Implement the FW command to setup a FTE (Flow Table Entry) into the FW managed flow tables. Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: DR, Use attributes struct for FW flow table creationAlex Vesker4-35/+50
Instead of using multiple variables use a simple struct. The number of passed argument was too high after adding the encap decap support bits arguments used for multiple destination reformat. Signed-off-by: Alex Vesker <valex@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: Use async EQ setup cleanup helpers for multiple EQsParav Pandit1-65/+49
Use helper routines to setup and teardown multiple EQs and reuse the code in setup, cleanup and error unwinding flows. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: Reduce No CQ found log level from warn to debugParav Pandit1-1/+2
In below sequence, a EQE entry arrives for a CQ which is on the path of being destroyed. cpu-0 cpu-1 ------ ----- mlx5_core_destroy_cq() mlx5_eq_comp_int() mlx5_eq_del_cq() [..] radix_tree_delete() [..] [..] mlx5_eq_cq_get() /* Didn't find CQ is * a valid case. */ /* destroy CQ in hw */ mlx5_cmd_exec() This is still a valid scenario and correct delete CQ sequence, as mirror of the CQ create sequence. Hence, suppress the non harmful debug message from warn to debug level. Keep the debug log message rate limited because user application can trigger it repeatedly. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2020-01-07net/mlx5: Increase the max number of channels to 128Fan Li3-10/+12
Currently the max number of channels is limited to 64, which is half of the indirection table size to allow some flexibility. But on servers with more than 64 cores, users may want to utilize more queues. This patch increases the advertised max number of channels to 128 by changing the ratio between channels and indirection table slots to 1:1. At the same time, the driver still enable no more than 64 channels at loading. Users can change it by ethtool afterwards. Signed-off-by: Fan Li <fanl@mellanox.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>