ENICPMD_FUNC_TRACE();
if (mask & ETH_VLAN_STRIP_MASK) {
- if (eth_dev->data->dev_conf.rxmode.hw_vlan_strip)
+ if (eth_dev->data->dev_conf.rxmode.offloads &
+ DEV_RX_OFFLOAD_VLAN_STRIP)
enic->ig_vlan_strip_en = 1;
else
enic->ig_vlan_strip_en = 0;
}
if (eth_dev->data->dev_conf.rxmode.split_hdr_size &&
- eth_dev->data->dev_conf.rxmode.header_split) {
+ (eth_dev->data->dev_conf.rxmode.offloads &
+ DEV_RX_OFFLOAD_HEADER_SPLIT)) {
/* Enable header-data-split */
enic_set_hdr_split_size(enic,
eth_dev->data->dev_conf.rxmode.split_hdr_size);
}
- enic->hw_ip_checksum = eth_dev->data->dev_conf.rxmode.hw_ip_checksum;
+ enic->hw_ip_checksum = !!(eth_dev->data->dev_conf.rxmode.offloads &
+ DEV_RX_OFFLOAD_CHECKSUM);
ret = enicpmd_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK);
return ret;
mbuf_size = (uint16_t)(rte_pktmbuf_data_room_size(mp) -
RTE_PKTMBUF_HEADROOM);
- if (enic->rte_dev->data->dev_conf.rxmode.enable_scatter) {
+ if (enic->rte_dev->data->dev_conf.rxmode.offloads &
+ DEV_RX_OFFLOAD_SCATTER) {
dev_info(enic, "Rq %u Scatter rx mode enabled\n", queue_idx);
/* ceil((mtu + ETHER_HDR_LEN + 4)/mbuf_size) */
mbufs_per_pkt = ((mtu + ETHER_HDR_LEN + 4) +
/* The easy case is when scatter is disabled. However if the MTU
* becomes greater than the mbuf data size, packet drops will ensue.
*/
- if (!enic->rte_dev->data->dev_conf.rxmode.enable_scatter) {
+ if (!(enic->rte_dev->data->dev_conf.rxmode.offloads &
+ DEV_RX_OFFLOAD_SCATTER)) {
eth_dev->data->mtu = new_mtu;
goto set_mtu_done;
}