2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev-dpdk: Remove Rx checksum reconfigure.

Rx checksum offload is enabled by default on DPDK physical NICs
where available, with reconfiguration through
options:rx-checksum-offload. However, changing rx-checksum-offload
did not result in a reconfiguration of the NIC and wrong status is
reported for it.

As there seems to be diminishing reasons why a user would want
to disable Rx checksum offload, just remove the broken reconfiguration
option.

Fixes: 1a2bb11817 ("netdev-dpdk: Enable Rx checksum offloading feature on DPDK physical ports.")
Reported-by: Kevin Traynor <ktraynor@redhat.com>
Suggested-by: Sugesh Chandran <sugesh.chandran@intel.com>
Acked-by: Darrell Ball <dlu998@gmail.com>
Tested-by: Sugesh Chandran <sugesh.chandran@intel.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Kevin Traynor
2017-06-26 22:51:50 +01:00
committed by Ben Pfaff
parent 371a74df10
commit d4f5282cf1
3 changed files with 13 additions and 65 deletions

View File

@@ -718,29 +718,6 @@ dpdk_eth_dev_queue_setup(struct netdev_dpdk *dev, int n_rxq, int n_txq)
return diag;
}
static void
dpdk_eth_checksum_offload_configure(struct netdev_dpdk *dev)
OVS_REQUIRES(dev->mutex)
{
struct rte_eth_dev_info info;
bool rx_csum_ol_flag = false;
uint32_t rx_chksm_offload_capa = DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM |
DEV_RX_OFFLOAD_IPV4_CKSUM;
rte_eth_dev_info_get(dev->port_id, &info);
rx_csum_ol_flag = (dev->hw_ol_features & NETDEV_RX_CHECKSUM_OFFLOAD) != 0;
if (rx_csum_ol_flag &&
(info.rx_offload_capa & rx_chksm_offload_capa) !=
rx_chksm_offload_capa) {
VLOG_WARN_ONCE("Rx checksum offload is not supported on device %"PRIu8,
dev->port_id);
dev->hw_ol_features &= ~NETDEV_RX_CHECKSUM_OFFLOAD;
return;
}
netdev_request_reconfigure(&dev->up);
}
static void
dpdk_eth_flow_ctrl_setup(struct netdev_dpdk *dev) OVS_REQUIRES(dev->mutex)
{
@@ -759,9 +736,21 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev)
struct ether_addr eth_addr;
int diag;
int n_rxq, n_txq;
uint32_t rx_chksm_offload_capa = DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM |
DEV_RX_OFFLOAD_IPV4_CKSUM;
rte_eth_dev_info_get(dev->port_id, &info);
if ((info.rx_offload_capa & rx_chksm_offload_capa) !=
rx_chksm_offload_capa) {
VLOG_WARN_ONCE("Rx checksum offload is not supported on device %"PRIu8,
dev->port_id);
dev->hw_ol_features &= ~NETDEV_RX_CHECKSUM_OFFLOAD;
} else {
dev->hw_ol_features |= NETDEV_RX_CHECKSUM_OFFLOAD;
}
n_rxq = MIN(info.max_rx_queues, dev->up.n_rxq);
n_txq = MIN(info.max_tx_queues, dev->up.n_txq);
@@ -1209,8 +1198,6 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args,
{RTE_FC_NONE, RTE_FC_TX_PAUSE},
{RTE_FC_RX_PAUSE, RTE_FC_FULL }
};
bool rx_chksm_ofld;
bool temp_flag;
const char *new_devargs;
int err = 0;
@@ -1292,16 +1279,6 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args,
dpdk_eth_flow_ctrl_setup(dev);
}
/* Rx checksum offload configuration */
/* By default the Rx checksum offload is ON */
rx_chksm_ofld = smap_get_bool(args, "rx-checksum-offload", true);
temp_flag = (dev->hw_ol_features & NETDEV_RX_CHECKSUM_OFFLOAD)
!= 0;
if (temp_flag != rx_chksm_ofld) {
dev->hw_ol_features ^= NETDEV_RX_CHECKSUM_OFFLOAD;
dpdk_eth_checksum_offload_configure(dev);
}
out:
ovs_mutex_unlock(&dev->mutex);
ovs_mutex_unlock(&dpdk_mutex);