Skip to content

Commit

Permalink
add ixgbe support
Browse files Browse the repository at this point in the history
  • Loading branch information
wei committed Jul 22, 2024
1 parent 6de12f0 commit d0693b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/src/dev/mt_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ static const struct mt_dev_driver_info dev_drvs[] = {
.drv_type = MT_DRV_DEFAULT,
.flow_type = MT_FLOW_ALL, /* or MT_FLOW_NONE? */
},
{
.name = "net_ixgbe", /* For ixgbe */
.port_type = MT_PORT_PF,
.drv_type = MT_DRV_IXGBE,
.flow_type = MT_FLOW_NONE,
},
{
.name = "net_ice",
.port_type = MT_PORT_PF,
Expand Down Expand Up @@ -1268,7 +1274,7 @@ static int dev_if_init_rx_queues(struct mtl_main_impl* impl, struct mt_interface
mbuf_pool = mt_mempool_create_common(impl, inf->port, pool_name, mbuf_elements);
else {
uint16_t data_room_sz = ST_PKT_MAX_ETHER_BYTES;
if (inf->drv_info.drv_type == MT_DRV_IGC) /* to avoid igc nic split mbuf */
if (inf->drv_info.drv_type == MT_DRV_IGC || inf->drv_info.drv_type == MT_DRV_IXGBE)/* to avoid igc/igxbe nic split mbuf */
data_room_sz = MT_MBUF_DEFAULT_DATA_SIZE;
if (impl->rx_pool_data_size) /* user suggested data room size */
data_room_sz = impl->rx_pool_data_size;
Expand Down
1 change: 1 addition & 0 deletions lib/src/mt_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ enum mt_rl_type {
enum mt_driver_type {
MT_DRV_DEFAULT = 0,
MT_DRV_ICE, /* ice pf, net_ice */
MT_DRV_IXGBE, /* ixgbe pf, net_ixgbe */
MT_DRV_I40E, /* flv pf, net_i40e */
MT_DRV_IAVF, /* IA vf, net_iavf */
/* dpdk af xdp, net_af_xdp */
Expand Down

0 comments on commit d0693b8

Please sign in to comment.