From 517e9c26ff5efa68ded5677cbab28e797c62bb47 Mon Sep 17 00:00:00 2001 From: Alejandro Lucero Date: Wed, 13 Sep 2017 12:28:16 +0100 Subject: [PATCH] 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 --- drivers/net/nfp/nfp_net.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; -- 2.20.1