net/nfp: configure capabilities by default

These capabilities are enabled in current NFP firmwares by
default, but it could be they are not with NFP firmwares to come.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
This commit is contained in:
Alejandro Lucero 2017-09-13 12:28:16 +01:00 committed by Ferruh Yigit
parent c05dc84fa2
commit 517e9c26ff

View File

@ -515,6 +515,18 @@ nfp_net_configure(struct rte_eth_dev *dev)
if (hw->cap & NFP_NET_CFG_CTRL_L2MC)
new_ctrl |= NFP_NET_CFG_CTRL_L2MC;
/* TX checksum offload */
if (hw->cap & NFP_NET_CFG_CTRL_TXCSUM)
new_ctrl |= NFP_NET_CFG_CTRL_TXCSUM;
/* LSO offload */
if (hw->cap & NFP_NET_CFG_CTRL_LSO)
new_ctrl |= NFP_NET_CFG_CTRL_LSO;
/* RX gather */
if (hw->cap & NFP_NET_CFG_CTRL_GATHER)
new_ctrl |= NFP_NET_CFG_CTRL_GATHER;
if (!new_ctrl)
return 0;