From: Alejandro Lucero Date: Wed, 13 Sep 2017 11:28:16 +0000 (+0100) Subject: net/nfp: configure capabilities by default X-Git-Tag: spdx-start~1952 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=517e9c26ff5efa68ded5677cbab28e797c62bb47;p=dpdk.git 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 --- diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index b0142090d5..000d3394c2 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -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;