Commit Graph

38 Commits

Author SHA1 Message Date
Ferruh Yigit
ffc905f3b8 ethdev: separate driver APIs
Create a rte_ethdev_driver.h file and move PMD specific APIs here.
Drivers updated to include this new header file.

There is no update in header content and since ethdev.h included by
ethdev_driver.h, nothing changed from driver point of view, only
logically grouping of APIs. From applications point of view they can't
access to driver specific APIs anymore and they shouldn't.

More PMD specific data structures still remain in ethdev.h because of
inline functions in header use them. Those will be handled separately.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-22 01:26:49 +01:00
Adrien Mazarguil
12f9877574 net/i40e: fix ISO C in exported header
Reported by check-includes.sh:

 [...]/rte_pmd_i40e.h:97:30: error: ISO C restricts enumerator values to
     range of `int' [-Werror=pedantic]
   RTE_PMD_I40E_PKG_INFO_MAX = 0xFFFFFFFF
                               ^

Fixes: edeab742ed ("net/i40e: get information about DDP profile")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-01-17 00:24:56 +01:00
Beilei Xing
97bd4ef9a0 net/i40e: support input set configuration
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-16 18:47:49 +01:00
Bruce Richardson
5566a3e358 drivers: use SPDX tag for Intel copyright files
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>
2018-01-04 22:41:39 +01:00
Kirill Rybalchenko
66c78f4799 net/i40e: add support for packet template to flow director
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-26 02:33:01 +02:00
Zhiyong Yang
04b443fb2c net/i40e: fix port id type
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: f8244c6399 ("ethdev: increase port id range")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-10-13 21:57:48 +02:00
Wei Zhao
7cbecc2f74 net/i40e: support queue region set and flush
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-12 01:52:50 +01:00
Rory Sexton
a399ed9ae4 net/i40e: support converting VF MAC to VF id
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-12 00:40:39 +01:00
Zhiyong Yang
f8244c6399 ethdev: increase port id range
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-06 18:23:25 +02:00
Kirill Rybalchenko
350861b35c net/i40e: support updating pctype mapping table
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-06 02:49:50 +02:00
Kirill Rybalchenko
40d1324423 net/i40e: get ddp profile protocol info
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-06 02:49:50 +02:00
Wenzhuo Lu
8f5dbd4ed9 net/i40e: new API to add VF MAC address from PF
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-06 02:49:47 +02:00
Andrey Chilikin
b319712f53 net/i40e: extended list of operations for DDP processing
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-06 15:00:57 +02:00
Jingjing Wu
a58860f689 net/i40e/base: use new virtchnl header file
Modify the necessary files to be compatible with the new virtchnl.h file
instead of relying on i40e_virtchnl.h variant. This mostly changes
references to VIRTCHNL_ variables by removing prefix of I40E_.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:56 +02:00
Andrey Chilikin
edeab742ed net/i40e: get information about DDP profile
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-07-06 15:00:56 +02:00
Qi Zhang
62e94f7f66 net/i40e: configure packet type mapping
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-19 15:37:37 +02:00
Wenzhuo Lu
0011c82628 net/i40e: add more explanation for QoS APIs
According to HW implementation, the bandwidth of QoS
means the L2 bandwidth, not count the bytes added by
physical layer.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Beilei Xing
6765eda2fc net/i40e: support getting all loaded DDP profiles
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Beilei Xing
5b276d570e net/i40e: add dynamic device personalization processing
Add support for loading a dynamic device personalization profile (DDP).

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Wenzhuo Lu
04c8542f96 net/i40e: set TC strict priority mode
Set some TCs to strict priority mode.
It's a global setting on a physical port.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
2b5518b705 net/i40e: set VF TC max bandwidth from PF
Set a specific TC's max bandwidth on a VF.
User can call the API to set VF TC's max bandwidth
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
1e58b1426a net/i40e: allocate VF TC bandwidth from PF
Allocate all TCs' relative bandwidth (percentage) on
a specific VF.
It can be taken as relative min bandwidth setting.
User can call the API to set VF TC's min bandwidth
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
fa69d1e4f4 net/i40e: set VF max bandwidth from PF
Support setting VF max bandwidth from PF.
User can call the API on PF to set a specific VF's
max bandwidth.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Ferruh Yigit
4c42588cd7 net/i40e: fix API comments for doxygen
Fixes: a541407fe4 ("net/i40e: set VF MAC anti-spoofing from PF")
Fixes: 4cbc41efcb ("net/i40e: set VF VLAN anti-spoofing from PF")
Fixes: c0ec14757c ("net/i40e: set VF unicast promiscuous mode from PF")
Fixes: ae57070ca8 ("net/i40e: set VF multicast promiscuous mode from PF")
Fixes: 83bb95e3fe ("net/i40e: set VF VLAN insertion from PF")
Fixes: 61fff9b4c6 ("net/i40e: set VF broadcast mode from PF")
Fixes: c33abbc144 ("net/i40e: set VF VLAN tag from PF")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 22:18:26 +01:00
Qi Zhang
e61e47c2c3 net/i40e: set/clear VF stats from PF
This patch add support to get/clear VF statistics
from PF side.
Two APIs are added:
rte_pmd_i40e_get_vf_stats.
rte_pmd_i40e_reset_vf_stats.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:46:25 +01:00
Bernard Iremonger
5f2b0e3f76 net/i40e: set VF VLAN filter from PF
add rte_pmd_i40e_set_vf_vlan_filter API.
User can call the API on PF to enable/disable
a set of VF's VLAN filters.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:44 +01:00
Bernard Iremonger
c33abbc144 net/i40e: set VF VLAN tag from PF
Add rte_pmd_i40e_set_vf_vlan_tag API.
User can call the API on PF to enable/disable a specific
VF's VLAN tag.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:44 +01:00
Bernard Iremonger
61fff9b4c6 net/i40e: set VF broadcast mode from PF
Support enabling/disabling VF broadcast mode from PF.
User can call the API on PF to enable/disable a specific
VF's broadcast mode.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:44 +01:00
Bernard Iremonger
83bb95e3fe net/i40e: set VF VLAN insertion from PF
Support inserting VF VLAN id from PF.
User can call the API on PF to insert a VLAN id to a
specific VF.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:44 +01:00
Chen Jing D(Mark)
f9083121b5 net/i40e: set VF VLAN strip from PF
Add a function to configure vlan strip enable/disable for specific
SRIOV VF device.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:44 +01:00
Ferruh Yigit
43c89d5a4f net/i40e: set VF MAC from PF
Support setting VF MAC address from PF.
User can call the API on PF to set a specific
VF's MAC address.

PF should set MAC address before VF initialized,
if PF sets the MAC address after VF initialized,
new MAC address won't be effective until VF
reinitialized.

This will remove all existing MAC filters.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00
Wenzhuo Lu
ae57070ca8 net/i40e: set VF multicast promiscuous mode from PF
Support enabling/disabling VF multicast promiscuous mode from
PF.
User can call the API on PF to enable/disable a specific
VF's multicast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00
Wenzhuo Lu
c0ec14757c net/i40e: set VF unicast promiscuous mode from PF
Support enabling/disabling VF unicast promiscuous mode from
PF.
User can call the API on PF to enable/disable a specific
VF's unicast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00
Wenzhuo Lu
bce83974ba net/i40e: set Tx loopback from PF
Support enabling/disabling TX loopback from PF.
User can call the API on PF to enable/disable TX loopback
for all the PF and VFs.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00
Wenzhuo Lu
4cbc41efcb net/i40e: set VF VLAN anti-spoofing from PF
Support enabling/disabling VF VLAN anti-spoofing from
PF.
User can call the API on PF to enable/disable a specific
VF's VLAN anti-spoofing.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00
Wenzhuo Lu
a541407fe4 net/i40e: set VF MAC anti-spoofing from PF
Support enabling/disabling VF MAC anti-spoofing from
PF.
User can call the API on PF to enable/disable a specific
VF's MAC anti-spoofing.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00
Wenzhuo Lu
b81295c474 net/i40e: add user callback for VF to PF message
The callback asks the user application if it is allowed to
perform the mailbox messages.

If the return value from user is RTE_PMD_I40E_MB_EVENT_PROCEED
then continue. If ACK or NACK, do nothing and send
not_supported to VF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00
Wenzhuo Lu
17e906a1ea net/i40e: support link status notification
Add an API to expose the ability, that PF can notify VF
when link status changes, to APP.
So if PF APP doesn't want to enable interruption but check
link status by itself, PF APP can let VF know link status
changed.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:41:43 +01:00