> static int
> cpfl_dev_vport_init(struct rte_eth_dev *dev, void *init_params)
> {
> @@ -1306,6 +1414,8 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, void
> *init_params)
> struct cpfl_adapter_ext *adapter = param->adapter;
> /* for sending create vport virtchnl msg prepare */
> struct virtchnl2_create_vport create_vport_info;
> + struct virtchnl2_add_queue_groups p2p_queue_grps_info;
> + uint8_t p2p_q_vc_out_info[IDPF_DFLT_MBX_BUF_SIZE] = {0};
> int ret = 0;
>
> dev->dev_ops = &cpfl_eth_dev_ops;
> @@ -1340,8 +1450,28 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, void
> *init_params)
> rte_ether_addr_copy((struct rte_ether_addr *)vport->default_mac_addr,
> &dev->data->mac_addrs[0]);
>
> + if (!adapter->base.is_rx_singleq && !adapter->base.is_tx_singleq) {
> + memset(&p2p_queue_grps_info, 0, sizeof(p2p_queue_grps_info));
> + ret = cpfl_p2p_q_grps_add(vport, &p2p_queue_grps_info,
> p2p_q_vc_out_info);
> + if (ret != 0) {
> + PMD_INIT_LOG(ERR, "Failed to add p2p queue group.");
> + goto err_q_grps_add;
> + }
> + ret = cpfl_p2p_queue_info_init(cpfl_vport,
> + (struct virtchnl2_add_queue_groups
> *)p2p_q_vc_out_info);
> + if (ret != 0) {
> + PMD_INIT_LOG(ERR, "Failed to init p2p queue info.");
> + goto err_p2p_qinfo_init;
If it is failed to add p2p queue group, the device init will quit?
I think it should be better to continue initialization just without p2p
capability.
> + }
> + }
> +
> return 0;
>
- [PATCH v2 07/10] net/cpfl: support hairpin queue start/stop beilei . xing
- [PATCH v2 08/10] net/cpfl: enable write back based on ITR ex... beilei . xing
- [PATCH v2 09/10] net/cpfl: support peer ports get beilei . xing
- [PATCH v2 10/10] net/cpfl: support hairpin bind/unbind beilei . xing
- [PATCH v3 00/10] net/cpfl: add hairpin queue support beilei . xing
- [PATCH v3 01/10] net/cpfl: refine structures beilei . xing
- [PATCH v3 02/10] net/cpfl: support hairpin queue capbil... beilei . xing
- [PATCH v3 03/10] common/idpf: support queue groups add/... beilei . xing
- [PATCH v3 04/10] net/cpfl: add haipin queue group durin... beilei . xing
- RE: [PATCH v3 04/10] net/cpfl: add haipin queue gro... Wu, Jingjing
- [PATCH v3 05/10] net/cpfl: support hairpin queue setup ... beilei . xing
- RE: [PATCH v3 05/10] net/cpfl: support hairpin queu... Liu, Mingxia
- RE: [PATCH v3 05/10] net/cpfl: support hairpin ... Xing, Beilei
- RE: [PATCH v3 05/10] net/cpfl: support hairpin queu... Wu, Jingjing
- RE: [PATCH v3 05/10] net/cpfl: support hairpin ... Xing, Beilei
- [PATCH v3 06/10] net/cpfl: support hairpin queue config... beilei . xing
- [PATCH v3 07/10] net/cpfl: support hairpin queue start/... beilei . xing
- [PATCH v3 08/10] net/cpfl: enable write back based on I... beilei . xing

