summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2019-03-29net/mlx5: switch to the shared IB device contextViacheslav Ovsiienko
The code is updated to use the shared IB device context and device handles. The IB device context is shared between reprentors created over the single multiport IB device. All Verbs and DevX objects will be created within this shared context. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: switch to the shared context IB attributesViacheslav Ovsiienko
The code is updated to use the shared IB device attributes, located in the shared IB context. It saves some memory if there are representors created over the single Infiniband device with multiple ports. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: switch to the shared protection domainViacheslav Ovsiienko
The PMD code is updated to use Protected Domain from the shared IB device context. The Domain is shared between all devices belonging to the same multiport Infiniband device. If IB device has only one port, the PD is not shared, because there is only ethernet device created over IB one. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: switch to the names in the shared IB contextViacheslav Ovsiienko
The IB device names are moved from device private data to the shared context, code involving the names is updated. The IB port index treatment is added where it is relevant. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: add IB shared context alloc/free functionsViacheslav Ovsiienko
The Mellanox NICs support SR-IOV and have E-Switch feature. When SR-IOV is set up in switchdev mode and E-Switch is enabled we have so called VF representors in the system. All representors belonging to the same E-Switch are created on the basis of the single PCI function and with current implementation each representor has its own dedicated Infiniband device and operates within its own Infiniband context. It is proposed to provide representors as ports of the single Infiniband device and operate on the shared Infiniband context saving various resources. This patch introduces appropriate structures. Also the functions to allocate and free shared IB context for multiport are added. The IB device context, Protection Domain, device attributes, Infiniband names are going to be relocated to the shared structure from the device private one. mlx5_dev_spawn() is updated to support shared context. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: support multiport IB device during probingViacheslav Ovsiienko
mlx5_pci_probe() routine is refactored to probe the ports of found Infiniband devices. All active ports (with attached network interface), belonging to the same Infiniband device will use the single shared Infiniband context of that device. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: add getting IB ports number for multiport IBViacheslav Ovsiienko
There is the routine mlx5_nl_portnum() added to get the number of ports of multiport Infiniband device. It is assumed the Uplink/VF representors are attached on these ports. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: modify get ifindex routine for multiport IBViacheslav Ovsiienko
There is the routine mlx5_nl_ifindex() returning the network interface index associated with Infiniband device. We are going to support multiport IB devices, now function takes the IB port as argument and returns ifindex associated with tuple <IB device, IB port> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/mlx5: add representor recognition on Linux 5.xViacheslav Ovsiienko
The master device and VF representors were distinguished by presence of port name, master device did not have one. The new Linux kernels starting from 5.0 provide the port name for master device and the implemented representor recognizing method does not work. The new recognizing method is based on querying the VF number, has been created on the base of the device. The IFLA_NUM_VF attribute is returned by kernel if IFLA_EXT_MASK attribute is specified in the Netlink request message. Also the presence check of device symlink in device sysfs folder is added to distinguish representors with sysfs based method. Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-03-29net/virtio: define avail and used flags as constantsTiwei Bie
We are consistently passing 1 as the argument in the data path, so there is no need to define avail/used flags as function-like macros anymore. This patch changes the avail and used flags to constants. And a frequently used combination is also introduced. Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-03-29net/virtio-user: fix multi-process supportTiwei Bie
This patch fixes the multi-process support for virtio-user. Currently virtio-user just provides some limited secondary process supports. Only some basic operations can be done in secondary process on virtio-user port, e.g. getting port stats. Actions which will trigger the communication with vhost backend can't be done in secondary process for now, as the fds are not synced between processes. The processing of server mode devargs is also moved into virtio_user_dev_init(). Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel") Fixes: ee27edbe0c10 ("drivers/net: share vdev data to secondary process") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-03-29net/virtio: fix duplicate naming of include guardAndrius Sirvys
"The macro name '_VHOST_NET_USER_H' of this include guard is used in 2 different header files." lib/librte_vhost/vhost_user.h has the same include guard. Renamed the include guard in vhost.h to differentiate. Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Cc: stable@dpdk.org Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com> Acked-by: Rami Rosen <ramirose@gmail.com> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2019-03-29net/nfp: support setting link up/downPablo Cascón
Add functions to set the link state up or down. Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-03-29net/fm10k: fix VLAN strip offload flagXiao Wang
Since the VLAN header is stripped from mbuf data, PKT_RX_VLAN_STRIPPED should be set in offload flag. Fixes: 6b59a3bc82b1 ("fm10k: fix VLAN in Rx mbuf") Fixes: 7092be8437bd ("fm10k: add vector Rx") Cc: stable@dpdk.org Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
2019-03-29net/failsafe: support secondary processRaslan Darawsheh
Add implementation for probe in secondary. Failsafe will attempt to attach all the sub-devices in secondary process. Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2019-03-29net/failsafe: replace sub-device pointer with port idRaslan Darawsheh
In multiprocess context, the pointer to sub-device is shared between processes. Previously, it was a pointer to per process eth_dev so it's needed to replace this dependency. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2019-03-29net/failsafe: change back-reference from sub-deviceRaslan Darawsheh
In multiprocess context, the sub-device structure is shared between processes. The reference to the failsafe device was a per process pointer. It's changed to port id which is the same for all processes. Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2019-03-29net/failsafe: replace local device with shared dataRaslan Darawsheh
In multiprocess context, the private structure is shared between processes. The back reference from private to generic data was using a pointer to a per process eth_dev. It's now changed to a reference of the shared data. Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2019-03-29net/mlx5: add missing return value checkAli Alnubani
This patch fixes the build failure with message: drivers/net/mlx5/mlx5_ethdev.c: In function ‘mlx5_sysfs_switch_info’: drivers/net/mlx5/mlx5_ethdev.c:1381:3: error: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Werror=unused-result] fscanf(file, "%s", port_name); ^ Which reproduces on Ubuntu 16.04 LTS with gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609. Fixes: b2f3a3810125 ("net/mlx5: support new representor naming format") Signed-off-by: Ali Alnubani <alialnu@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Dekel Peled <dekelp@mellanox.com>
2019-03-29net/bnxt: fix Rx VLAN offload flagsStephen Hemminger
The bnxt driver is not correctly setting the receive VLAN offload flags. When VLAN is offloaded the driver must set the PKT_RX_VLAN_STRIPPED flag. Actually, several drivers have the same bug, only most of the Intel drivers look right. Any driver that sets vlan_tci is probably stripping the tag, and should be setting RX_VLAN_STRIPPED. To quote rte_mbuf.h: /** * The RX packet is a 802.1q VLAN packet, and the tci has been * saved in in mbuf->vlan_tci. * If the flag PKT_RX_VLAN_STRIPPED is also present, the VLAN * header has been stripped from mbuf data, else it is still * present. */ Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-03-29net/i40e: log when provided RSS key is not validWei Zhao
A log message is required when provided RSS key is not valid so that driver will use the default RSS key. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Cc: stable@dpdk.org Signed-off-by: Wei Zhao <wei.zhao1@intel.com> Tested-by: Yuan Peng <yuan.peng@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: enable RSS when device initQiming Yang
This patch enabled RSS for UPD/TCP/SCTP+IPV4/IPV6 packets. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: add safe modeQiming Yang
If E810 download package failed, driver need to go to safe mode. In the safe mode, some advanced features will not be supported. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/ice: load OS default packageQiming Yang
This patch enables package downloading to the device. The package is to be in the /lib/firmware/intel/ice/ddp directory and named ice.pkg. The package is shared by the kernel driver and the DPDK PMD. There is no per device package be supported so far, all the devices can only download the same package. This limitation will be removed in the future. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-03-29net/vdev_netvsc: fix device castStephen Hemminger
The return value from bus->find_device is a rte_device which is not safe to cast to a rte_vdev_device structure. It doesn't really matter since only being checked for NULL but static checkers might find a bug here. Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Matan Azrad <matan@mellanox.com>
2019-03-29net/ice/base: rework on bit opsQi Zhang
Move all bit ops related functions from ice_osdep.h into ice_bitops.h. Also remove the limitation that bitmap can only be 64 bits in ice_set_bit and ice_clear_bit. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: revert workaround for resource allocationQi Zhang
Revert the workaround for allocating TCAM and FV entries to align with latest firmware. Signed-off-by: Dan Nowlin <dan.nowlin@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: increase protocol offset sizeQi Zhang
OS package's format is changed, field vector's protocol offset size is changed from 8 bit to 16 bit. So base code also need to align to this, or PMD will not be able to load OS package correctly. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: fix minor issuesQi Zhang
1. clean flow entry's action structure after remove it. 2. initialized priority when add a new flow entry 3. remove RSS configuration before deleting the flow profile. Fixes: aa1cd410fa64 ("net/ice/base: add flow module") Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module") Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: fix duplicate resource allocationsQi Zhang
This patch ensure that TCAM allocations made by a newly added VSIG that has the same characteristic list of an existing VSIG are removed. Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module") Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: change profile priority for RSS replyQi Zhang
1. Add call to replay RSS configurations 2. Add RSS configurations to end of list and not the head to avoid inversion on replay. Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: support FDIRQi Zhang
Add flow director related support base code. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: support DCBQi Zhang
Add module to support DCB related features. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: change profile id reference countingQi Zhang
Improved the profile reference counting, by moving it from being based on how many TCAM entries using the profile to how many profile map entries are using the profile. Signed-off-by: Dan Nowlin <dan.nowlin@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add function to check FW recovery modeQi Zhang
Code added to check the FW recovery mode. This function will be used by the drivers during init to check whether the FW is in recovery mode or not. If FW is in recovery mode then the drivers need to run in a recovery mode where it can allow only limited operations. Link should be down, allow only certain AQ commands etc. Signed-off-by: Victor Raj <victor.raj@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: return config error without queue to disableQi Zhang
If there is no queue to disable, return appropriate configuration error earlier without acquiring the lock. Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: fix unreachable code usageQi Zhang
Klocwork points out some code is unreachable in ice_get_itr_intrl_gran and ice_ptg_find_ptype. The patch removed the unreachable code and resolved the static analysis reported issues. Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module") Fixes: 453d087ccaff ("net/ice/base: add common functions") Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: update copyright timeQi Zhang
Update copyright time to 2019. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: fix minor issuesQi Zhang
1. Fix some problems with filling the HW tables. 2. Fix a logic error in ice_rem_prof_from_list. Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module") Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: remove local VSIG allocationsQi Zhang
If allocating a VSI to a VSIG fails the local allocations made for VSIG profiles and change-lists will not be removed. Adding calls to free these entries on error in VSIG management calls. Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: do not write TCAM entries backQi Zhang
Profile TCAM entry removal is handled by the firmware when freeing the resource, so the driver does not need to write these default entries back with an update Package action. This patch removes writing of the TCAM entry using Update Package command when removing it, since the entry has already been freed by firmware. Signed-off-by: Dan Nowlin <dan.nowlin@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add RSS key related macro and structuresQi Zhang
Add define for 52 byte RSS hash key size, and add struct ice_aqc_get_set_rss_keys comments regarding setting 40 bytes and 52 byte hash key. Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: enhance get link status commandQi Zhang
Extend the functionality of the admin queue command by including additional status and ID bits to improve link topology configuration. Signed-off-by: Matthew Vick <matthew.vick@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: ensure only valid bits are setQi Zhang
In the ice_aq_set_phy_cfg AQ command, the 16.4 bit is reserved. This patch will make sure that this bit will never be set to 1. Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: enable VSI queue contextQi Zhang
The patch added to retrieve the queue context and update the queue handle for lan queues. Signed-off-by: Victor Raj <victor.raj@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: clean codeQi Zhang
Change below function as static and also relocated code line to align with kernel driver. ice_aq_move_sched_elems ice_sched_get_agg_node ice_sched_set_node_bw_lmt ice_sched_cfg_node_bw_alloc ice_sched_add_agg_cfg ice_sched_rm_agg_cfg ice_sched_move_vsi_to_agg ice_sched_del_rl_profile ice_sched_rm_unused_rl_prof Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: update macrosQi Zhang
Update macros for metadata and package flags. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: fix minor issuesQi Zhang
1. ICE_SW_LKUP_LAST need to be handled correctly in ice_aq_alloc_free_vsi_list and ice_update_vsi_list_rule 2. ICE_SW_LKUP_ETHERTYPE_MAC need to be handled correctly in ice_update_vsi_lkup_fltr 3. free package segment pointer during ice_deinit_hw Fixes: c7dd15931183 ("net/ice/base: add virtual switch code") Fixes: 453d087ccaff ("net/ice/base: add common functions") Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add helper functions for flow managementQi Zhang
1. ice_rem_all_sw_rules_info - remove all switch rules. 2. ice_reply_all_fltr - replay all filters stored in book keeping list. These APIs will be used when switch rule feature is enabled. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-03-29net/ice/base: add MAC filter with marker and counterQi Zhang
1. ice_add_mac_with_sw_marker - add filter with software marker. 2. ice_add_mac_with_counter - add filter with counter enabled. Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Reviewed-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>