return 0;
}
+static clib_error_t *
+af_packet_fd_error (clib_file_t *uf)
+{
+ af_packet_main_t *apm = &af_packet_main;
+ clib_error_t *err = 0;
+ u64 u64;
+
+ int ret = read (uf->file_descriptor, (char *) &u64, sizeof (u64));
+
+ if (ret < 0)
+ {
+ err = clib_error_return_unix (0, "");
+ vlib_log_notice (apm->log_class, "fd %u %U", uf->file_descriptor,
+ format_clib_error, err);
+ clib_error_free (err);
+ }
+
+ return 0;
+}
+
static int
is_bridge (const u8 * host_if_name)
{
{
clib_file_t template = { 0 };
template.read_function = af_packet_fd_read_ready;
+ template.error_function = af_packet_fd_error;
template.file_descriptor = rx_queue->fd;
template.private_data = rx_queue->queue_index;
template.flags = UNIX_FILE_EVENT_EDGE_TRIGGERED;