2 * Copyright (c) 2020 Red Hat, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include "ovs-thread.h"
21 #include "openvswitch/vlog.h"
23 #include "userspace-tso.h"
24 #include "vswitch-idl.h"
26 VLOG_DEFINE_THIS_MODULE(userspace_tso
);
28 static bool userspace_tso
= false;
31 userspace_tso_init(const struct smap
*ovs_other_config
)
33 if (smap_get_bool(ovs_other_config
, "userspace-tso-enable", false)) {
34 static struct ovsthread_once once
= OVSTHREAD_ONCE_INITIALIZER
;
36 if (ovsthread_once_start(&once
)) {
37 VLOG_INFO("Userspace TCP Segmentation Offloading support enabled");
39 ovsthread_once_done(&once
);
45 userspace_tso_enabled(void)