| 466 | } |
| 467 | |
| 468 | static int |
| 469 | ionic_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 | |
| 503 | static int |
| 504 | ionic_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask) |
nothing calls this directly
no test coverage detected