Skip to content

Commit

Permalink
net/dpaa: support jumbo frames
Browse files Browse the repository at this point in the history
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
  • Loading branch information
Shreyansh Jain authored and Ferruh Yigit committed Oct 6, 2017
1 parent 0cbec02 commit 25f8541
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/guides/nics/features/dpaa.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
; Refer to default.ini for the full list of available PMD features.
;
[Features]
Jumbo frame = Y
MTU update = Y
ARMv8 = Y
Usage doc = Y
13 changes: 11 additions & 2 deletions drivers/net/dpaa/dpaa_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
if (mtu < ETHER_MIN_MTU)
return -EINVAL;
if (mtu > ETHER_MAX_LEN)
return -1;
dev->data->dev_conf.rxmode.jumbo_frame = 1;
else
dev->data->dev_conf.rxmode.jumbo_frame = 0;

dev->data->dev_conf.rxmode.jumbo_frame = 0;
dev->data->dev_conf.rxmode.max_rx_pkt_len = mtu;

fman_if_set_maxfrm(dpaa_intf->fif, mtu);
Expand All @@ -100,6 +101,14 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev __rte_unused)
{
PMD_INIT_FUNC_TRACE();

if (dev->data->dev_conf.rxmode.jumbo_frame == 1) {
if (dev->data->dev_conf.rxmode.max_rx_pkt_len <=
DPAA_MAX_RX_PKT_LEN)
return dpaa_mtu_set(dev,
dev->data->dev_conf.rxmode.max_rx_pkt_len);
else
return -1;
}
return 0;
}

Expand Down

0 comments on commit 25f8541

Please sign in to comment.