X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=datapath%2Fdatapath.c;h=6365f9474564dbac9c7be08d6c697a416bda155b;hb=7c88a5dc3ac1a034552bb94d42394bd325c1204e;hp=76569f504072d039dd0f36cc7871e61c5490930b;hpb=635c9298b91d0942aca39ba1f0d7ea5805ab618e;p=openvswitch diff --git a/datapath/datapath.c b/datapath/datapath.c index 76569f50..6365f947 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "openvswitch/datapath-protocol.h" @@ -358,6 +359,7 @@ static int new_nbp(struct datapath *dp, struct net_device *dev, int port_no) * in dp_frame_hook(). In turn dp_frame_hook() can reject them * back to network stack, but that's a waste of time. */ } + dev_disable_lro(dev); rcu_assign_pointer(dp->ports[port_no], p); list_add_rcu(&p->node, &dp->port_list); dp->n_ports++; @@ -505,6 +507,11 @@ out: static void do_port_input(struct net_bridge_port *p, struct sk_buff *skb) { + /* LRO isn't suitable for bridging. We turn it off but make sure + * that it wasn't reactivated. */ + if (skb_warn_if_lro(skb)) + return; + /* Make our own copy of the packet. Otherwise we will mangle the * packet for anyone who came before us (e.g. tcpdump via AF_PACKET). * (No one comes after us, since we tell handle_bridge() that we took @@ -924,6 +931,11 @@ static int validate_actions(const struct sw_flow_actions *actions) return -EINVAL; break; + case ODPAT_SET_NW_TOS: + if (a->nw_tos.nw_tos & INET_ECN_MASK) + return -EINVAL; + break; + default: if (a->type >= ODPAT_N_ACTIONS) return -EOPNOTSUPP;