On Fri, 1 Jul 2022 02:02:32 -0700 lon...@linuxonhyperv.com wrote: > + > + if (txmode->offloads & ~BNIC_DEV_TX_OFFLOAD_SUPPORT) { > + DRV_LOG(ERR, "Unsupported TX offload: %lx", txmode->offloads); > + return -EINVAL; > + } > + > + if (rxmode->offloads & ~BNIC_DEV_RX_OFFLOAD_SUPPORT) { > + DRV_LOG(ERR, "Unsupported RX offload: %lx", rxmode->offloads); > + return -EINVAL; > + } > +
If the device reports the correct capabilities in dev_info.tx_offload_capa and dev_info.rx_offload_capa then these checks are unnecessary since the flags are already checked in ethdev_configure.