git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice: set min and max MTU
[dpdk.git]
/
drivers
/
net
/
enetc
/
enetc_ethdev.c
diff --git
a/drivers/net/enetc/enetc_ethdev.c
b/drivers/net/enetc/enetc_ethdev.c
index
ffae8ae
..
362e074
100644
(file)
--- a/
drivers/net/enetc/enetc_ethdev.c
+++ b/
drivers/net/enetc/enetc_ethdev.c
@@
-163,7
+163,10
@@
enetc_dev_infos_get(struct rte_eth_dev *dev __rte_unused,
dev_info->max_tx_queues = MAX_TX_RINGS;
dev_info->max_rx_pktlen = ENETC_MAC_MAXFRM_SIZE;
dev_info->rx_offload_capa =
dev_info->max_tx_queues = MAX_TX_RINGS;
dev_info->max_rx_pktlen = ENETC_MAC_MAXFRM_SIZE;
dev_info->rx_offload_capa =
- (DEV_RX_OFFLOAD_KEEP_CRC |
+ (DEV_RX_OFFLOAD_IPV4_CKSUM |
+ DEV_RX_OFFLOAD_UDP_CKSUM |
+ DEV_RX_OFFLOAD_TCP_CKSUM |
+ DEV_RX_OFFLOAD_KEEP_CRC |
DEV_RX_OFFLOAD_JUMBO_FRAME);
}
DEV_RX_OFFLOAD_JUMBO_FRAME);
}
@@
-636,6
+639,7
@@
enetc_dev_configure(struct rte_eth_dev *dev)
struct enetc_hw *enetc_hw = &hw->hw;
struct rte_eth_conf *eth_conf = &dev->data->dev_conf;
uint64_t rx_offloads = eth_conf->rxmode.offloads;
struct enetc_hw *enetc_hw = &hw->hw;
struct rte_eth_conf *eth_conf = &dev->data->dev_conf;
uint64_t rx_offloads = eth_conf->rxmode.offloads;
+ uint32_t checksum = L3_CKSUM | L4_CKSUM;
PMD_INIT_FUNC_TRACE();
PMD_INIT_FUNC_TRACE();
@@
-661,6
+665,15
@@
enetc_dev_configure(struct rte_eth_dev *dev)
enetc_port_wr(enetc_hw, ENETC_PM0_CMD_CFG, config);
}
enetc_port_wr(enetc_hw, ENETC_PM0_CMD_CFG, config);
}
+ if (rx_offloads & DEV_RX_OFFLOAD_IPV4_CKSUM)
+ checksum &= ~L3_CKSUM;
+
+ if (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM))
+ checksum &= ~L4_CKSUM;
+
+ enetc_port_wr(enetc_hw, ENETC_PAR_PORT_CFG, checksum);
+
+
return 0;
}
return 0;
}