uint32_t bnxt_get_speed_capabilities(struct bnxt *bp);
int bnxt_flow_ops_get_op(struct rte_eth_dev *dev,
const struct rte_flow_ops **ops);
+int bnxt_dev_start_op(struct rte_eth_dev *eth_dev);
+int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev);
+void bnxt_handle_vf_cfg_change(void *arg);
#endif
}
}
+void bnxt_handle_vf_cfg_change(void *arg)
+{
+ struct bnxt *bp = arg;
+ struct rte_eth_dev *eth_dev = bp->eth_dev;
+ int rc;
+
+ /* Free and recreate filters with default VLAN */
+ if (eth_dev->data->dev_started) {
+ rc = bnxt_dev_stop_op(eth_dev);
+ if (rc != 0) {
+ PMD_DRV_LOG(ERR, "Failed to stop Port:%u\n", eth_dev->data->port_id);
+ return;
+ }
+
+ rc = bnxt_dev_start_op(eth_dev);
+ if (rc != 0)
+ PMD_DRV_LOG(ERR, "Failed to start Port:%u\n", eth_dev->data->port_id);
+ }
+}
+
/*
* Async event handling
*/
PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
- PMD_DRV_LOG(INFO, "Async event: VF config changed\n");
+ PMD_DRV_LOG(INFO, "Port %u: VF config change async event\n", port_id);
+ PMD_DRV_LOG(INFO, "event: data1 %#x data2 %#x\n", data1, data2);
bnxt_hwrm_func_qcfg(bp, NULL);
+ if (BNXT_VF(bp))
+ rte_eal_alarm_set(1, bnxt_handle_vf_cfg_change, (void *)bp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED:
PMD_DRV_LOG(INFO, "Port conn async event\n");
}
/* Unload the driver, release resources */
-static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
return bnxt_dev_stop(eth_dev);
}
-static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp);
rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp);
bnxt_cancel_fc_thread(bp);
+ rte_eal_alarm_cancel(bnxt_handle_vf_cfg_change, (void *)bp);
if (eth_dev->data->dev_started)
ret = bnxt_dev_stop(eth_dev);