blob: 61d4ce2d1f582deafbf514fe908cad1b6003160e [file] [log] [blame]
Damjan Marionc5170202017-10-11 14:15:47 +02001/*
2 *------------------------------------------------------------------
Damjan Marion83243a02016-02-29 13:09:30 +01003 * af_packet.c - linux kernel packet interface
4 *
5 * Copyright (c) 2016 Cisco and/or its affiliates.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at:
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *------------------------------------------------------------------
18 */
19
20#include <linux/if_packet.h>
21
22#include <vlib/vlib.h>
23#include <vlib/unix/unix.h>
24#include <vnet/ip/ip.h>
25#include <vnet/ethernet/ethernet.h>
Damjan Marion8bdc63b2016-11-02 14:48:21 +010026#include <vnet/devices/devices.h>
Damjan Marion22311502016-10-28 20:30:15 +020027#include <vnet/feature/feature.h>
Jakub Grajciar92b02752017-10-20 13:37:28 +020028#include <vnet/ethernet/packet.h>
Damjan Marion83243a02016-02-29 13:09:30 +010029
30#include <vnet/devices/af_packet/af_packet.h>
31
Chaoyu Jina608b602018-02-28 10:15:53 -080032#define foreach_af_packet_input_error \
33 _(PARTIAL_PKT, "partial packet")
Damjan Marion83243a02016-02-29 13:09:30 +010034
Damjan Marion00a9dca2016-08-17 17:05:46 +020035typedef enum
36{
Damjan Marion83243a02016-02-29 13:09:30 +010037#define _(f,s) AF_PACKET_INPUT_ERROR_##f,
38 foreach_af_packet_input_error
39#undef _
Damjan Marion00a9dca2016-08-17 17:05:46 +020040 AF_PACKET_INPUT_N_ERROR,
Damjan Marion83243a02016-02-29 13:09:30 +010041} af_packet_input_error_t;
42
Damjan Marion00a9dca2016-08-17 17:05:46 +020043static char *af_packet_input_error_strings[] = {
Damjan Marion83243a02016-02-29 13:09:30 +010044#define _(n,s) s,
Damjan Marion00a9dca2016-08-17 17:05:46 +020045 foreach_af_packet_input_error
Damjan Marion83243a02016-02-29 13:09:30 +010046#undef _
47};
48
Damjan Marion00a9dca2016-08-17 17:05:46 +020049typedef struct
50{
Damjan Marion83243a02016-02-29 13:09:30 +010051 u32 next_index;
52 u32 hw_if_index;
53 int block;
54 struct tpacket2_hdr tph;
55} af_packet_input_trace_t;
56
Damjan Marion00a9dca2016-08-17 17:05:46 +020057static u8 *
58format_af_packet_input_trace (u8 * s, va_list * args)
Damjan Marion83243a02016-02-29 13:09:30 +010059{
60 CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
61 CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
Damjan Marion00a9dca2016-08-17 17:05:46 +020062 af_packet_input_trace_t *t = va_arg (*args, af_packet_input_trace_t *);
Christophe Fontained3c008d2017-10-02 18:10:54 +020063 u32 indent = format_get_indent (s);
Damjan Marion83243a02016-02-29 13:09:30 +010064
65 s = format (s, "af_packet: hw_if_index %d next-index %d",
66 t->hw_if_index, t->next_index);
67
Damjan Marion00a9dca2016-08-17 17:05:46 +020068 s =
69 format (s,
70 "\n%Utpacket2_hdr:\n%Ustatus 0x%x len %u snaplen %u mac %u net %u"
71 "\n%Usec 0x%x nsec 0x%x vlan %U"
Damjan Marion83243a02016-02-29 13:09:30 +010072#ifdef TP_STATUS_VLAN_TPID_VALID
Damjan Marion00a9dca2016-08-17 17:05:46 +020073 " vlan_tpid %u"
Damjan Marion83243a02016-02-29 13:09:30 +010074#endif
Damjan Marion00a9dca2016-08-17 17:05:46 +020075 ,
76 format_white_space, indent + 2,
77 format_white_space, indent + 4,
78 t->tph.tp_status,
79 t->tph.tp_len,
80 t->tph.tp_snaplen,
81 t->tph.tp_mac,
82 t->tph.tp_net,
83 format_white_space, indent + 4,
84 t->tph.tp_sec,
85 t->tph.tp_nsec, format_ethernet_vlan_tci, t->tph.tp_vlan_tci
Damjan Marion83243a02016-02-29 13:09:30 +010086#ifdef TP_STATUS_VLAN_TPID_VALID
Damjan Marion00a9dca2016-08-17 17:05:46 +020087 , t->tph.tp_vlan_tpid
Damjan Marion83243a02016-02-29 13:09:30 +010088#endif
Damjan Marion00a9dca2016-08-17 17:05:46 +020089 );
Damjan Marion83243a02016-02-29 13:09:30 +010090 return s;
91}
92
93always_inline void
Damjan Marion00a9dca2016-08-17 17:05:46 +020094buffer_add_to_chain (vlib_main_t * vm, u32 bi, u32 first_bi, u32 prev_bi)
Damjan Marion83243a02016-02-29 13:09:30 +010095{
Damjan Marion00a9dca2016-08-17 17:05:46 +020096 vlib_buffer_t *b = vlib_get_buffer (vm, bi);
97 vlib_buffer_t *first_b = vlib_get_buffer (vm, first_bi);
98 vlib_buffer_t *prev_b = vlib_get_buffer (vm, prev_bi);
Damjan Marion83243a02016-02-29 13:09:30 +010099
100 /* update first buffer */
Damjan Marion00a9dca2016-08-17 17:05:46 +0200101 first_b->total_length_not_including_first_buffer += b->current_length;
Damjan Marion83243a02016-02-29 13:09:30 +0100102
103 /* update previous buffer */
104 prev_b->next_buffer = bi;
105 prev_b->flags |= VLIB_BUFFER_NEXT_PRESENT;
106
107 /* update current buffer */
108 b->next_buffer = 0;
Damjan Marion83243a02016-02-29 13:09:30 +0100109}
110
Jakub Grajciar92b02752017-10-20 13:37:28 +0200111static_always_inline void
112mark_tcp_udp_cksum_calc (vlib_buffer_t * b)
113{
114 ethernet_header_t *eth = vlib_buffer_get_current (b);
115 if (clib_net_to_host_u16 (eth->type) == ETHERNET_TYPE_IP4)
116 {
117 ip4_header_t *ip4 =
118 (vlib_buffer_get_current (b) + sizeof (ethernet_header_t));
Jakub Grajciar5665a222017-11-15 17:25:50 +0100119 b->flags |= VNET_BUFFER_F_IS_IP4;
Jakub Grajciar92b02752017-10-20 13:37:28 +0200120 if (ip4->protocol == IP_PROTOCOL_TCP)
121 {
122 b->flags |= VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
123 ((tcp_header_t
124 *) (vlib_buffer_get_current (b) +
125 sizeof (ethernet_header_t) +
126 ip4_header_bytes (ip4)))->checksum = 0;
127 }
128 else if (ip4->protocol == IP_PROTOCOL_UDP)
129 {
130 b->flags |= VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
131 ((udp_header_t
132 *) (vlib_buffer_get_current (b) +
133 sizeof (ethernet_header_t) +
134 ip4_header_bytes (ip4)))->checksum = 0;
135 }
136 vnet_buffer (b)->l3_hdr_offset = sizeof (ethernet_header_t);
137 vnet_buffer (b)->l4_hdr_offset =
138 sizeof (ethernet_header_t) + ip4_header_bytes (ip4);
139 }
140 else if (clib_net_to_host_u16 (eth->type) == ETHERNET_TYPE_IP6)
141 {
142 ip6_header_t *ip6 =
143 (vlib_buffer_get_current (b) + sizeof (ethernet_header_t));
144 b->flags |= VNET_BUFFER_F_IS_IP6;
145 u16 ip6_hdr_len = sizeof (ip6_header_t);
146 if (ip6_ext_hdr (ip6->protocol))
147 {
148 ip6_ext_header_t *p = (void *) (ip6 + 1);
149 ip6_hdr_len += ip6_ext_header_len (p);
150 while (ip6_ext_hdr (p->next_hdr))
151 {
152 ip6_hdr_len += ip6_ext_header_len (p);
153 p = ip6_ext_next_header (p);
154 }
155 }
156 if (ip6->protocol == IP_PROTOCOL_TCP)
157 {
158 b->flags |= VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
159 ((tcp_header_t
160 *) (vlib_buffer_get_current (b) +
161 sizeof (ethernet_header_t) + ip6_hdr_len))->checksum = 0;
162 }
163 else if (ip6->protocol == IP_PROTOCOL_UDP)
164 {
165 b->flags |= VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
166 ((udp_header_t
167 *) (vlib_buffer_get_current (b) +
168 sizeof (ethernet_header_t) + ip6_hdr_len))->checksum = 0;
169 }
170 vnet_buffer (b)->l3_hdr_offset = sizeof (ethernet_header_t);
171 vnet_buffer (b)->l4_hdr_offset =
172 sizeof (ethernet_header_t) + ip6_hdr_len;
173 }
174}
175
Damjan Marion83243a02016-02-29 13:09:30 +0100176always_inline uword
Damjan Marion00a9dca2016-08-17 17:05:46 +0200177af_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
Mohsin KAZMIcf751ec2017-01-18 11:59:45 +0100178 vlib_frame_t * frame, af_packet_if_t * apif)
Damjan Marion83243a02016-02-29 13:09:30 +0100179{
Damjan Marion00a9dca2016-08-17 17:05:46 +0200180 af_packet_main_t *apm = &af_packet_main;
Damjan Marion83243a02016-02-29 13:09:30 +0100181 struct tpacket2_hdr *tph;
Damjan Marion8bdc63b2016-11-02 14:48:21 +0100182 u32 next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
Damjan Marion83243a02016-02-29 13:09:30 +0100183 u32 block = 0;
184 u32 rx_frame;
185 u32 n_free_bufs;
186 u32 n_rx_packets = 0;
187 u32 n_rx_bytes = 0;
Damjan Marion00a9dca2016-08-17 17:05:46 +0200188 u32 *to_next = 0;
Damjan Marion83243a02016-02-29 13:09:30 +0100189 u32 block_size = apif->rx_req->tp_block_size;
190 u32 frame_size = apif->rx_req->tp_frame_size;
191 u32 frame_num = apif->rx_req->tp_frame_nr;
Damjan Marion00a9dca2016-08-17 17:05:46 +0200192 u8 *block_start = apif->rx_ring + block * block_size;
Damjan Marion83243a02016-02-29 13:09:30 +0100193 uword n_trace = vlib_get_trace_count (vm, node);
Damjan Marion067cd622018-07-11 12:47:43 +0200194 u32 thread_index = vm->thread_index;
Damjan Marion8934a042019-02-09 23:29:26 +0100195 u32 n_buffer_bytes = vlib_buffer_get_default_data_size (vm);
Damjan Marion83243a02016-02-29 13:09:30 +0100196 u32 min_bufs = apif->rx_req->tp_frame_size / n_buffer_bytes;
197
Damjan Marion586afd72017-04-05 19:18:20 +0200198 n_free_bufs = vec_len (apm->rx_buffers[thread_index]);
Damjan Marion00a9dca2016-08-17 17:05:46 +0200199 if (PREDICT_FALSE (n_free_bufs < VLIB_FRAME_SIZE))
Damjan Marion83243a02016-02-29 13:09:30 +0100200 {
Damjan Marion586afd72017-04-05 19:18:20 +0200201 vec_validate (apm->rx_buffers[thread_index],
Damjan Marion553f6bd2016-09-07 11:54:22 +0200202 VLIB_FRAME_SIZE + n_free_bufs - 1);
Damjan Marion00a9dca2016-08-17 17:05:46 +0200203 n_free_bufs +=
Damjan Marion586afd72017-04-05 19:18:20 +0200204 vlib_buffer_alloc (vm, &apm->rx_buffers[thread_index][n_free_bufs],
Damjan Marion00a9dca2016-08-17 17:05:46 +0200205 VLIB_FRAME_SIZE);
Damjan Marion586afd72017-04-05 19:18:20 +0200206 _vec_len (apm->rx_buffers[thread_index]) = n_free_bufs;
Damjan Marion83243a02016-02-29 13:09:30 +0100207 }
208
209 rx_frame = apif->next_rx_frame;
210 tph = (struct tpacket2_hdr *) (block_start + rx_frame * frame_size);
211 while ((tph->tp_status & TP_STATUS_USER) && (n_free_bufs > min_bufs))
212 {
Damjan Marion22311502016-10-28 20:30:15 +0200213 vlib_buffer_t *b0 = 0, *first_b0 = 0;
Dave Barach13f3c452016-03-29 11:56:41 -0400214 u32 next0 = next_index;
Damjan Marion83243a02016-02-29 13:09:30 +0100215
216 u32 n_left_to_next;
217 vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
218 while ((tph->tp_status & TP_STATUS_USER) && (n_free_bufs > min_bufs) &&
219 n_left_to_next)
220 {
221 u32 data_len = tph->tp_snaplen;
222 u32 offset = 0;
BenoƮt Ganned5304452016-04-08 22:25:05 -0700223 u32 bi0 = 0, first_bi0 = 0, prev_bi0;
Damjan Marion83243a02016-02-29 13:09:30 +0100224
225 while (data_len)
226 {
227 /* grab free buffer */
Damjan Marion553f6bd2016-09-07 11:54:22 +0200228 u32 last_empty_buffer =
Damjan Marion586afd72017-04-05 19:18:20 +0200229 vec_len (apm->rx_buffers[thread_index]) - 1;
Damjan Marion83243a02016-02-29 13:09:30 +0100230 prev_bi0 = bi0;
Damjan Marion586afd72017-04-05 19:18:20 +0200231 bi0 = apm->rx_buffers[thread_index][last_empty_buffer];
Damjan Marion83243a02016-02-29 13:09:30 +0100232 b0 = vlib_get_buffer (vm, bi0);
Damjan Marion586afd72017-04-05 19:18:20 +0200233 _vec_len (apm->rx_buffers[thread_index]) = last_empty_buffer;
Damjan Marion83243a02016-02-29 13:09:30 +0100234 n_free_bufs--;
235
236 /* copy data */
Damjan Marion00a9dca2016-08-17 17:05:46 +0200237 u32 bytes_to_copy =
238 data_len > n_buffer_bytes ? n_buffer_bytes : data_len;
Damjan Marionc5170202017-10-11 14:15:47 +0200239 u32 vlan_len = 0;
Akshaya N535f0bf2017-09-15 17:37:53 +0530240 u32 bytes_copied = 0;
Damjan Marion83243a02016-02-29 13:09:30 +0100241 b0->current_data = 0;
Akshaya N535f0bf2017-09-15 17:37:53 +0530242 /* Kernel removes VLAN headers, so reconstruct VLAN */
243 if (PREDICT_FALSE (tph->tp_status & TP_STATUS_VLAN_VALID))
244 {
245 if (PREDICT_TRUE (offset == 0))
246 {
Dave Barach178cf492018-11-13 16:34:13 -0500247 clib_memcpy_fast (vlib_buffer_get_current (b0),
248 (u8 *) tph + tph->tp_mac,
249 sizeof (ethernet_header_t));
Akshaya N535f0bf2017-09-15 17:37:53 +0530250 ethernet_header_t *eth = vlib_buffer_get_current (b0);
251 ethernet_vlan_header_t *vlan =
252 (ethernet_vlan_header_t *) (eth + 1);
253 vlan->priority_cfi_and_id =
254 clib_host_to_net_u16 (tph->tp_vlan_tci);
255 vlan->type = eth->type;
256 eth->type = clib_host_to_net_u16 (ETHERNET_TYPE_VLAN);
257 vlan_len = sizeof (ethernet_vlan_header_t);
258 bytes_copied = sizeof (ethernet_header_t);
259 }
260 }
Dave Barach178cf492018-11-13 16:34:13 -0500261 clib_memcpy_fast (((u8 *) vlib_buffer_get_current (b0)) +
262 bytes_copied + vlan_len,
263 (u8 *) tph + tph->tp_mac + offset +
264 bytes_copied, (bytes_to_copy - bytes_copied));
Damjan Marion83243a02016-02-29 13:09:30 +0100265
266 /* fill buffer header */
Akshaya N535f0bf2017-09-15 17:37:53 +0530267 b0->current_length = bytes_to_copy + vlan_len;
Damjan Marion83243a02016-02-29 13:09:30 +0100268
269 if (offset == 0)
270 {
271 b0->total_length_not_including_first_buffer = 0;
272 b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
Damjan Marion00a9dca2016-08-17 17:05:46 +0200273 vnet_buffer (b0)->sw_if_index[VLIB_RX] = apif->sw_if_index;
274 vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
Damjan Marion83243a02016-02-29 13:09:30 +0100275 first_bi0 = bi0;
Damjan Marion00a9dca2016-08-17 17:05:46 +0200276 first_b0 = vlib_get_buffer (vm, first_bi0);
Jakub Grajciar92b02752017-10-20 13:37:28 +0200277 if (tph->tp_status & TP_STATUS_CSUMNOTREADY)
278 mark_tcp_udp_cksum_calc (first_b0);
Damjan Marion83243a02016-02-29 13:09:30 +0100279 }
280 else
Damjan Marion00a9dca2016-08-17 17:05:46 +0200281 buffer_add_to_chain (vm, bi0, first_bi0, prev_bi0);
Damjan Marion83243a02016-02-29 13:09:30 +0100282
283 offset += bytes_to_copy;
284 data_len -= bytes_to_copy;
285 }
286 n_rx_packets++;
287 n_rx_bytes += tph->tp_snaplen;
288 to_next[0] = first_bi0;
289 to_next += 1;
290 n_left_to_next--;
291
Chaoyu Jina608b602018-02-28 10:15:53 -0800292 /* drop partial packets */
293 if (PREDICT_FALSE (tph->tp_len != tph->tp_snaplen))
294 {
295 next0 = VNET_DEVICE_INPUT_NEXT_DROP;
296 first_b0->error =
297 node->errors[AF_PACKET_INPUT_ERROR_PARTIAL_PKT];
298 }
299 else
300 {
301 next0 = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
Michael Yu90b34ed2019-08-30 00:50:16 +0800302
303 if (PREDICT_FALSE (apif->per_interface_next_index != ~0))
304 next0 = apif->per_interface_next_index;
305
Chaoyu Jina608b602018-02-28 10:15:53 -0800306 /* redirect if feature path enabled */
307 vnet_feature_start_device_input_x1 (apif->sw_if_index, &next0,
308 first_b0);
309 }
310
Damjan Marion83243a02016-02-29 13:09:30 +0100311 /* trace */
Damjan Marion00a9dca2016-08-17 17:05:46 +0200312 VLIB_BUFFER_TRACE_TRAJECTORY_INIT (first_b0);
BenoƮt Ganne9a3973e2020-10-02 19:36:57 +0200313 if (PREDICT_FALSE
314 (n_trace > 0 && vlib_trace_buffer (vm, node, next0, first_b0,
315 /* follow_chain */ 0)))
Damjan Marion83243a02016-02-29 13:09:30 +0100316 {
317 af_packet_input_trace_t *tr;
Damjan Marion83243a02016-02-29 13:09:30 +0100318 vlib_set_trace_count (vm, node, --n_trace);
319 tr = vlib_add_trace (vm, node, first_b0, sizeof (*tr));
320 tr->next_index = next0;
321 tr->hw_if_index = apif->hw_if_index;
Dave Barach178cf492018-11-13 16:34:13 -0500322 clib_memcpy_fast (&tr->tph, tph, sizeof (struct tpacket2_hdr));
Damjan Marion83243a02016-02-29 13:09:30 +0100323 }
Damjan Marion22311502016-10-28 20:30:15 +0200324
Damjan Marion83243a02016-02-29 13:09:30 +0100325 /* enque and take next packet */
326 vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
327 n_left_to_next, first_bi0, next0);
328
Damjan Marion00a9dca2016-08-17 17:05:46 +0200329 /* next packet */
Damjan Marion83243a02016-02-29 13:09:30 +0100330 tph->tp_status = TP_STATUS_KERNEL;
331 rx_frame = (rx_frame + 1) % frame_num;
332 tph = (struct tpacket2_hdr *) (block_start + rx_frame * frame_size);
333 }
334
335 vlib_put_next_frame (vm, node, next_index, n_left_to_next);
336 }
337
338 apif->next_rx_frame = rx_frame;
339
340 vlib_increment_combined_counter
Damjan Marion00a9dca2016-08-17 17:05:46 +0200341 (vnet_get_main ()->interface_main.combined_sw_if_counters
Damjan Marion83243a02016-02-29 13:09:30 +0100342 + VNET_INTERFACE_COUNTER_RX,
Damjan Marion586afd72017-04-05 19:18:20 +0200343 vlib_get_thread_index (), apif->hw_if_index, n_rx_packets, n_rx_bytes);
Damjan Marion83243a02016-02-29 13:09:30 +0100344
Damjan Marion586afd72017-04-05 19:18:20 +0200345 vnet_device_increment_rx_packets (thread_index, n_rx_packets);
Damjan Marion83243a02016-02-29 13:09:30 +0100346 return n_rx_packets;
347}
348
Filip Tehlar608996d2019-03-04 03:03:13 -0800349VLIB_NODE_FN (af_packet_input_node) (vlib_main_t * vm,
350 vlib_node_runtime_t * node,
351 vlib_frame_t * frame)
Damjan Marion83243a02016-02-29 13:09:30 +0100352{
Damjan Marion83243a02016-02-29 13:09:30 +0100353 u32 n_rx_packets = 0;
Damjan Marion00a9dca2016-08-17 17:05:46 +0200354 af_packet_main_t *apm = &af_packet_main;
Damjan Marioneb743fa2017-03-20 16:34:15 +0100355 vnet_device_input_runtime_t *rt = (void *) node->runtime_data;
356 vnet_device_and_queue_t *dq;
Damjan Marion83243a02016-02-29 13:09:30 +0100357
Damjan Marion153646e2017-04-05 18:15:45 +0200358 foreach_device_and_queue (dq, rt->devices_and_queues)
Damjan Marioneb743fa2017-03-20 16:34:15 +0100359 {
360 af_packet_if_t *apif;
361 apif = vec_elt_at_index (apm->interfaces, dq->dev_instance);
362 if (apif->is_admin_up)
363 n_rx_packets += af_packet_device_input_fn (vm, node, frame, apif);
364 }
Damjan Marion83243a02016-02-29 13:09:30 +0100365
366 return n_rx_packets;
367}
368
Damjan Marion00a9dca2016-08-17 17:05:46 +0200369/* *INDENT-OFF* */
Damjan Marion83243a02016-02-29 13:09:30 +0100370VLIB_REGISTER_NODE (af_packet_input_node) = {
Damjan Marion83243a02016-02-29 13:09:30 +0100371 .name = "af-packet-input",
Damjan Marion7ca5aaa2019-09-24 18:10:49 +0200372 .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED,
Damjan Marion51327ac2016-11-09 11:59:42 +0100373 .sibling_of = "device-input",
Damjan Marion83243a02016-02-29 13:09:30 +0100374 .format_trace = format_af_packet_input_trace,
375 .type = VLIB_NODE_TYPE_INPUT,
376 .state = VLIB_NODE_STATE_INTERRUPT,
377 .n_errors = AF_PACKET_INPUT_N_ERROR,
378 .error_strings = af_packet_input_error_strings,
Damjan Marion83243a02016-02-29 13:09:30 +0100379};
Damjan Marion00a9dca2016-08-17 17:05:46 +0200380/* *INDENT-ON* */
Damjan Marion1c80e832016-05-11 23:07:18 +0200381
Damjan Marion00a9dca2016-08-17 17:05:46 +0200382
383/*
384 * fd.io coding-style-patch-verification: ON
385 *
386 * Local Variables:
387 * eval: (c-set-style "gnu")
388 * End:
389 */