On Fri, Jan 17, 2020 at 12:37:56PM -0800, William Tu wrote: > On Fri, Jan 17, 2020 at 04:58:57PM -0300, Flavio Leitner wrote: > > On Fri, Jan 17, 2020 at 06:58:56PM +0100, Ilya Maximets wrote: > > > On 16.01.2020 18:00, Flavio Leitner wrote: > [...] > > > > diff --git a/lib/userspace-tso.c b/lib/userspace-tso.c > > > > new file mode 100644 > > > > index 000000000..f843c2a76 > > > > --- /dev/null > > > > +++ b/lib/userspace-tso.c > > > > @@ -0,0 +1,48 @@ > > > > +/* > > > > + * Copyright (c) 2020 Red Hat, Inc. > > > > + * > > > > + * Licensed under the Apache License, Version 2.0 (the "License"); > > > > + * you may not use this file except in compliance with the License. > > > > + * You may obtain a copy of the License at: > > > > + * > > > > + * http://www.apache.org/licenses/LICENSE-2.0 > > > > + * > > > > + * Unless required by applicable law or agreed to in writing, software > > > > + * distributed under the License is distributed on an "AS IS" BASIS, > > > > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > > > > implied. > > > > + * See the License for the specific language governing permissions and > > > > + * limitations under the License. > > > > + */ > > > > + > > > > +#include <config.h> > > > > + > > > > +#include "smap.h" > > > > +#include "ovs-thread.h" > > > > +#include "openvswitch/vlog.h" > > > > +#include "dpdk.h" > > > > +#include "userspace-tso.h" > > > > +#include "vswitch-idl.h" > > > > + > > > > +VLOG_DEFINE_THIS_MODULE(userspace_tso); > > > > + > > > > +static bool userspace_tso = false; > > > > + > > > > +void > > > > +userspace_tso_init(const struct smap *ovs_other_config) > > > > +{ > > > > + if (smap_get_bool(ovs_other_config, "userspace-tso-enable", > > > > false)) { > > > > + static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER; > > > > + > > > > + if (ovsthread_once_start(&once)) { > > > > + VLOG_INFO("Userspace TCP Segmentation Offloading support > > > > enabled"); > > > > + userspace_tso = true; > > > > > > Since dp_packet functions has no implementation if OVS built without > > > DPDK support, I think, we need to restrict enabling the functionality. > > > > I will add the restriction back. > > > Hi Flavio, > > I took a look at the netdev-linux.c and related parts. > I think this patchset also work for non-DPDK case if we > implement the dp_packet_hwol_*?
That's correct. > For af_packet, the change to netdev_linux_batch_rxq_recv_sock and > netdev_linux_sock_batch_send using vnet header makes rx/tx GSO packet > from/to kernel possible, and similar case for tap interface. > > Or am I missing something? No, I think you're correct. However, I am adding the restriction back because at this moment I am focusing on DPDK and I haven't tested yet OvS without DPDK and TSO enabled. Once we know it's okay, we can remove that restriction. -- fbl _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
