Commit Graph

34251 Commits

Author SHA1 Message Date
Andy Pei
c20c5e9f88 vhost: get ready with first queue of block device
When boot from virtio blk device, seabios in QEMU only enables one queue.
To work in this scenario, vDPA BLK device back-end configure device
when the first queue is ready.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Huang Wei <wei.huang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-26 10:40:34 +02:00
Andy Pei
f92ab3f02c vhost: add type to vDPA device
Add type to rte_vdpa_device to store device type.
Call vdpa ops get_dev_type to fill type when register
vdpa device.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-26 10:40:34 +02:00
Andy Pei
0c3094b0ad vdpa/ifc: improve internal list logic
Insert internal list element to internal list before
register vdpa device, in order to call vdpa ops during
vdpa device registration.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-10-26 10:33:36 +02:00
Andy Pei
10d0458a9d vdpa/ifc: add function to get device
Add new internal API "find_internal_resource_by_rte_dev"
to get device.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-26 10:33:36 +02:00
Andy Pei
146247f446 vdpa/ifc: rename a function
Change internal function name "find_internal_resource_by_dev"
to "find_internal_resource_by_pci_dev".

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-26 10:33:36 +02:00
Huang Wei
a9a56423aa vdpa/ifc: support dynamic enable/disable queue
Support dynamic enable or disable queue.
For front end, like QEMU, user can use ethtool to configure queue.
For example, "ethtool -L eth0 combined 3" to enable 3 queues pairs.

Signed-off-by: Huang Wei <wei.huang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-10-26 10:33:36 +02:00
Andy Pei
83c7370aca vdpa/ifc: configure only enabled queue
When configuring the hardware queue, we only configure queues which
have been enabled by vhost.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Huang Wei <wei.huang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-10-26 10:33:36 +02:00
Andy Pei
eee3f67ef4 vdpa/ifc: write queue count to MQ register
Write queue count to IFCVF_MQ_OFFSET register
to enable multi-queue feature.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Huang Wei <wei.huang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-10-26 10:33:36 +02:00
Andy Pei
b97f361cbf vdpa/ifc: set max queues based on virtio spec
Set max_queues according to virtio spec.
For virtio BLK device, set max_queues to the value of num_queues
in struct virtio_blk_config.
For virtio NET device, read num_queues from struct ifcvf_pci_common_cfg,
get the queue pair number using num_queues and set max_queues to it.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Huang Wei <wei.huang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-10-26 10:33:36 +02:00
Andy Pei
b6b19e23e4 vdpa/ifc: support multi-queue
Enable VHOST_USER_PROTOCOL_F_MQ feature.
Expose IFCVF_MQ_OFFSET register to enable multi-queue.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Huang Wei <wei.huang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2022-10-26 10:33:36 +02:00
Huang Wei
5c806b9478 vdpa/ifc: add PCI ID for legacy network device
Add new device id to support IFCVF_NET_TRANSITIONAL_DEVICE_ID (0x1000).
Rename macro from "IFCVF_BLK_DEVICE_ID" to "IFCVF_SUBSYS_BLK_DEVICE_ID".

Signed-off-by: Huang Wei <wei.huang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-26 10:33:36 +02:00
Ferruh Yigit
578e37908d net/mana: disable driver by default
Driver is disabled by default because its dependencies are not
upstreamed yet, code is available for development and investigation.

When all dependencies are upstreamed, driver can be enabled back.

Fixes: 517ed6e2d5 ("net/mana: add basic driver with build environment")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Long Li <longli@microsoft.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2022-10-27 10:54:53 +02:00
Junfeng Guo
a46583cf43 net/gve: support Rx/Tx
Add Rx/Tx of GQI_QPL queue format and GQI_RDA queue format.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Junfeng Guo
4bec2d0b55 net/gve: support queue operations
Add support for queue operations:
- setup rx/tx queue
- release rx/tx queue
- start rx/tx queues
- stop rx/tx queues

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Junfeng Guo
71dea04cdf net/gve: support device info and configure
Add dev_ops dev_infos_get.
Complete dev_configure with RX offloads force enabling.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Junfeng Guo
f19c864e4d net/gve: support MTU setting
Support dev_ops mtu_set.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Junfeng Guo
440f551dd0 net/gve: support link update
Support dev_ops link_update.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Junfeng Guo
457967cd2b net/gve: support device initialization
Support device init and add following devops skeleton:
 - dev_configure
 - dev_start
 - dev_stop
 - dev_close

Note that build system (including doc) is also added in this patch.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Junfeng Guo
c9ba2caf63 net/gve/base: add OS-specific implementation
Add some MACRO definitions and memory operations which are specific
for DPDK.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Junfeng Guo
f86e5ed867 net/gve/base: introduce Google Virtual Ethernet base
The following base code is based on Google Virtual Ethernet (gve)
driver v1.3.0 under MIT license.
- gve_adminq.c
- gve_adminq.h
- gve_desc.h
- gve_desc_dqo.h
- gve_register.h
- gve.h

The original code is in:
https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux/\
tree/v1.3.0/google/gve

