コード例 #1
0
ファイル: dpdk_io.c プロジェクト: JackieXie168/lagopus
static void
app_lcore_io_tx_cleanup(struct app_lcore_params_io *lp) {
  unsigned i;

  for (i = 0; i < lp->tx.n_nic_ports; i ++) {
    uint8_t portid = lp->tx.nic_ports[i];

    /* Flush TX and RX queues. */
    lagopus_msg_info("Cleanup physical port %u\n", portid);
    rte_eth_dev_stop(portid);
    rte_eth_dev_close(portid);
  }
}
コード例 #2
0
ファイル: rw_piot_api.c プロジェクト: RIFTIO/RIFT.ware
int
rw_piot_close(rw_piot_api_handle_t api_handle) 
{
  rw_piot_device_t *rw_piot_dev = RWPIOT_GET_DEVICE(api_handle);
  ASSERT(RWPIOT_VALID_DEVICE(rw_piot_dev));
  if (NULL == rw_piot_dev) {
    printf("Could not fine device by handle\n");
    return -1;
  }

  /*
   * Close the device
   */
  rte_eth_dev_close(rw_piot_dev->rte_port_id);

  rw_piot_device_free(rw_piot_dev);
  return 0;
}