mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
datapath: Disable LRO from userspace instead of the kernel.
Whenever a port is added to the datapath, LRO is automatically disabled. In the future, we may want to enable LRO in some circumstances, so have userspace disable LRO through the ethtool ioctls. As part of this change, the MTU and LRO checks are moved to netdev-vport's send(), which is where they're actually needed. Feature #6810 Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@@ -60,6 +60,10 @@ enum { LRU_MAX_PORTS = 1024 };
|
||||
enum { LRU_MASK = LRU_MAX_PORTS - 1};
|
||||
BUILD_ASSERT_DECL(IS_POW2(LRU_MAX_PORTS));
|
||||
|
||||
/* This ethtool flag was introduced in Linux 2.6.24, so it might be
|
||||
* missing if we have old headers. */
|
||||
#define ETH_FLAG_LRO (1 << 15) /* LRO is enabled */
|
||||
|
||||
struct dpif_linux_dp {
|
||||
/* Generic Netlink header. */
|
||||
uint8_t cmd;
|
||||
@@ -393,6 +397,10 @@ dpif_linux_port_add(struct dpif *dpif_, struct netdev *netdev,
|
||||
request.options_len = options->size;
|
||||
}
|
||||
|
||||
if (request.type == OVS_VPORT_TYPE_NETDEV) {
|
||||
netdev_linux_ethtool_set_flag(netdev, ETH_FLAG_LRO, "LRO", false);
|
||||
}
|
||||
|
||||
/* Loop until we find a port that isn't used. */
|
||||
do {
|
||||
request.port_no = dpif_linux_pop_port(dpif);
|
||||
|
Reference in New Issue
Block a user