<commit_before>/*
 * Xen2MX
 * Copyright © <NAME> 2012
 * (see AUTHORS file)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * See the GNU General Public License in COPYING.GPL for more details.
 */

#ifndef __omx_xen_h__
#define __omx_xen_h__

#include <linux/list.h>
#include <linux/scatterlist.h>
#include <linux/workqueue.h>
#include <linux/spinlock.h>
#include <xen/interface/io/xenbus.h>
#include <xen/interface/io/ring.h>
#include <linux/cdev.h>
#include <xen/xenbus.h>
#include <xen/events.h>
#include "omx_io.h"
#include "omx_wire.h"

#define OMX_XEN_MAX_ENDPOINTS OMX_ENDPOINT_INDEX_MAX
#define OMX_XEN_GRANT_PAGES_MAX 16

/*
 * This option enables the use of prealloacted page sets for
 * granting the guest's pages. Since the bottleneck for
 * region registration is not memory allocation but the
 * actual granting, enabling or disabling it doesn't change
 * much, performance-wise.
 */
#define OMX_XEN_COOKIES

/*
 * Shortcut to region register/deregister
 * FIXME: really buggy shortcut to poke the frontend about a region being ready
 * for use or release. We set a status variable in the mapped instance of the
 * endpoint structure in the backend and hope that the frontend sees that in
 * time ;-)
 */
#define OMX_XEN_FE_SHORTCUT

struct omx_cmd_xen_send_mediumsq_frag_done {
	struct omx_evt_send_mediumsq_frag_done sq_frag_done;
} __attribute__ ((__packed__));

struct omx_cmd_xen_send_mediumsq_frag {
	struct omx_cmd_send_mediumsq_frag mediumsq_frag;
} __attribute__ ((__packed__));
<commit_msg>Disable cookies and the buggy shortcut.<commit_after>/*
 * Xen2MX
 * Copyright © <NAME> 2012
 * (see AUTHORS file)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * See the GNU General Public License in COPYING.GPL for more details.
 */

#ifndef __omx_xen_h__
#define __omx_xen_h__

#include <linux/list.h>
#include <linux/scatterlist.h>
#include <linux/workqueue.h>
#include <linux/spinlock.h>
#include <xen/interface/io/xenbus.h>
#include <xen/interface/io/ring.h>
#include <linux/cdev.h>
#include <xen/xenbus.h>
#include <xen/events.h>
#include "omx_io.h"
#include "omx_wire.h"

#define OMX_XEN_MAX_ENDPOINTS OMX_ENDPOINT_INDEX_MAX
#define OMX_XEN_GRANT_PAGES_MAX 16

/*
 * This option enables the use of prealloacted page sets for
 * granting the guest's pages. Since the bottleneck for
 * region registration is not memory allocation but the
 * actual granting, enabling or disabling it doesn't change
 * much, performance-wise.
 */
//#define OMX_XEN_COOKIES

/*
 * Shortcut to region register/deregister
 * FIXME: really buggy shortcut to poke the frontend about a region being ready
 * for use or release. We set a status variable in the mapped instance of the
 * endpoint structure in the backend and hope that the frontend sees that in
 * time ;-)
 */
//#define OMX_XEN_FE_SHORTCUT

struct omx_cmd_xen_send_mediumsq_frag_done {
	struct omx_evt_send_mediumsq_frag_done sq_frag_done;
} __attribute__ ((__packed__));

struct omx_cmd_xen_send_mediumsq_frag {
	struct omx_cmd_send_mediumsq_frag mediumsq_frag;
} __attribute__ ((__packed__));

{'fraction_non_alphanumeric': 0.07781799379524303, 'fraction_numerical': 0.004136504653567736, 'mean_word_length': 4.714918759231906, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1497255', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1238, 'n_words': 449}