MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ionic_flow_ctrl_set

Function ionic_flow_ctrl_set

dpdk/drivers/net/ionic/ionic_ethdev.c:468–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468static int
469ionic_flow_ctrl_set(struct rte_eth_dev *eth_dev,
470 struct rte_eth_fc_conf *fc_conf)
471{
472 struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
473 struct ionic_adapter *adapter = lif->adapter;
474 struct ionic_dev *idev = &adapter->idev;
475 uint8_t pause_type = IONIC_PORT_PAUSE_TYPE_NONE;
476 int err;
477
478 if (fc_conf->autoneg) {
479 IONIC_PRINT(WARNING, "Flow control autoneg not supported");
480 return -ENOTSUP;
481 }
482
483 switch (fc_conf->mode) {
484 case RTE_ETH_FC_NONE:
485 pause_type = IONIC_PORT_PAUSE_TYPE_NONE;
486 break;
487 case RTE_ETH_FC_FULL:
488 pause_type = IONIC_PORT_PAUSE_TYPE_LINK;
489 break;
490 case RTE_ETH_FC_RX_PAUSE:
491 case RTE_ETH_FC_TX_PAUSE:
492 return -ENOTSUP;
493 }
494
495 ionic_dev_cmd_port_pause(idev, pause_type);
496 err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
497 if (err)
498 IONIC_PRINT(WARNING, "Failed to configure flow control");
499
500 return err;
501}
502
503static int
504ionic_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)

Callers

nothing calls this directly

Calls 2

ionic_dev_cmd_port_pauseFunction · 0.85
ionic_dev_cmd_wait_checkFunction · 0.85

Tested by

no test coverage detected