summaryrefslogtreecommitdiff
path: root/drivers/net/i40e/rte_pmd_i40e.c
AgeCommit message (Collapse)Author
2019-11-20net/i40e: support ipn3ke FPGA port bondingAndy Pei
In ipn3ke, each FPGA network side port bonding to an i40e pf, each i40e pf link status should get data from FPGA network, side port. This patch provide bonding relationship. Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-07-23net/i40e: fix MAC removal checkHerakliusz Lipiec
Add return value check for i40e_vsi_delete_mac call in rte_pmd_i40e_remove_vf_mac_addr as per coverity issue. Coverity issue: 277224 Fixes: e0cb96204b71 ("net/i40e: add support for representor ports") Cc: stable@dpdk.org Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-06-20net/i40e: allow VF to configure pctype mappingBeilei Xing
This patch allows VF to get/update/reset pctype mapping info. Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-05-24net: add rte prefix to ether definesOlivier Matz
Add 'RTE_' prefix to defines: - rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN. - rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN. - rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN. - rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN. - rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN. - rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN. - rename ETHER_MTU as RTE_ETHER_MTU. - rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN. - rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID. - rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN. - rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU. - rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR. - rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR. - rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4. - rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6. - rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP. - rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN. - rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP. - rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ. - rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG. - rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588. - rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW. - rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB. - rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP. - rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS. - rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM. - rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN. - rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE. - rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4. - rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6. - rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH. - rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH. - rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS. - rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP. - rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG. - rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN. Do not update the command line library to avoid adding a dependency to librte_net. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24net: add rte prefix to ether functionsOlivier Matz
Add 'rte_' prefix to functions: - rename is_same_ether_addr() as rte_is_same_ether_addr(). - rename is_zero_ether_addr() as rte_is_zero_ether_addr(). - rename is_unicast_ether_addr() as rte_is_unicast_ether_addr(). - rename is_multicast_ether_addr() as rte_is_multicast_ether_addr(). - rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr(). - rename is_universal_ether_addr() as rte_is_universal_ether_addr(). - rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr(). - rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr(). - rename eth_random_addr() as rte_eth_random_addr(). - rename ether_addr_copy() as rte_ether_addr_copy(). - rename ether_format_addr() as rte_ether_format_addr(). Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24net: add rte prefix to ether structuresOlivier Matz
Add 'rte_' prefix to structures: - rename struct ether_addr as struct rte_ether_addr. - rename struct ether_hdr as struct rte_ether_hdr. - rename struct vlan_hdr as struct rte_vlan_hdr. - rename struct vxlan_hdr as struct rte_vxlan_hdr. - rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr. Do not update the command line library to avoid adding a dependency to librte_net. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-04replace snprintf with strlcpyBruce Richardson
Do a global replace of snprintf(..."%s",...) with strlcpy, adding in the rte_string_fns.h header if needed. The function changes in this patch were auto-generated via command: spatch --sp-file devtools/cocci/strlcpy.cocci --dir . --in-place and then the files edited using awk to add in the missing header: gawk -i inplace '/include <rte_/ && ! seen { \ print "#include <rte_string_fns.h>"; seen=1} {print}' Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-01-24net/i40e: fix queue region DCB configureWei Zhao
DCB is not necessary to be configured if no user priority of queue region is requested. Unexpected configuration of DCB will cause unexpected behavior, like FDIR does not work on those queues, but could cause more issues. Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush") 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>
2018-10-26net/i40e: enable loopback function for X722 MACHaiyue Wang
In FVL, there was an issue and it didn't support the loopback function before FW 5.0. For FPK (X722) it should work. So it needs to distinguish between the devices by checking MAC type. Fixes: 689bba33272d ("i40e: add VEB switching support") Fixes: bce83974ba2c ("net/i40e: set Tx loopback from PF") Cc: stable@dpdk.org Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-07-23net/i40e: fix packet type parsing with DDPBeilei Xing
To parse packet type correctly, profile needs to be loaded again to update tables in SW even if profile has exited. But previously packet type parser will be false after loading profile when profile already exists. This patch fixes the issue. Fixes: 0585f5c3d264 ("net/i40e: fix DDP profile DEL operation") Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> Tested-by: Xueqin Lin <xueqin.lin@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-07-03net/i40e: remove summarized global register change infoBeilei Xing
The summarized global register change info will be logged no matter if there's real global register change. Since only real changes are logged now, there's no need to summarize global register change info, otherwise will cause misunderstanding. Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-27net/i40e: add support for representor portsDeclan Doherty
Add support for virtual function representor ports to the i40e PF driver. When SR-IOV virtual functions devices are enabled a corresponding representor port for each VF can be enabled, in the process in which the i40e PMD is running, by specifying the representor devargs with the list of VF ports that representors are to be created for. An example of the devargs which would create VF representor for virtual functions 0,2,4,5,6 and 7 is: -w DBDF,representor=[0,2,4-7] and to just specify a single representor on virtual function 3 (switch port id): -w DBDF,representor=3 Signed-off-by: Declan Doherty <declan.doherty@intel.com> Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com> Signed-off-by: Remy Horton <remy.horton@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-14net/i40e: fix DDP profile DEL operationBeilei Xing
Customized info will be updated when processing DDP package, including PCYPE/PTYPE/protocol. Previously, the customized info is updated without any check for package operation - ADD or DEL, but only covers ADD operation. In this situation, even if a package is being removed, new PCTYPE/PTYPE/protocol will still be created, it will cause wrong parsing for SW. This patch cleans new PCTYPE/PTYPE/protocol created when a package is being removed. Fixes: e163c18a15b0 ("net/i40e: update ptype and pctype info") Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2018-03-30net/i40e: remove unnecessary FDIR mask configurationBeilei Xing
Remove unnecessary FDIR mask configuration, otherwise flow directory mask will be changed when configuring hash input set. Signed-off-by: Beilei Xing <beilei.xing@intel.com> Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-03-30net/i40e: fix support DDP packages group 0xffKirill Rybalchenko
Group ID 0xFF indicates that packages does not change parser graph so compatible with any other packages. Fixes: b1ec717bfff5 ("net/i40e: fix multiple DDP packages conflict") Cc: stable@dpdk.org Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-03-30net/i40e: add log when setting input setBeilei Xing
This patch adds log when setting input set since global configuration is changed. Signed-off-by: Beilei Xing <beilei.xing@intel.com> Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-02-06net/i40e: fix multiple DDP packages conflictKirill Rybalchenko
Should be not possible to load conflicting DDP profiles. Only DDP profiles of the same group (not 0) can be loaded together. If DDP profile group is 0, it is exclusive, i.e. it cannot be loaded with any other DDP profile. If DDP profile groups are different, these profiles cannot be loaded together. Fixes: b319712f53c8 ("net/i40e: extended list of operations for DDP processing") Cc: stable@dpdk.org Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Acked-by: Andrey Chilikin <andrey.chilikin@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-01-21net/i40e: fix fail to update packet type tableBeilei Xing
Fail to update SW ptype mapping table when loading PPP profile, though profile can be loaded successfully. It will cause fail to parse SW ptype during receiving packets. This patch fixes this issue. Fixes: 11556c915a08 ("net/i40e: improve packet type parser") Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-16net/i40e: fix port segmentation fault when restartWei Zhao
This patch will go into the process of clear all queue region related configuration when dev stop even if there is no queue region command before, so this is a bug, it may cause error. So add code to check if there is queue configuration exist when flush queue region config and remove this process when device stop. Queue region clear only do when device initialization or PMD get flush command. Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush") Cc: stable@dpdk.org Signed-off-by: Wei Zhao <wei.zhao1@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-16net/i40e: support input set configurationBeilei Xing
This patch supports getting/setting input set info for RSS, FDIR, and FDIR flexible payload. It also adds some helper functions for input set configuration. Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-04drivers: use SPDX tag for Intel copyright filesBruce Richardson
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-26net/i40e: fix queue number error in queue regionWei Zhao
when VSI is enabled with smaller number of queues, for example 1 or 6, it will cause error. 64 is the max number of queues that can be used for RSS, but VSI might be created with only few queues. Fixes: 7cbecc2f742 ("net/i40e: support queue region set and flush") Signed-off-by: Wei Zhao <wei.zhao1@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-26net/i40e: fix unsecure usage of strncpy functionKirill Rybalchenko
Use more secure snprintf function instead of strncpy to prevent memory access violation. Fixes: 40d1324423a4 ("net/i40e: get ddp profile protocol info") Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-26net/i40e: add support for packet template to flow directorKirill Rybalchenko
For complex packets use raw flow type with pre-constructed packet buffer instead of creating a packet internally in PMD. Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-13net/i40e: fix port id typeZhiyong Yang
Some functions applied were still developed on top of uint8_t port_id, however port_id has been increased range to uint16_t. The patch fixes the issue. Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-10-13net/i40e: fix build on FreeBSDWei Zhao
ENODATA can not be build in FreeBSD. Fixes: 7cbecc2f7424b ("net/i40e: support queue region set and flush") Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-10-12net/i40e: support queue region set and flushWei Zhao
This feature enable queue regions configuration for RSS in PF, so that different traffic classes or different packet classification types can be separated to different queues in different queue regions.This patch can set queue region range, it include queue number in a region and the index of first queue. This patch enable mapping between different priorities (UP) and different traffic classes.It also enable mapping between a region index and a sepcific flowtype(PCTYPE).It also provide the solution of flush all configuration about queue region the above described. Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-10-12net/i40e: support converting VF MAC to VF idRory Sexton
Need a way to convert a VF id to a PF id on the host so as to query the PF for relevant statistics which are used for the frequency changes in the vm_power_manager app. Used when profiles are passed down from the guest to the host, allowing the host to map the VFs to PFs. Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com> Signed-off-by: Rory Sexton <rory.sexton@intel.com> Signed-off-by: David Hunt <david.hunt@intel.com> Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-06ethdev: increase port id rangeZhiyong Yang
Extend port_id definition from uint8_t to uint16_t in lib and drivers data structures, specifically rte_eth_dev_data. Modify the APIs, drivers and app using port_id at the same time. Fix some checkpatch issues from the original code and remove some unnecessary cast operations. release_17_11 and deprecation docs have been updated in this patch. Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06net/i40e: update ptype and pctype infoBeilei Xing
Update new packet type and new pctype info when downloading profile. Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-10-06net/i40e: support updating pctype mapping tableKirill Rybalchenko
Add new functions which allow modify, return or reset to default the contents of flow type to pctype dynamic mapping table. Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06net/i40e: get ddp profile protocol infoKirill Rybalchenko
This patch adds new package info types to get list of protocols, pctypes and ptypes defined in a profile Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06net/i40e: remove unnecessary void castsStephen Hemminger
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-10-06net/i40e: new API to add VF MAC address from PFWenzhuo Lu
Currently, rte_eth_dev_mac_addr_add is used by a testpmd CLI to add a MAC address for VF. But the parameter 'pool' of this API means the VMDq pool, not VF. So, it's wrong to use it to add the VF MAC address. This patch provides a new API that can be used to add VF MAC address on i40e. Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-10-06net/i40e: fix return code not checkedDaniel Mrzyglod
Calling i40e_vsi_delete_mac without checking return value (as is done elsewhere 5 out of 6 times) Coverity issue: 140735 Fixes: 43c89d5a4fde ("net/i40e: set VF MAC from PF") Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-07-11net/i40e: support committing TM hierarchyWenzhuo Lu
Add the support of the Traffic Management API, rte_tm_hierarchy_commit. When calling this API, the driver tries to enable the TM configuration on HW. Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-06net/i40e: extended list of operations for DDP processingAndrey Chilikin
This patch adds ability to remove already loaded profile or write profile without registering it Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-07-06net/i40e: get information about DDP profileAndrey Chilikin
This patch adds ability to request information about dynamic device personalization (DDP) profile. Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-04-19net/i40e: configure packet type mappingQi Zhang
The patch adds 4 APIs to support configurable PTYPE mapping for i40e device. rte_pmd_i40e_ptype_mapping_get. rte_pmd_i40e_ptype_mapping_replace. rte_pmd_i40e_ptype_mapping_reset. rte_pmd_i40e_ptype_mapping_update. The mapping from hardware defined packet type to software defined packet type can be updated/reset/read out with these APIs. Also a software ptype with the most significent bit set will be regarded as a user defined ptype (RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK) so application can use it to defined its own PTYPE naming system. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Jianbo Liu <jianbo.liu@linaro.org> Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2017-04-19net/i40e: move private APIs to a specific fileWenzhuo Lu
Create a new file rte_pmd_i40e.c for all the private APIs. Move all the related code to the new file. Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>