]>
git.proxmox.com Git - ovs.git/blob - lib/netdev-tc-offloads.c
2 * Copyright (c) 2016 Mellanox Technologies, Ltd.
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.
18 #include "netdev-tc-offloads.h"
20 #include <linux/if_ether.h>
21 #include "openvswitch/hmap.h"
22 #include "openvswitch/match.h"
23 #include "openvswitch/ofpbuf.h"
24 #include "openvswitch/thread.h"
25 #include "openvswitch/types.h"
26 #include "openvswitch/vlog.h"
27 #include "netdev-provider.h"
29 #include "netlink-socket.h"
30 #include "odp-netlink.h"
31 #include "unaligned.h"
37 VLOG_DEFINE_THIS_MODULE(netdev_tc_offloads
);
40 netdev_tc_flow_flush(struct netdev
*netdev OVS_UNUSED
)
46 netdev_tc_flow_dump_create(struct netdev
*netdev
,
47 struct netdev_flow_dump
**dump_out
)
49 struct netdev_flow_dump
*dump
= xzalloc(sizeof *dump
);
51 dump
->netdev
= netdev_ref(netdev
);
59 netdev_tc_flow_dump_destroy(struct netdev_flow_dump
*dump
)
61 netdev_close(dump
->netdev
);
68 netdev_tc_flow_dump_next(struct netdev_flow_dump
*dump OVS_UNUSED
,
69 struct match
*match OVS_UNUSED
,
70 struct nlattr
**actions OVS_UNUSED
,
71 struct dpif_flow_stats
*stats OVS_UNUSED
,
72 ovs_u128
*ufid OVS_UNUSED
,
73 struct ofpbuf
*rbuffer OVS_UNUSED
,
74 struct ofpbuf
*wbuffer OVS_UNUSED
)
80 netdev_tc_flow_put(struct netdev
*netdev OVS_UNUSED
,
81 struct match
*match OVS_UNUSED
,
82 struct nlattr
*actions OVS_UNUSED
,
83 size_t actions_len OVS_UNUSED
,
84 const ovs_u128
*ufid OVS_UNUSED
,
85 struct offload_info
*info OVS_UNUSED
,
86 struct dpif_flow_stats
*stats OVS_UNUSED
)
92 netdev_tc_flow_get(struct netdev
*netdev OVS_UNUSED
,
93 struct match
*match OVS_UNUSED
,
94 struct nlattr
**actions OVS_UNUSED
,
95 const ovs_u128
*ufid OVS_UNUSED
,
96 struct dpif_flow_stats
*stats OVS_UNUSED
,
97 struct ofpbuf
*buf OVS_UNUSED
)
103 netdev_tc_flow_del(struct netdev
*netdev OVS_UNUSED
,
104 const ovs_u128
*ufid OVS_UNUSED
,
105 struct dpif_flow_stats
*stats OVS_UNUSED
)
111 netdev_tc_init_flow_api(struct netdev
*netdev OVS_UNUSED
)