Commit Graph

26 Commits

Author SHA1 Message Date
Beilei Xing
8c6ef17e1f net/idpf: fix checks in multi-queue config and stop
There's core dump when launching l3fwd with 1 queue 1 core. It's
because NULL pointer is used if fail to configure device.
This patch removes incorrect check during device configuration,
and checks NULL pointer when executing VIRTCHNL2_OP_DEALLOC_VECTORS.

Fixes: 549343c25d ("net/idpf: support device initialization")
Fixes: 70675bcc3a ("net/idpf: support RSS")
Fixes: 37291a68fd ("net/idpf: support write back based on ITR expire")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-18 19:05:53 +01:00
Beilei Xing
10114eff6d net/idpf: add supported packet types
Failed to launch l3fwd, the log shows:
port 0 cannot parse packet type, please add --parse-ptype
This patch adds dev_supported_ptypes_get ops.

Fixes: 549343c25d ("net/idpf: support device initialization")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
2022-11-18 18:58:10 +01:00
Beilei Xing
477512896b net/idpf: fix port start
Port can't start successfully if stopping port and starting port
again.
This patch fixes port start by initialization.

Fixes: e9ff6df15b ("net/idpf: stop before closing device")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-17 13:27:27 +01:00
Beilei Xing
e9ff6df15b net/idpf: stop before closing device
This patch stops device at the beginning of idpf_dev_close.

Fixes: 14aa6ed8f2 ("net/idpf: support device start and stop")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-15 15:05:24 +01:00
Stephen Hemminger
742d8aaa81 drivers/net: remove unnecessary null checks
The function rte_free() already handles NULL argument;
therefore the checks in this code are unnecessary.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-11-15 15:04:22 +01:00
Beilei Xing
d9e46239ee net/idpf: fix memory leak in Tx queue release
This patch fixes memory leak during Tx split queue release.

Fixes: 19b58dba9d ("net/idpf: support queue release")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2022-11-09 16:34:43 +01:00
Beilei Xing
ef47d95e90 net/idpf: fix TSO
This patch fixes TSO by adding Tx checksum offload.

Fixes: ed5b21acc6 ("net/idpf: support Tx offloading")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2022-11-09 16:33:27 +01:00
Beilei Xing
646c16a26e net/idpf: fix build on CentOS 7
There's build error with clang 3.4.2 in CentOS 7:

drivers/net/idpf/idpf_vchnl.c:141:13: error: comparison of constant
522 with expression of type 'enum virtchnl_ops' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]

Fixes: 549343c25d ("net/idpf: support device initialization")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
2022-11-09 11:10:59 +01:00
Abdullah Ömer Yamaç
7dde9c844a drivers: omit symbol map when unneeded
In this patch, we removed the necessity of the version files and
you don't need to update these files for each release, you can just
remove them.

Suggested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-11-14 15:22:46 +01:00
Junfeng Guo
268d82e5f3 net/idpf: support timestamp offload
Add support for timestamp offload.

Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:10 +01:00
Junfeng Guo
5bf87b45b2 net/idpf: add AVX512 data path for single queue model
Add support of AVX512 vector data path for single queue model.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:10 +01:00
Junfeng Guo
ed5b21acc6 net/idpf: support Tx offloading
Add Tx offloading support:
 - support TSO for single queue model and split queue model.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:10 +01:00
Junfeng Guo
011bc4a55e net/idpf: support Rx offloading
Add Rx offloading support:
 - support CHKSUM and RSS offload for split queue model
 - support CHKSUM offload for single queue model

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:10 +01:00
Junfeng Guo
70675bcc3a net/idpf: support RSS
Add RSS support.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:10 +01:00
Junfeng Guo
37291a68fd net/idpf: support write back based on ITR expire
Enable write back on ITR expire, then packets can be received one by
one.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:10 +01:00
Junfeng Guo
99af8fe570 net/idpf: support parsing packet type
Parse packet type during receiving packets.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:10 +01:00
Junfeng Guo
770f4dfe0f net/idpf: support basic Tx data path
Add basic Tx support in split queue mode and single queue mode.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:34:01 +01:00
Junfeng Guo
027cdcafe8 net/idpf: support basic Rx data path
Add basic Rx support in split queue mode and single queue mode.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:33:56 +01:00
Junfeng Guo
f163a00f2a net/idpf: support MTU configuration
Add dev ops mtu_set.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:31:01 +01:00
Junfeng Guo
19b58dba9d net/idpf: support queue release
Add support for queue operations:
 - rx_queue_release
 - tx_queue_release

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:53 +01:00
Junfeng Guo
c03af6fa0e net/idpf: support queue stop
Add support for these device ops:
 - rx_queue_stop
 - tx_queue_stop

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:46 +01:00
Junfeng Guo
c2494d783d net/idpf: support queue start
Add support for these device ops:
 - rx_queue_start
 - tx_queue_start

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:40 +01:00
Junfeng Guo
14aa6ed8f2 net/idpf: support device start and stop
Add dev ops dev_start, dev_stop and link_update.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:31 +01:00
Junfeng Guo
9c47c29739 net/idpf: add Rx queue setup
Add support for rx_queue_setup ops.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:31 +01:00
Junfeng Guo
ffac2f187c net/idpf: add Tx queue setup
Add support for tx_queue_setup ops.

In the single queue model, the same descriptor queue is used by SW to
post buffer descriptors to HW and by HW to post completed descriptors
to SW.

In the split queue model, "RX buffer queues" are used to pass
descriptor buffers from SW to HW while Rx queues are used only to
pass the descriptor completions, that is, descriptors that point
to completed buffers, from HW to SW. This is contrary to the single
queue model in which Rx queues are used for both purposes.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:31 +01:00
Junfeng Guo
549343c25d net/idpf: support device initialization
Support device init and add the following dev ops:
 - dev_configure
 - dev_close
 - dev_infos_get

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:29:55 +01:00