aboutsummaryrefslogtreecommitdiffstats
path: root/tools/iio (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2018-11-15mlxsw: spectrum: acl: Implement delta for ERPJiri Pirko4-12/+237
Allow ERP sharing for multiple mask. Do it by properly implementing delta_create() objagg object. Use the computed delta info for inserting rules in A-TCAM. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15mlxsw: spectrum: acl: Push code related to num_ctcam_erps inc/dec into separate helpersJiri Pirko1-49/+59
Later on the same code is going to be needed for deltas as well. So push the procedures related to increment and decrement of num_ctcam_erps into a separate helpers. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15mlxsw: spectrum: acl: Remove mlxsw_afk_encode() block range args and key/mask checkJiri Pirko4-14/+9
Since two remaining users of mlxsw_afk_encode() do not specify block ranges to work on, remove the args. Also, key/mask is always non-NULL now, so skip the checks. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15mlxsw: spectrum: acl: Don't encode the key again in mlxsw_sp_acl_atcam_12kb_lkey_id_get()Jiri Pirko4-14/+49
No need to do key encoding again in mlxsw_sp_acl_atcam_12kb_lkey_id_get(). Instead of that, introduce a new helper that would just clear unused blocks. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15mlxsw: core_acl: Change order of args of ops->encode_block()Jiri Pirko3-7/+7
Change order so it is aligned with the usual case where the "write_to" buffer comes as the first arg. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15mlxsw: spectrum: acl: Pass key pointer to master_mask_set/clearJiri Pirko1-13/+17
The device requires that the master mask of each region will be composed from a logical OR between all the unmasked bits in the region. Currently, this is just a logical OR between all the eRPs used in the region, but the next patch is going to introduce delta bits support which need to be taken into account as well. Since the eRP does not include the delta bits, pass the key pointer to mlxsw_sp_acl_erp_master_mask_set/clear instead. Convert key->mask to the bitmap on fly. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15mlxsw: spectrum: acl_erp: Convert to use objagg for tracking ERPsJiri Pirko5-90/+99
Currently the ERPs are tracked internally in a hashtable. Benefit from the newly introduced objagg library and use it to track ERPs. At this point, there is no nesting of objects done, as the delta_create callback always returns -EOPNOTSUPP. On the way, add "mask" into ERP mask get and set functions and struct names. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15lib: introduce initial implementation of object aggregation managerJiri Pirko8-0/+1633
This lib tracks objects which could be of two types: 1) root object 2) nested object - with a "delta" which differentiates it from the associated root object The objects are tracked by a hashtable and reference-counted. User is responsible of implementing callbacks to create/destroy root entity related to each root object and callback to create/destroy nested object delta. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15selftests: Adjust spectrum-2 ctcam_two_atcam_masks_testJiri Pirko1-1/+1
In order for this to behave as required with delta bits, change the mask for rule with handle 103. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15selftests: Adjust spectrum-2 two_mask_testJiri Pirko1-1/+1
In order for this to behave as required with delta bits, change the mask for rule with handle 103. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: get rid of __tcp_checksum_complete()Cong Wang1-6/+1
__tcp_checksum_complete() is 100% same with __skb_checksum_complete() and there is no other caller except tcp_checksum_complete(). So, just use __skb_checksum_complete() there. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: sched: cls_flower: Classify packets using port rangesAmritha Nambiar2-6/+156
Added support in tc flower for filtering based on port ranges. Example: 1. Match on a port range: ------------------------- $ tc filter add dev enp4s0 protocol ip parent ffff:\ prio 1 flower ip_proto tcp dst_port range 20-30 skip_hw\ action drop $ tc -s filter show dev enp4s0 parent ffff: filter protocol ip pref 1 flower chain 0 filter protocol ip pref 1 flower chain 0 handle 0x1 eth_type ipv4 ip_proto tcp dst_port range 20-30 skip_hw not_in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 1 bind 1 installed 85 sec used 3 sec Action statistics: Sent 460 bytes 10 pkt (dropped 10, overlimits 0 requeues 0) backlog 0b 0p requeues 0 2. Match on IP address and port range: -------------------------------------- $ tc filter add dev enp4s0 protocol ip parent ffff:\ prio 1 flower dst_ip 192.168.1.1 ip_proto tcp dst_port range 100-200\ skip_hw action drop $ tc -s filter show dev enp4s0 parent ffff: filter protocol ip pref 1 flower chain 0 handle 0x2 eth_type ipv4 ip_proto tcp dst_ip 192.168.1.1 dst_port range 100-200 skip_hw not_in_hw action order 1: gact action drop random type none pass val 0 index 2 ref 1 bind 1 installed 58 sec used 2 sec Action statistics: Sent 920 bytes 20 pkt (dropped 20, overlimits 0 requeues 0) backlog 0b 0p requeues 0 v4: 1. Added condition before setting port key. 2. Organized setting and dumping port range keys into functions and added validation of input range. v3: 1. Moved new fields in UAPI enum to the end of enum. 2. Removed couple of empty lines. v2: Addressed Jiri's comments: 1. Added separate functions for dst and src comparisons. 2. Removed endpoint enum. 3. Added new bit TCA_FLOWER_FLAGS_RANGE to decide normal/range lookup. 4. Cleaned up fl_lookup function. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: dump more useful information in netdev_rx_csum_fault()Cong Wang5-8/+16
Currently netdev_rx_csum_fault() only shows a device name, we need more information about the skb for debugging csum failures. Sample output: ens3: hw csum failure dev features: 0x0000000000014b89 skb len=84 data_len=0 pkt_type=0 gso_size=0 gso_type=0 nr_frags=0 ip_summed=0 csum=0 csum_complete_sw=0 csum_valid=0 csum_level=0 Note, I use pr_err() just to be consistent with the existing one. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2Andrew Lunn1-5/+16
We already have a workaround for a couple of switches whose internal PHYs only have the Marvel OUI, but no model number. We detect such PHYs and give them the 6390 ID as the model number. However the mv88e6161 has two SERDES interfaces in the same address range as its internal PHYs. These suffer from the same problem, the Marvell OUI, but no model number. As a result, these SERDES interfaces were getting the same PHY ID as the mv88e6390, even though they are not PHYs, and the Marvell PHY driver was trying to drive them. Add a special case to stop this from happen. Reported-by: Chris Healy <Chris.Healy@zii.aero> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: hns3: Adds GRO params to SKB for the stackPeng Li2-3/+49
When HW GRO enable, protocol stack will not do GRO again, driver should add gro param to the skb for the protocol stack.. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: hns3: Add skb chain when num of RX buf exceeds MAX_SKB_FRAGSPeng Li2-2/+37
MAX_SKB_FRAGS in protocol stack is defined as: MAX_SKB_FRAGS is 17 when PAGE_SIZE is 4K. If HW enable GRO, it may merge small packets and the rx buffer may be more than MAX_SKB_FRAGS. So driver will add skb chain when RX buffer num. more than MAX_SKB_FRAGS. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: hns3: Add support for ethtool -K to enable/disable HW GROPeng Li4-1/+32
This patch adds support of ethtool -K to enable/disable hardware GRO in HNS3 PF/VF driver. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: hns3: Add handling of GRO Pkts not fully RX'ed in NAPI pollPeng Li2-62/+140
The "FE bit" in the description means the last description for a packets. When HW GRO enable, HW write data to ring every packet/buffer, there is greater probability that driver handle with the describtion but HW still not set the "FE bit". When drier handle the packet and HW still not set "FE bit", driver stores skb and bd_num in rx ring, and continue to use the skb and bd_num in next napi. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: hns3: Enable HW GRO for Rev B(=0x21) HNS3 hardwarePeng Li6-1/+83
HNS3 hardware Revision B(=0x21) supports Hardware GRO feature. This patch enables this feature in the HNS3 PF/VF driver. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-15net: phy: icplus: add config_intr callbackHeiner Kallweit1-7/+16
Move IRQ configuration for IP101A/G from config_init to config_intr callback. Reasons: 1. This allows phylib to disable interrupts if needed. 2. Icplus was the only driver supporting interrupts w/o defining a config_intr callback. Now we can add a phylib plausibility check disabling interrupt mode if one of the two irq-related callbacks isn't defined. I don't own hardware with this PHY, and the change is based on the datasheet for IP101A LF (which is supposed to be register-compatible with IP101A/G). Change is compile-tested only. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: restructure Qdisc handlingJakub Kicinski4-352/+340
In preparation of handling more Qdisc types switch to a different offload strategy. We have now recreated the Qdisc hierarchy in the driver. Every time the hierarchy changes parse it, and update the configuration of the HW accordingly. While at it drop the support of pretending that we can instantiate a single queue on a multi-queue device in HW/FW. MQ is now required, and each queue will have its own instance of RED. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: save RED's parametersJakub Kicinski2-1/+18
Use the new driver Qdisc structure to keep track of parameters of RED Qdiscs. This way as the Qdisc moves around in the hierarchy we will be able to configure the HW appropriately. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: reset RED's child based on limitJakub Kicinski1-5/+22
RED qdisc will replace its child Qdisc with a new FIFO queue if it is reconfigured and the limit parameter is not 0. This means that when it's created with limit of 0 it will have no FIFO, and all packets will be dropped. If it's changed and limit is specified it will loose its existing child (implicit graft). Make sure we mark RED Qdisc child as NFP_QDISC_UNTRACKED if its not the expected FIFO. nfp_abm_qdisc_replace() will return 1 if Qdisc already existed. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: sched: red: notify drivers about RED's limit parameterJakub Kicinski2-0/+2
RED qdisc's limit parameter changes the behaviour of the qdisc, for instance if it's set to 0 qdisc will drop all the packets. When replace operation happens and parameter is set to non-0 a new fifo qdisc will be instantiated and replace the old child qdisc which will be destroyed. Drivers need to know the parameter, even if they don't impose the actual limit to be able to reliably reconstruct the Qdisc hierarchy. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: build full Qdisc hierarchy based on graft notificationsJakub Kicinski2-0/+107
Using graft notifications recreate in the driver the full Qdisc hierarchy. Keep track of how many times each Qdisc is attached to the hierarchy to make sure we don't offload Qdiscs which are attached multiple times (device queues can't be shared). For graft events of Qdiscs we don't know exist make the child as invalid/untracked. Note that MQ Qdisc doesn't send destruction events reliably when device is dismantled, so we need to manually clean out the children otherwise we'd think Qdiscs which are still in use are getting freed. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: sched: mq: offload a graft notificationJakub Kicinski2-1/+19
Drivers offloading Qdiscs should have reasonable certainty the offloaded behaviour matches the SW path. This is impossible if the driver does not know about all Qdiscs or when Qdiscs move and are reused. Send a graft notification from MQ. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: sched: red: offload a graft notificationJakub Kicinski2-0/+19
Drivers offloading Qdiscs should have reasonable certainty the offloaded behaviour matches the SW path. This is impossible if the driver does not know about all Qdiscs or when Qdiscs move and are reused. Send a graft notification from RED. The drivers are expected to simply stop offloading the Qdisc, if a non-standard child is ever grafted onto it. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: allocate Qdisc child tableJakub Kicinski2-7/+24
To keep track of Qdisc hierarchy allocate a table for children for each Qdisc. RED Qdisc can only have one child. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: remember which Qdisc is rootJakub Kicinski3-0/+19
Keep track of which Qdisc is currently root. We need to implement TC_SETUP_ROOT_QDISC handling, and for completeness also clear the root Qdisc pointer when it's freed. TC_SETUP_ROOT_QDISC isn't always sent when device is dismantled. Remembering the root Qdisc will allow us to build the entire hierarchy in following patches. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: sched: provide notification for graft on rootJakub Kicinski3-0/+28
Drivers are currently not notified when a Qdisc is grafted as root. This requires special casing Qdiscs added with parent = TC_H_ROOT in the driver. Also there is no notification sent to the driver when an existing Qdisc is grafted as root. Add this very simple notifications, drivers should now be able to track their Qdisc tree fully. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: track all offload-enabled qdiscsJakub Kicinski3-4/+132
Allocate an object corresponding to any offloaded qdisc we are informed about by the kernel. Not only the qdiscs we have a chance of offloading. The count of created objects will be used to decide whether the ethtool TC offload can be disabled, since otherwise we may miss destroy commands. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: keep track of all RED thresholdsJakub Kicinski4-41/+120
Instead of writing the threshold out when Qdisc is configured and not remembering it move to a scheme where we remember all thresholds. When configuration changes parse the offloaded Qdiscs and set thresholds appropriately. This will help future extensions. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14nfp: abm: rename qdiscs -> red_qdiscsJakub Kicinski3-24/+29
Rename qdiscs member to red_qdiscs. One of following patches will use the name qdiscs for tracking all qdisc types. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: aquantia: add support of rx-vlan-filter offloadDmitry Bogdanov7-18/+197
Since it uses the same NIC table as rx flow vlan filter therefore rx-flow vlan filter accepts only vlans that present on the interface in case of rx-vlan-filter is on. Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: aquantia: add ethertype and PCP to rx flow filtersDmitry Bogdanov5-4/+133
L2 EtherType filters allows to filter packet by EtherType field or both EtherType and User Priority (PCP) field of 802.1Q. UserPriority (vlan) parameter must be accompanied by mask 0x1FFF. That is to distinguish VLAN filter from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID are passed in the same 'vlan' parameter. Example: To add a filter that directs IP4 packess of priority 3 to queue 3: ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF \ action 3 loc 16 Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: aquantia: add vlan id to rx flow filtersDmitry Bogdanov7-3/+151
The VLAN filter (VLAN id) is compared against 16 filters. VLAN id must be accompanied by mask 0xF000. That is to distinguish VLAN filter from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID are passed in the same 'vlan' parameter. Flow type may be any as it is not matched for VLAN filter. Due to fixed order of the rules in the NIC, the location 0-15 are reserved for vlan filters. Example: To add a rule that directs packets from VLAN 2001 to queue 5: ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 5 loc 0 Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: aquantia: add support of L3/L4 ntuple filtersDmitry Bogdanov5-3/+284
Add support of L3/L4 5-tuple {protocol, src-ip, dst-ip, src-port, dst-port} filters. Mask is not supported. Src-port and dst-port are only compared for TCP/UDP/SCTP packets. Both IPv4 and IPv6 are supported. The supported actions are the drop and the queue assignment. Due to fixed order of the rules in the NIC, the location 32-39 are reserved for L3/L4 5-tuple filters. The locations 32 and 36 are reserved for IPv6 filters. Examples: sudo ethtool -N eth0 flow-type ip6 src-ip 2001:db8:0:f101::2 \ dst-ip 2001:db8:0:f101::5 action -1 loc 36 sudo ethtool -N eth0 flow-type udp4 src-ip 10.0.0.4 \ dst-ip 10.0.0.7 src-port 2000 dst-port 2001 action 2 loc 32 Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: aquantia: add infrastructure for ntuple rulesDmitry Bogdanov8-1/+501
Add infrastructure to support ntuple filter configuration. Add rule, remove rule, reapply on interface up. Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-14net: aquantia: add rx-flow filter definitionsDmitry Bogdanov3-17/+275
Add missing register definitions and the functions accessing them related to rx-flow filters. Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-13net: ethernet: ti: cpsw: allow vlan tagged packets to be timestampedIvan Khoronzhuk1-2/+3
Allow vlan tagged packets to be timestamped, as no any restrictions for this. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-13net: ethernet: ti: cpts: move enable/disable flags outside of cpts moduleIvan Khoronzhuk4-77/+41
Each slave has it's own receive timestamp filter. But cpts rx/tx timestamp enable flags are used to allow ts retrieve only for one user. This limitation causes data path redundancy and setting overlap if cpsw module is in dual-mac mode for instance. If rx ts is enabled only for one port - the second interface must expect every incoming packet to be PTP packet w/o absolutely any reason, and if it's PTP - do unneeded stuff, as rx filter for second port is not set and cpts fifo is not supposed to contain appropriate ts event. That's not correct. So, to fix control overlap and avoid redundant CPU cycles, the patch splits rx/tx ts enable flags between network devices. After the patch, PTP timestamping still should be used for only one port (or PTP id counter has to be different for both ports as cpts IP is common). Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-13net: ethernet: ti: cpts: purge staled skbs from txqIvan Khoronzhuk1-2/+24
The overflow event is running with 1 jiffy in case if txq is not empty, but it can be emptied completely only if next tx event consumes skb or deletes staled skb from the txq. In case of staled skb, that can happen for some unpredictable reason (the ts event was lost or timed out), the overflow event can be generated quite long time consuming CPU w/o reason before next tx event happens. To avoid it, purge txq before increasing overflow event rate. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-13net: ethernet: ti: cpts: correct debug for expired txq skbIvan Khoronzhuk1-3/+1
The msgtype and seqid that is smth that belongs to event for comparison but not for staled txq skb. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-13ice: Remove ICE_MAX_TXQ_PER_TXQG check when configuring Tx queueMd Fahad Iqbal Polash1-4/+0
This patch removes the condition checking of VSI TX queue number to ICE_MAX_TXQ_PER_TXQG. This is an unnecessary check and causes a driver load error on hosts that have more than 128 cores. Signed-off-by: Md Fahad Iqbal Polash <md.fahad.iqbal.polash@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-13ice: Destroy scheduler tree in reset pathHenry Tieman1-0/+1
The scheduler tree is is always rebuilt during reset. The existing code adds new scheduler nodes for queues but may not clean up earlier nodes. This patch removed the old scheduler tree during reset before it is rebuilt. Signed-off-by: Henry Tieman <henry.w.tieman@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-13ice: Fix to make VLAN priority tagged traffic to appear on all TCsUsha Ketineni5-51/+81
This patch includes below changes to resolve the issue of ETS bandwidth shaping to work. 1. Allocation of Tx queues is accounted for based on the enabled TC's in ice_vsi_setup_q_map() and enabled the Tx queues on those TC's via ice_vsi_cfg_txqs() 2. Get the mapped netdev TC # for the user priority and set the priority to TC mapping for the VSI. Signed-off-by: Usha Ketineni <usha.k.ketineni@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-13ice: Call pci_disable_sriov before stopping queues for VFBrett Creeley1-9/+9
Previous to this commit the driver was immediately stopping Tx/Rx queues when doing the following "echo 0 > sriov_numvfs" and then it was calling pci_disable_sriov if the VFs are not assigned. This was causing the VIRTCHNL_OP_DISABLE_QUEUES to fail because it was trying to stop the queues for a second time. Fix this by calling pci_disable_sriov before stopping the Tx/Rx queues. This allows the VIRTCHNL_OP_DISABLE_QUEUES to get processed before the driver tries to stop the Rx/Tx queues in ice_free_vfs. Signed-off-by: Brett Creeley <brett.creeley@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-13ice: Increase Rx queue disable timeoutPiotr Raczynski1-3/+3
With much traffic coming into the port, Rx queue disable procedure can take more time until all pending queue requests on PCIe finish. Reuse ICE_Q_WAIT_MAX_RETRY macro and increase the delay itself. Signed-off-by: Piotr Raczynski <piotr.raczynski@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-13ice: Fix NVM mask definesLev Faerman1-3/+3
Fixes bad masks that would break compilation when evaluated. Signed-off-by: Lev Faerman <lev.faerman@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-13ice: Avoid nested RTNL locking in ice_dis_vsiDave Ertman1-5/+10
ice_dis_vsi() performs an rtnl_lock() if it detects a netdev that is running on the VSI. In cases where the RTNL lock has already been acquired, a deadlock results. Add a boolean to pass to ice_dis_vsi to tell it if the RTNL lock is already held. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>