Note that these code are not Intel files and they come from the kernel
community. The base code there has the statement of
SPDX-License-Identifier: (GPL-2.0 OR MIT). Here we just follow the
required MIT license as an exception to DPDK.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-25 14:30:28 +02:00
Chaoyong He
9082336048 net/nfp: support new solution for tunnel decap action
The new version of flower firmware application add the support of
a new tunnel decap action solution.

It changes the structure of tunnel neighbor, and use a feature flag
to indicate which tunnel decap action solution is used.

Add the logic of read extra features from firmware, and store it in
the app private structure.

Adjust the data structure and related logic to make the PMD support
both version of tunnel decap action solutions.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
52a83356a6 net/nfp: support IPv6 NVGRE decap flow action
Add the offload support of decap action of IPv6 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
3f7aa85b6f net/nfp: support IPv4 NVGRE decap flow action
Add the offload support of decap action of IPv4 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
cb69acd0bb net/nfp: support IPv6 NVGRE flow item
Add the corresponding logics to support the offload of
IPv6 NVGRE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
162fc0de03 net/nfp: support IPv4 NVGRE flow item
Add the corresponding logics to support the offload of
IPv4 NVGRE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
5f5e836005 net/nfp: prepare for IPv6 GRE tunnel decap flow action
Add the related data structure and logics, prepare for
the decap action of IPv6 GRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
8891d6700c net/nfp: prepare for IPv4 GRE tunnel decap flow action
Add the related data structure and logics, prepare for
the decap action of IPv4 GRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
fff680eef7 net/nfp: support IPv6 NVGRE encap flow action
Add the offload support of encap action of IPv6 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
88cce05380 net/nfp: support IPv4 NVGRE encap flow action
Add the offload support of encap action of IPv4 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
590ec35723 net/nfp: support IPv6 GENEVE decap flow action
Add the offload support of decap action for IPv6 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
646a8653b5 net/nfp: support IPv4 GENEVE decap flow action
Add the offload support of decap action for IPv4 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
dc1171dd03 net/nfp: support IPv6 GENEVE flow item
Add the corresponding logics to support the offload of
IPv6 GENEVE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
d59b2b0b9d net/nfp: support IPv4 GENEVE flow item
Add the corresponding logics to support the offload of
IPv4 GENEVE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
98fa36eccc net/nfp: support IPv6 GENEVE encap flow action
Add the offload support of encap action for IPv6 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
a2a1153b6f net/nfp: support IPv4 GENEVE encap flow action
Add the offload support of encap action for IPv4 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
e0843562c5 net/nfp: support IPv6 VXLAN decap flow action
Add the offload support of decap action for IPv6 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
60bc1764a9 net/nfp: support IPv4 VXLAN decap flow action
Add the offload support of decap action for IPv4 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
8ee18bad76 net/nfp: prepare for IPv6 UDP tunnel decap flow action
Add the related data structure and functions, prepare for
the decap action of IPv6 UDP tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
d3c33bdf1f net/nfp: prepare for IPv4 UDP tunnel decap flow action
Add the related data structure and functions, prepare for
the decap action of IPv4 UDP tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
c3b7254093 net/nfp: support IPv6 VXLAN encap flow action
Add the offload support of encap action for IPv6 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
724662b4ce net/nfp: support IPv4 VXLAN encap flow action
Add the offload support of encap action for IPv4 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
36fb222db9 net/nfp: prepare for IPv6 tunnel encap flow action
Add the related data structure and functions, prepare for
the encap action of IPv6 tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
f382761cd2 net/nfp: prepare for IPv4 tunnel encap flow action
Add the related data structure and functions, prepare for
the encap action of IPv4 tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
ea6f2fa073 net/nfp: support IPv6 VXLAN flow item
Add the corresponding data structure and logics, to support
the offload of IPv6 VXLAN item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
d617b75a71 net/nfp: support IPv4 VXLAN flow item
Add the corresponding data structure and logics, to support
the offload of IPv4 VXLAN item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
a5b876a5aa net/nfp: fix CPP bridge service exit
The CPP (Command Pull Push) bridge service is needed for some debug
tools, but if no debug tools has ever been run, the initial logic of
CPP bridge service will block in accept() function call, and the
DPDK app can't exit normally.

Fixes: bab0e6f48b ("net/nfp: fix infinite loop")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
39d82d2098 net/nfp: fix promiscuous mode for representor port
The original functions of promiscuous mode can't process the
representor port rightly, revise the logic to do that.

Fixes: e1124c4f8a ("net/nfp: add flower representor framework")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
2022-10-24 14:30:43 +02:00
Chaoyong He
3202b003be net/nfp: support IPv6 DSCP flow action
Add the corresponding logics to support the offload of
set IPv6 DSCP action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
9c665d70f7 net/nfp: support IPv4 DSCP flow action
Add the corresponding logics to support the offload of
set IPv4 DSCP action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
ac12e126c4 net/nfp: support TTL flow action
Add the corresponding data structure and logics, to support
the offload of set TTL action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00