summaryrefslogtreecommitdiff
path: root/tests/headers
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-08-04 17:34:28 -0500
committerGitHub <noreply@github.com>2017-08-04 17:34:28 -0500
commit39a88d366cde89c04a78e01f0147b94ff1e3eb6a (patch)
tree016800421600e538f2529496c55c64e09c2eea21 /tests/headers
parentde180c42e52d6b9236a11ba887a6896b4ffae819 (diff)
parentf4763bc8d4754ee4f89b2ab29b45d4c18e14d647 (diff)
Auto merge of #891 - fitzgen:fix-test-expectations, r=photoszzt
Fix test expectations r? @photoszzt cc @tmfink: I had to revert the target features commit because there were a bunch of compilation failures in the test expectations (we had another, earlier regression that accidentally made it so that we weren't compiling and running the test expectations in CI, so we didn't catch the target features PR's regressions).
Diffstat (limited to 'tests/headers')
-rw-r--r--tests/headers/16-byte-alignment.h1
-rw-r--r--tests/headers/16-byte-alignment_1_0.h34
-rw-r--r--tests/headers/anon_struct_in_union_1_0.h9
-rw-r--r--tests/headers/anon_union_1_0.hpp22
-rw-r--r--tests/headers/class_1_0.hpp58
-rw-r--r--tests/headers/class_with_inner_struct.hpp1
-rw-r--r--tests/headers/class_with_inner_struct_1_0.hpp44
-rw-r--r--tests/headers/forward_declared_complex_types_1_0.hpp18
-rw-r--r--tests/headers/issue-493.hpp2
-rw-r--r--tests/headers/issue-493_1_0.hpp49
-rw-r--r--tests/headers/jsval_layout_opaque_1_0.hpp424
-rw-r--r--tests/headers/layout_eth_conf.h2
-rw-r--r--tests/headers/layout_eth_conf_1_0.h429
-rw-r--r--tests/headers/layout_mbuf.h3
-rw-r--r--tests/headers/layout_mbuf_1_0.h189
-rw-r--r--tests/headers/struct_with_anon_union_1_0.h8
-rw-r--r--tests/headers/struct_with_anon_unnamed_union_1_0.h8
-rw-r--r--tests/headers/struct_with_nesting_1_0.h19
-rw-r--r--tests/headers/typeref_1_0.hpp30
-rw-r--r--tests/headers/union-in-ns_1_0.hpp5
-rw-r--r--tests/headers/union_dtor_1_0.hpp7
-rw-r--r--tests/headers/union_fields_1_0.hpp7
-rw-r--r--tests/headers/union_template_1_0.hpp21
-rw-r--r--tests/headers/union_with_anon_struct_1_0.h8
-rw-r--r--tests/headers/union_with_anon_struct_bitfield_1_0.h9
-rw-r--r--tests/headers/union_with_anon_union_1_0.h8
-rw-r--r--tests/headers/union_with_anon_unnamed_struct_1_0.h11
-rw-r--r--tests/headers/union_with_anon_unnamed_union_1_0.h9
-rw-r--r--tests/headers/union_with_big_member_1_0.h16
-rw-r--r--tests/headers/union_with_nesting_1_0.h16
-rw-r--r--tests/headers/use-core_1_0.h13
31 files changed, 5 insertions, 1475 deletions
diff --git a/tests/headers/16-byte-alignment.h b/tests/headers/16-byte-alignment.h
index 68fe1eb3..7a7f7548 100644
--- a/tests/headers/16-byte-alignment.h
+++ b/tests/headers/16-byte-alignment.h
@@ -1,3 +1,4 @@
+
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
diff --git a/tests/headers/16-byte-alignment_1_0.h b/tests/headers/16-byte-alignment_1_0.h
deleted file mode 100644
index 8e4fcb2d..00000000
--- a/tests/headers/16-byte-alignment_1_0.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-
-struct rte_ipv4_tuple {
- uint32_t src_addr;
- uint32_t dst_addr;
- union {
- struct {
- uint16_t dport;
- uint16_t sport;
- };
- uint32_t sctp_tag;
- };
-};
-
-struct rte_ipv6_tuple {
- uint8_t src_addr[16];
- uint8_t dst_addr[16];
- union {
- struct {
- uint16_t dport;
- uint16_t sport;
- };
- uint32_t sctp_tag;
- };
-};
-
-union rte_thash_tuple {
- struct rte_ipv4_tuple v4;
- struct rte_ipv6_tuple v6;
-} __attribute__((aligned(16)));
diff --git a/tests/headers/anon_struct_in_union_1_0.h b/tests/headers/anon_struct_in_union_1_0.h
deleted file mode 100644
index fe0a030c..00000000
--- a/tests/headers/anon_struct_in_union_1_0.h
+++ /dev/null
@@ -1,9 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-struct s {
- union {
- struct inner {
- int b;
- } field;
- } u;
-};
diff --git a/tests/headers/anon_union_1_0.hpp b/tests/headers/anon_union_1_0.hpp
deleted file mode 100644
index 83f408c1..00000000
--- a/tests/headers/anon_union_1_0.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-template<typename T>
-struct TErrorResult {
- enum UnionState {
- HasMessage,
- HasException,
- };
- int mResult;
- struct Message;
- struct DOMExceptionInfo;
- union {
- Message* mMessage;
- DOMExceptionInfo* mDOMExceptionInfo;
- };
-
- bool mMightHaveUnreported;
- UnionState mUnionState;
-};
-
-struct ErrorResult : public TErrorResult<int> {
-};
diff --git a/tests/headers/class_1_0.hpp b/tests/headers/class_1_0.hpp
deleted file mode 100644
index f73487d1..00000000
--- a/tests/headers/class_1_0.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-class C {
- int a;
- // More than rust limits (32)
- char big_array[33];
-};
-
-class C_with_zero_length_array {
- int a;
- // More than rust limits (32)
- char big_array[33];
- char zero_length_array[0];
-};
-
-class C_with_incomplete_array {
- int a;
- // More than rust limits (32)
- char big_array[33];
- char incomplete_array[];
-};
-
-class C_with_zero_length_array_and_incomplete_array {
- int a;
- // More than rust limits (32)
- char big_array[33];
- char zero_length_array[0];
- char incomplete_array[];
-};
-
-class WithDtor {
- int b;
-
- ~WithDtor() {}
-};
-
-class IncompleteArrayNonCopiable {
- void* whatever;
- C incomplete_array[];
-};
-
-union Union {
- float d;
- int i;
-};
-
-class WithUnion {
- Union data;
-};
-
-class RealAbstractionWithTonsOfMethods {
- void foo();
-public:
- void bar() const;
- void bar();
- void bar(int foo);
- static void sta();
-};
diff --git a/tests/headers/class_with_inner_struct.hpp b/tests/headers/class_with_inner_struct.hpp
index 79a8b95b..ec729fe6 100644
--- a/tests/headers/class_with_inner_struct.hpp
+++ b/tests/headers/class_with_inner_struct.hpp
@@ -1,6 +1,5 @@
// bindgen-flags: -- -std=c++11
-
class A {
unsigned c;
struct Segment { int begin, end; };
diff --git a/tests/headers/class_with_inner_struct_1_0.hpp b/tests/headers/class_with_inner_struct_1_0.hpp
deleted file mode 100644
index 5145337f..00000000
--- a/tests/headers/class_with_inner_struct_1_0.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// bindgen-flags: --rust-target 1.0 -- -std=c++11
-
-
-class A {
- unsigned c;
- struct Segment { int begin, end; };
- union {
- int f;
- } named_union;
- union {
- int d;
- };
-};
-
-class B {
- unsigned d;
- struct Segment { int begin, end; };
-};
-
-
-enum class StepSyntax {
- Keyword, // step-start and step-end
- FunctionalWithoutKeyword, // steps(...)
- FunctionalWithStartKeyword, // steps(..., start)
- FunctionalWithEndKeyword, // steps(..., end)
-};
-
-class C {
- unsigned d;
- union {
- struct {
- float mX1;
- float mY1;
- float mX2;
- float mY2;
- } mFunc;
- struct {
- StepSyntax mStepSyntax;
- unsigned int mSteps;
- };
- };
- // To ensure it doesn't collide
- struct Segment { int begin, end; };
-};
diff --git a/tests/headers/forward_declared_complex_types_1_0.hpp b/tests/headers/forward_declared_complex_types_1_0.hpp
deleted file mode 100644
index ff6076fc..00000000
--- a/tests/headers/forward_declared_complex_types_1_0.hpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-struct Foo_empty {};
-struct Foo;
-
-struct Bar {
- Foo *f;
-};
-
-void baz_struct(Foo* f);
-
-union Union;
-
-void baz_union(Union* u);
-
-class Quux;
-
-void baz_class(Quux* q);
diff --git a/tests/headers/issue-493.hpp b/tests/headers/issue-493.hpp
index 8a4f1da3..975ef5ce 100644
--- a/tests/headers/issue-493.hpp
+++ b/tests/headers/issue-493.hpp
@@ -44,4 +44,4 @@ public:
__raw __r;
};
};
-};
+}; \ No newline at end of file
diff --git a/tests/headers/issue-493_1_0.hpp b/tests/headers/issue-493_1_0.hpp
deleted file mode 100644
index d9373a8c..00000000
--- a/tests/headers/issue-493_1_0.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-template<class _CharT, class _Traits, class _Allocator>
-class basic_string
-{
-public:
- typedef unsigned long long size_type;
- typedef char value_type;
- typedef value_type * pointer;
-
- struct __long
- {
- size_type __cap_;
- size_type __size_;
- pointer __data_;
- };
-
- enum {__min_cap = (sizeof(__long) - 1)/sizeof(value_type) > 2 ?
- (sizeof(__long) - 1)/sizeof(value_type) : 2};
-
- struct __short
- {
- union
- {
- unsigned char __size_;
- value_type __lx;
- };
- value_type __data_[__min_cap];
- };
-
- union __ulx{__long __lx; __short __lxx;};
-
- enum {__n_words = sizeof(__ulx) / sizeof(size_type)};
-
- struct __raw
- {
- size_type __words[__n_words];
- };
-
- struct __rep
- {
- union
- {
- __long __l;
- __short __s;
- __raw __r;
- };
- };
-};
diff --git a/tests/headers/jsval_layout_opaque_1_0.hpp b/tests/headers/jsval_layout_opaque_1_0.hpp
deleted file mode 100644
index ca31cc01..00000000
--- a/tests/headers/jsval_layout_opaque_1_0.hpp
+++ /dev/null
@@ -1,424 +0,0 @@
-// bindgen-flags: --rust-target 1.0 -- -std=c++11
-
-/**
- * These typedefs are hacky, but keep our tests consistent across 64-bit
- * platforms, otherwise the id's change and our CI is unhappy.
- */
-typedef unsigned char uint8_t;
-typedef int int32_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-typedef unsigned long long size_t;
-typedef unsigned long long uintptr_t;
-
-
-#define JS_PUNBOX64
-#define IS_LITTLE_ENDIAN
-
-/*
- * Try to get jsvals 64-bit aligned. We could almost assert that all values are
- * aligned, but MSVC and GCC occasionally break alignment.
- */
-#if defined(__GNUC__) || defined(__xlc__) || defined(__xlC__)
-# define JSVAL_ALIGNMENT __attribute__((aligned (8)))
-#elif defined(_MSC_VER)
- /*
- * Structs can be aligned with MSVC, but not if they are used as parameters,
- * so we just don't try to align.
- */
-# define JSVAL_ALIGNMENT
-#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-# define JSVAL_ALIGNMENT
-#elif defined(__HP_cc) || defined(__HP_aCC)
-# define JSVAL_ALIGNMENT
-#endif
-
-#if defined(JS_PUNBOX64)
-# define JSVAL_TAG_SHIFT 47
-#endif
-
-/*
- * We try to use enums so that printing a jsval_layout in the debugger shows
- * nice symbolic type tags, however we can only do this when we can force the
- * underlying type of the enum to be the desired size.
- */
-#if !defined(__SUNPRO_CC) && !defined(__xlC__)
-
-#if defined(_MSC_VER)
-# define JS_ENUM_HEADER(id, type) enum id : type
-# define JS_ENUM_FOOTER(id)
-#else
-# define JS_ENUM_HEADER(id, type) enum id
-# define JS_ENUM_FOOTER(id) __attribute__((packed))
-#endif
-
-/* Remember to propagate changes to the C defines below. */
-JS_ENUM_HEADER(JSValueType, uint8_t)
-{
- JSVAL_TYPE_DOUBLE = 0x00,
- JSVAL_TYPE_INT32 = 0x01,
- JSVAL_TYPE_UNDEFINED = 0x02,
- JSVAL_TYPE_BOOLEAN = 0x03,
- JSVAL_TYPE_MAGIC = 0x04,
- JSVAL_TYPE_STRING = 0x05,
- JSVAL_TYPE_SYMBOL = 0x06,
- JSVAL_TYPE_NULL = 0x07,
- JSVAL_TYPE_OBJECT = 0x08,
-
- /* These never appear in a jsval; they are only provided as an out-of-band value. */
- JSVAL_TYPE_UNKNOWN = 0x20,
- JSVAL_TYPE_MISSING = 0x21
-} JS_ENUM_FOOTER(JSValueType);
-
-static_assert(sizeof(JSValueType) == 1,
- "compiler typed enum support is apparently buggy");
-
-#if defined(JS_NUNBOX32)
-
-/* Remember to propagate changes to the C defines below. */
-JS_ENUM_HEADER(JSValueTag, uint32_t)
-{
- JSVAL_TAG_CLEAR = 0xFFFFFF80,
- JSVAL_TAG_INT32 = JSVAL_TAG_CLEAR | JSVAL_TYPE_INT32,
- JSVAL_TAG_UNDEFINED = JSVAL_TAG_CLEAR | JSVAL_TYPE_UNDEFINED,
- JSVAL_TAG_STRING = JSVAL_TAG_CLEAR | JSVAL_TYPE_STRING,
- JSVAL_TAG_SYMBOL = JSVAL_TAG_CLEAR | JSVAL_TYPE_SYMBOL,
- JSVAL_TAG_BOOLEAN = JSVAL_TAG_CLEAR | JSVAL_TYPE_BOOLEAN,
- JSVAL_TAG_MAGIC = JSVAL_TAG_CLEAR | JSVAL_TYPE_MAGIC,
- JSVAL_TAG_NULL = JSVAL_TAG_CLEAR | JSVAL_TYPE_NULL,
- JSVAL_TAG_OBJECT = JSVAL_TAG_CLEAR | JSVAL_TYPE_OBJECT
-} JS_ENUM_FOOTER(JSValueTag);
-
-static_assert(sizeof(JSValueTag) == sizeof(uint32_t),
- "compiler typed enum support is apparently buggy");
-
-#elif defined(JS_PUNBOX64)
-
-/* Remember to propagate changes to the C defines below. */
-JS_ENUM_HEADER(JSValueTag, uint32_t)
-{
- JSVAL_TAG_MAX_DOUBLE = 0x1FFF0,
- JSVAL_TAG_INT32 = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_INT32,
- JSVAL_TAG_UNDEFINED = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_UNDEFINED,
- JSVAL_TAG_STRING = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_STRING,
- JSVAL_TAG_SYMBOL = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_SYMBOL,
- JSVAL_TAG_BOOLEAN = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_BOOLEAN,
- JSVAL_TAG_MAGIC = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_MAGIC,
- JSVAL_TAG_NULL = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_NULL,
- JSVAL_TAG_OBJECT = JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_OBJECT
-} JS_ENUM_FOOTER(JSValueTag);
-
-static_assert(sizeof(JSValueTag) == sizeof(uint32_t),
- "compiler typed enum support is apparently buggy");
-
-JS_ENUM_HEADER(JSValueShiftedTag, uint64_t)
-{
- JSVAL_SHIFTED_TAG_MAX_DOUBLE = ((((uint64_t)JSVAL_TAG_MAX_DOUBLE) << JSVAL_TAG_SHIFT) | 0xFFFFFFFF),
- JSVAL_SHIFTED_TAG_INT32 = (((uint64_t)JSVAL_TAG_INT32) << JSVAL_TAG_SHIFT),
- JSVAL_SHIFTED_TAG_UNDEFINED = (((uint64_t)JSVAL_TAG_UNDEFINED) << JSVAL_TAG_SHIFT),
- JSVAL_SHIFTED_TAG_STRING = (((uint64_t)JSVAL_TAG_STRING) << JSVAL_TAG_SHIFT),
- JSVAL_SHIFTED_TAG_SYMBOL = (((uint64_t)JSVAL_TAG_SYMBOL) << JSVAL_TAG_SHIFT),
- JSVAL_SHIFTED_TAG_BOOLEAN = (((uint64_t)JSVAL_TAG_BOOLEAN) << JSVAL_TAG_SHIFT),
- JSVAL_SHIFTED_TAG_MAGIC = (((uint64_t)JSVAL_TAG_MAGIC) << JSVAL_TAG_SHIFT),
- JSVAL_SHIFTED_TAG_NULL = (((uint64_t)JSVAL_TAG_NULL) << JSVAL_TAG_SHIFT),
- JSVAL_SHIFTED_TAG_OBJECT = (((uint64_t)JSVAL_TAG_OBJECT) << JSVAL_TAG_SHIFT)
-} JS_ENUM_FOOTER(JSValueShiftedTag);
-
-static_assert(sizeof(JSValueShiftedTag) == sizeof(uint64_t),
- "compiler typed enum support is apparently buggy");
-
-#endif
-
-/*
- * All our supported compilers implement C++11 |enum Foo : T| syntax, so don't
- * expose these macros. (This macro exists *only* because gcc bug 51242
- * <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242> makes bit-fields of
- * typed enums trigger a warning that can't be turned off. Don't expose it
- * beyond this file!)
- */
-#undef JS_ENUM_HEADER
-#undef JS_ENUM_FOOTER
-
-#else /* !defined(__SUNPRO_CC) && !defined(__xlC__) */
-
-typedef uint8_t JSValueType;
-#define JSVAL_TYPE_DOUBLE ((uint8_t)0x00)
-#define JSVAL_TYPE_INT32 ((uint8_t)0x01)
-#define JSVAL_TYPE_UNDEFINED ((uint8_t)0x02)
-#define JSVAL_TYPE_BOOLEAN ((uint8_t)0x03)
-#define JSVAL_TYPE_MAGIC ((uint8_t)0x04)
-#define JSVAL_TYPE_STRING ((uint8_t)0x05)
-#define JSVAL_TYPE_SYMBOL ((uint8_t)0x06)
-#define JSVAL_TYPE_NULL ((uint8_t)0x07)
-#define JSVAL_TYPE_OBJECT ((uint8_t)0x08)
-#define JSVAL_TYPE_UNKNOWN ((uint8_t)0x20)
-
-#if defined(JS_NUNBOX32)
-
-typedef uint32_t JSValueTag;
-#define JSVAL_TAG_CLEAR ((uint32_t)(0xFFFFFF80))
-#define JSVAL_TAG_INT32 ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_INT32))
-#define JSVAL_TAG_UNDEFINED ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_UNDEFINED))
-#define JSVAL_TAG_STRING ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_STRING))
-#define JSVAL_TAG_SYMBOL ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_SYMBOL))
-#define JSVAL_TAG_BOOLEAN ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_BOOLEAN))
-#define JSVAL_TAG_MAGIC ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_MAGIC))
-#define JSVAL_TAG_NULL ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_NULL))
-#define JSVAL_TAG_OBJECT ((uint32_t)(JSVAL_TAG_CLEAR | JSVAL_TYPE_OBJECT))
-
-#elif defined(JS_PUNBOX64)
-
-typedef uint32_t JSValueTag;
-#define JSVAL_TAG_MAX_DOUBLE ((uint32_t)(0x1FFF0))
-#define JSVAL_TAG_INT32 (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_INT32)
-#define JSVAL_TAG_UNDEFINED (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_UNDEFINED)
-#define JSVAL_TAG_STRING (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_STRING)
-#define JSVAL_TAG_SYMBOL (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_SYMBOL)
-#define JSVAL_TAG_BOOLEAN (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_BOOLEAN)
-#define JSVAL_TAG_MAGIC (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_MAGIC)
-#define JSVAL_TAG_NULL (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_NULL)
-#define JSVAL_TAG_OBJECT (uint32_t)(JSVAL_TAG_MAX_DOUBLE | JSVAL_TYPE_OBJECT)
-
-typedef uint64_t JSValueShiftedTag;
-#define JSVAL_SHIFTED_TAG_MAX_DOUBLE ((((uint64_t)JSVAL_TAG_MAX_DOUBLE) << JSVAL_TAG_SHIFT) | 0xFFFFFFFF)
-#define JSVAL_SHIFTED_TAG_INT32 (((uint64_t)JSVAL_TAG_INT32) << JSVAL_TAG_SHIFT)
-#define JSVAL_SHIFTED_TAG_UNDEFINED (((uint64_t)JSVAL_TAG_UNDEFINED) << JSVAL_TAG_SHIFT)
-#define JSVAL_SHIFTED_TAG_STRING (((uint64_t)JSVAL_TAG_STRING) << JSVAL_TAG_SHIFT)
-#define JSVAL_SHIFTED_TAG_SYMBOL (((uint64_t)JSVAL_TAG_SYMBOL) << JSVAL_TAG_SHIFT)
-#define JSVAL_SHIFTED_TAG_BOOLEAN (((uint64_t)JSVAL_TAG_BOOLEAN) << JSVAL_TAG_SHIFT)
-#define JSVAL_SHIFTED_TAG_MAGIC (((uint64_t)JSVAL_TAG_MAGIC) << JSVAL_TAG_SHIFT)
-#define JSVAL_SHIFTED_TAG_NULL (((uint64_t)JSVAL_TAG_NULL) << JSVAL_TAG_SHIFT)
-#define JSVAL_SHIFTED_TAG_OBJECT (((uint64_t)JSVAL_TAG_OBJECT) << JSVAL_TAG_SHIFT)
-
-#endif /* JS_PUNBOX64 */
-#endif /* !defined(__SUNPRO_CC) && !defined(__xlC__) */
-
-#if defined(JS_NUNBOX32)
-
-#define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_CLEAR | (type)))
-
-#define JSVAL_LOWER_INCL_TAG_OF_OBJ_OR_NULL_SET JSVAL_TAG_NULL
-#define JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET JSVAL_TAG_OBJECT
-#define JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET JSVAL_TAG_INT32
-#define JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET JSVAL_TAG_STRING
-
-#elif defined(JS_PUNBOX64)
-
-#define JSVAL_PAYLOAD_MASK 0x00007FFFFFFFFFFFLL
-#define JSVAL_TAG_MASK 0xFFFF800000000000LL
-#define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_MAX_DOUBLE | (type)))
-#define JSVAL_TYPE_TO_SHIFTED_TAG(type) (((uint64_t)JSVAL_TYPE_TO_TAG(type)) << JSVAL_TAG_SHIFT)
-
-#define JSVAL_LOWER_INCL_TAG_OF_OBJ_OR_NULL_SET JSVAL_TAG_NULL
-#define JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET JSVAL_TAG_OBJECT
-#define JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET JSVAL_TAG_INT32
-#define JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET JSVAL_TAG_STRING
-
-#define JSVAL_LOWER_INCL_SHIFTED_TAG_OF_OBJ_OR_NULL_SET JSVAL_SHIFTED_TAG_NULL
-#define JSVAL_UPPER_EXCL_SHIFTED_TAG_OF_PRIMITIVE_SET JSVAL_SHIFTED_TAG_OBJECT
-#define JSVAL_UPPER_EXCL_SHIFTED_TAG_OF_NUMBER_SET JSVAL_SHIFTED_TAG_UNDEFINED
-#define JSVAL_LOWER_INCL_SHIFTED_TAG_OF_GCTHING_SET JSVAL_SHIFTED_TAG_STRING
-
-#endif /* JS_PUNBOX64 */
-
-typedef enum JSWhyMagic
-{
- /** a hole in a native object's elements */
- JS_ELEMENTS_HOLE,
-
- /** there is not a pending iterator value */
- JS_NO_ITER_VALUE,
-
- /** exception value thrown when closing a generator */
- JS_GENERATOR_CLOSING,
-
- /** compiler sentinel value */
- JS_NO_CONSTANT,
-
- /** used in debug builds to catch tracing errors */
- JS_THIS_POISON,
-
- /** used in debug builds to catch tracing errors */
- JS_ARG_POISON,
-
- /** an empty subnode in the AST serializer */
- JS_SERIALIZE_NO_NODE,
-
- /** lazy arguments value on the stack */
- JS_LAZY_ARGUMENTS,
-
- /** optimized-away 'arguments' value */
- JS_OPTIMIZED_ARGUMENTS,
-
- /** magic value passed to natives to indicate construction */
- JS_IS_CONSTRUCTING,
-
- /** arguments.callee has been overwritten */
- JS_OVERWRITTEN_CALLEE,
-
- /** value of static block object slot */
- JS_BLOCK_NEEDS_CLONE,
-
- /** see class js::HashableValue */
- JS_HASH_KEY_EMPTY,
-
- /** error while running Ion code */
- JS_ION_ERROR,
-
- /** missing recover instruction result */
- JS_ION_BAILOUT,
-
- /** optimized out slot */
- JS_OPTIMIZED_OUT,
-
- /** uninitialized lexical bindings that produce ReferenceError on touch. */
- JS_UNINITIALIZED_LEXICAL,
-
- /** for local use */
- JS_GENERIC_MAGIC,
-
- JS_WHY_MAGIC_COUNT
-} JSWhyMagic;
-
-#if defined(IS_LITTLE_ENDIAN)
-# if defined(JS_NUNBOX32)
-typedef union jsval_layout
-{
- uint64_t asBits;
- struct {
- union {
- int32_t i32;
- uint32_t u32;
- uint32_t boo; // Don't use |bool| -- it must be four bytes.
- JSString* str;
- JS::Symbol* sym;
- JSObject* obj;
- js::gc::Cell* cell;
- void* ptr;
- JSWhyMagic why;
- size_t word;
- uintptr_t uintptr;
- } payload;
- JSValueTag tag;
- } s;
- double asDouble;
- void* asPtr;
-} JSVAL_ALIGNMENT jsval_layout;
-# elif defined(JS_PUNBOX64)
-typedef union jsval_layout
-{
- uint64_t asBits;
-#if !defined(_WIN64)
- /* MSVC does not pack these correctly :-( */
- struct {
- uint64_t payload47 : 47;
- JSValueTag tag : 17;
- } debugView;
-#endif
- struct {
- union {
- int32_t i32;
- uint32_t u32;
- JSWhyMagic why;
- } payload;
- } s;
- double asDouble;
- void* asPtr;
- size_t asWord;
- uintptr_t asUIntPtr;
-} JSVAL_ALIGNMENT jsval_layout;
-# endif /* JS_PUNBOX64 */
-#else /* defined(IS_LITTLE_ENDIAN) */
-# if defined(JS_NUNBOX32)
-typedef union jsval_layout
-{
- uint64_t asBits;
- struct {
- JSValueTag tag;
- union {
- int32_t i32;
- uint32_t u32;
- uint32_t boo; // Don't use |bool| -- it must be four bytes.
- JSString* str;
- JS::Symbol* sym;
- JSObject* obj;
- js::gc::Cell* cell;
- void* ptr;
- JSWhyMagic why;
- size_t word;
- uintptr_t uintptr;
- } payload;
- } s;
- double asDouble;
- void* asPtr;
-} JSVAL_ALIGNMENT jsval_layout;
-# elif defined(JS_PUNBOX64)
-typedef union jsval_layout
-{
- uint64_t asBits;
- struct {
- JSValueTag tag : 17;
- uint64_t payload47 : 47;
- } debugView;
- struct {
- uint32_t padding;
- union {
- int32_t i32;
- uint32_t u32;
- JSWhyMagic why;
- } payload;
- } s;
- double asDouble;
- void* asPtr;
- size_t asWord;
- uintptr_t asUIntPtr;
-} JSVAL_ALIGNMENT jsval_layout;
-# endif /* JS_PUNBOX64 */
-#endif /* defined(IS_LITTLE_ENDIAN) */
-
-/*
- * For codesize purposes on some platforms, it's important that the
- * compiler know that JS::Values constructed from constant values can be
- * folded to constant bit patterns at compile time, rather than
- * constructed at runtime. Doing this requires a fair amount of C++11
- * features, which are not supported on all of our compilers. Set up
- * some defines and helper macros in an attempt to confine the ugliness
- * here, rather than scattering it all about the file. The important
- * features are:
- *
- * - constexpr;
- * - defaulted functions;
- * - C99-style designated initializers.
- */
-#if defined(__clang__)
-# if __has_feature(cxx_constexpr) && __has_feature(cxx_defaulted_functions)
-# define JS_VALUE_IS_CONSTEXPR
-# endif
-#elif defined(__GNUC__)
-/*
- * We need 4.5 for defaulted functions, 4.6 for constexpr, 4.7 because 4.6
- * doesn't understand |(X) { .field = ... }| syntax, and 4.7.3 because
- * versions prior to that have bugs in the C++ front-end that cause crashes.
- */
-# if MOZ_GCC_VERSION_AT_LEAST(4, 7, 3)
-# define JS_VALUE_IS_CONSTEXPR
-# endif
-#endif
-
-#if defined(JS_VALUE_IS_CONSTEXPR)
-# define JS_RETURN_LAYOUT_FROM_BITS(BITS) \
- return (jsval_layout) { .asBits = (BITS) }
-# define JS_VALUE_CONSTEXPR MOZ_CONSTEXPR
-# define JS_VALUE_CONSTEXPR_VAR MOZ_CONSTEXPR_VAR
-#else
-# define JS_RETURN_LAYOUT_FROM_BITS(BITS) \
- jsval_layout l; \
- l.asBits = (BITS); \
- return l;
-# define JS_VALUE_CONSTEXPR
-# define JS_VALUE_CONSTEXPR_VAR const
-#endif
-
-struct Value {
- jsval_layout data;
-};
diff --git a/tests/headers/layout_eth_conf.h b/tests/headers/layout_eth_conf.h
index f5fd605a..a742ee5f 100644
--- a/tests/headers/layout_eth_conf.h
+++ b/tests/headers/layout_eth_conf.h
@@ -424,4 +424,4 @@ struct rte_eth_conf {
uint32_t dcb_capability_en;
struct rte_fdir_conf fdir_conf; /**< FDIR configuration. */
struct rte_intr_conf intr_conf; /**< Interrupt mode configuration. */
-};
+}; \ No newline at end of file
diff --git a/tests/headers/layout_eth_conf_1_0.h b/tests/headers/layout_eth_conf_1_0.h
deleted file mode 100644
index 54630f24..00000000
--- a/tests/headers/layout_eth_conf_1_0.h
+++ /dev/null
@@ -1,429 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-
-/**
- * Simple flags are used for rte_eth_conf.rxmode.mq_mode.
- */
-#define ETH_MQ_RX_RSS_FLAG 0x1
-#define ETH_MQ_RX_DCB_FLAG 0x2
-#define ETH_MQ_RX_VMDQ_FLAG 0x4
-
-/* Definitions used for VMDQ and DCB functionality */
-#define ETH_VMDQ_MAX_VLAN_FILTERS 64 /**< Maximum nb. of VMDQ vlan filters. */
-#define ETH_DCB_NUM_USER_PRIORITIES 8 /**< Maximum nb. of DCB priorities. */
-#define ETH_VMDQ_DCB_NUM_QUEUES 128 /**< Maximum nb. of VMDQ DCB queues. */
-#define ETH_DCB_NUM_QUEUES 128 /**< Maximum nb. of DCB queues. */
-
-/**
- * A set of values to identify what method is to be used to route
- * packets to multiple queues.
- */
-enum rte_eth_rx_mq_mode {
- /** None of DCB,RSS or VMDQ mode */
- ETH_MQ_RX_NONE = 0,
-
- /** For RX side, only RSS is on */
- ETH_MQ_RX_RSS = ETH_MQ_RX_RSS_FLAG,
- /** For RX side,only DCB is on. */
- ETH_MQ_RX_DCB = ETH_MQ_RX_DCB_FLAG,
- /** Both DCB and RSS enable */
- ETH_MQ_RX_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG,
-
- /** Only VMDQ, no RSS nor DCB */
- ETH_MQ_RX_VMDQ_ONLY = ETH_MQ_RX_VMDQ_FLAG,
- /** RSS mode with VMDQ */
- ETH_MQ_RX_VMDQ_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_VMDQ_FLAG,
- /** Use VMDQ+DCB to route traffic to queues */
- ETH_MQ_RX_VMDQ_DCB = ETH_MQ_RX_VMDQ_FLAG | ETH_MQ_RX_DCB_FLAG,
- /** Enable both VMDQ and DCB in VMDq */
- ETH_MQ_RX_VMDQ_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG |
- ETH_MQ_RX_VMDQ_FLAG,
-};
-
-/**
- * A structure used to configure the RX features of an Ethernet port.
- */
-struct rte_eth_rxmode {
- /** The multi-queue packet distribution mode to be used, e.g. RSS. */
- enum rte_eth_rx_mq_mode mq_mode;
- uint32_t max_rx_pkt_len; /**< Only used if jumbo_frame enabled. */
- uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/
- __extension__
- uint16_t header_split : 1, /**< Header Split enable. */
- hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload enable. */
- hw_vlan_filter : 1, /**< VLAN filter enable. */
- hw_vlan_strip : 1, /**< VLAN strip enable. */
- hw_vlan_extend : 1, /**< Extended VLAN enable. */
- jumbo_frame : 1, /**< Jumbo Frame Receipt enable. */
- hw_strip_crc : 1, /**< Enable CRC stripping by hardware. */
- enable_scatter : 1, /**< Enable scatter packets rx handler */
- enable_lro : 1; /**< Enable LRO */
-};
-
-/**
- * A set of values to identify what method is to be used to transmit
- * packets using multi-TCs.
- */
-enum rte_eth_tx_mq_mode {
- ETH_MQ_TX_NONE = 0, /**< It is in neither DCB nor VT mode. */
- ETH_MQ_TX_DCB, /**< For TX side,only DCB is on. */
- ETH_MQ_TX_VMDQ_DCB, /**< For TX side,both DCB and VT is on. */
- ETH_MQ_TX_VMDQ_ONLY, /**< Only VT on, no DCB */
-};
-
-/**
- * A structure used to configure the TX features of an Ethernet port.
- */
-struct rte_eth_txmode {
- enum rte_eth_tx_mq_mode mq_mode; /**< TX multi-queues mode. */
-
- /* For i40e specifically */
- uint16_t pvid;
- __extension__
- uint8_t hw_vlan_reject_tagged : 1,
- /**< If set, reject sending out tagged pkts */
- hw_vlan_reject_untagged : 1,
- /**< If set, reject sending out untagged pkts */
- hw_vlan_insert_pvid : 1;
- /**< If set, enable port based VLAN insertion */
-};
-
-/**
- * A structure used to configure the Receive Side Scaling (RSS) feature
- * of an Ethernet port.
- * If not NULL, the *rss_key* pointer of the *rss_conf* structure points
- * to an array holding the RSS key to use for hashing specific header
- * fields of received packets. The length of this array should be indicated
- * by *rss_key_len* below. Otherwise, a default random hash key is used by
- * the device driver.
- *
- * The *rss_key_len* field of the *rss_conf* structure indicates the length
- * in bytes of the array pointed by *rss_key*. To be compatible, this length
- * will be checked in i40e only. Others assume 40 bytes to be used as before.
- *
- * The *rss_hf* field of the *rss_conf* structure indicates the different
- * types of IPv4/IPv6 packets to which the RSS hashing must be applied.
- * Supplying an *rss_hf* equal to zero disables the RSS feature.
- */
-struct rte_eth_rss_conf {
- uint8_t *rss_key; /**< If not NULL, 40-byte hash key. */
- uint8_t rss_key_len; /**< hash key length in bytes. */
- uint64_t rss_hf; /**< Hash functions to apply - see below. */
-};
-
-/**
- * This enum indicates the possible number of traffic classes
- * in DCB configratioins
- */
-enum rte_eth_nb_tcs {
- ETH_4_TCS = 4, /**< 4 TCs with DCB. */
- ETH_8_TCS = 8 /**< 8 TCs with DCB. */
-};
-
-/**
- * This enum indicates the possible number of queue pools
- * in VMDQ configurations.
- */
-enum rte_eth_nb_pools {
- ETH_8_POOLS = 8, /**< 8 VMDq pools. */
- ETH_16_POOLS = 16, /**< 16 VMDq pools. */
- ETH_32_POOLS = 32, /**< 32 VMDq pools. */
- ETH_64_POOLS = 64 /**< 64 VMDq pools. */
-};
-
-/**
- * A structure used to configure the VMDQ+DCB feature
- * of an Ethernet port.
- *
- * Using this feature, packets are routed to a pool of queues, based
- * on the vlan id in the vlan tag, and then to a specific queue within
- * that pool, using the user priority vlan tag field.
- *
- * A default pool may be used, if desired, to route all traffic which
- * does not match the vlan filter rules.
- */
-struct rte_eth_vmdq_dcb_conf {
- enum rte_eth_nb_pools nb_queue_pools; /**< With DCB, 16 or 32 pools */
- uint8_t enable_default_pool; /**< If non-zero, use a default pool */
- uint8_t default_pool; /**< The default pool, if applicable */
- uint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */
- struct {
- uint16_t vlan_id; /**< The vlan id of the received frame */
- uint64_t pools; /**< Bitmask of pools for packet rx */
- } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */
- uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
- /**< Selects a queue in a pool */
-};
-
-/* This structure may be extended in future. */
-struct rte_eth_dcb_rx_conf {
- enum rte_eth_nb_tcs nb_tcs; /**< Possible DCB TCs, 4 or 8 TCs */
- /** Traffic class each UP mapped to. */
- uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
-};
-
-struct rte_eth_vmdq_dcb_tx_conf {
- enum rte_eth_nb_pools nb_queue_pools; /**< With DCB, 16 or 32 pools. */
- /** Traffic class each UP mapped to. */
- uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
-};
-
-struct rte_eth_dcb_tx_conf {
- enum rte_eth_nb_tcs nb_tcs; /**< Possible DCB TCs, 4 or 8 TCs. */
- /** Traffic class each UP mapped to. */
- uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
-};
-
-struct rte_eth_vmdq_tx_conf {
- enum rte_eth_nb_pools nb_queue_pools; /**< VMDq mode, 64 pools. */
-};
-
-struct rte_eth_vmdq_rx_conf {
- enum rte_eth_nb_pools nb_queue_pools; /**< VMDq only mode, 8 or 64 pools */
- uint8_t enable_default_pool; /**< If non-zero, use a default pool */
- uint8_t default_pool; /**< The default pool, if applicable */
- uint8_t enable_loop_back; /**< Enable VT loop back */
- uint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */
- uint32_t rx_mode; /**< Flags from ETH_VMDQ_ACCEPT_* */
- struct {
- uint16_t vlan_id; /**< The vlan id of the received frame */
- uint64_t pools; /**< Bitmask of pools for packet rx */
- } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */
-};
-
-/**
- * Flow Director setting modes: none, signature or perfect.
- */
-enum rte_fdir_mode {
- RTE_FDIR_MODE_NONE = 0, /**< Disable FDIR support. */
- RTE_FDIR_MODE_SIGNATURE, /**< Enable FDIR signature filter mode. */
- RTE_FDIR_MODE_PERFECT, /**< Enable FDIR perfect filter mode. */
- RTE_FDIR_MODE_PERFECT_MAC_VLAN, /**< Enable FDIR filter mode - MAC VLAN. */
- RTE_FDIR_MODE_PERFECT_TUNNEL, /**< Enable FDIR filter mode - tunnel. */
-};
-
-/**
- * Memory space that can be configured to store Flow Director filters
- * in the board memory.
- */
-enum rte_fdir_pballoc_type {
- RTE_FDIR_PBALLOC_64K = 0, /**< 64k. */
- RTE_FDIR_PBALLOC_128K, /**< 128k. */
- RTE_FDIR_PBALLOC_256K, /**< 256k. */
-};
-
-/**
- * Select report mode of FDIR hash information in RX descriptors.
- */
-enum rte_fdir_status_mode {
- RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
- RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
- RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
-};
-
-/**
- * A structure used to define the input for IPV4 flow
- */
-struct rte_eth_ipv4_flow {
- uint32_t src_ip; /**< IPv4 source address in big endian. */
- uint32_t dst_ip; /**< IPv4 destination address in big endian. */
- uint8_t tos; /**< Type of service to match. */
- uint8_t ttl; /**< Time to live to match. */
- uint8_t proto; /**< Protocol, next header in big endian. */
-};
-
-/**
- * A structure used to define the input for IPV6 flow
- */
-struct rte_eth_ipv6_flow {
- uint32_t src_ip[4]; /**< IPv6 source address in big endian. */
- uint32_t dst_ip[4]; /**< IPv6 destination address in big endian. */
- uint8_t tc; /**< Traffic class to match. */
- uint8_t proto; /**< Protocol, next header to match. */
- uint8_t hop_limits; /**< Hop limits to match. */
-};
-
-/**
- * A structure used to configure FDIR masks that are used by the device
- * to match the various fields of RX packet headers.
- */
-struct rte_eth_fdir_masks {
- uint16_t vlan_tci_mask; /**< Bit mask for vlan_tci in big endian */
- /** Bit mask for ipv4 flow in big endian. */
- struct rte_eth_ipv4_flow ipv4_mask;
- /** Bit maks for ipv6 flow in big endian. */
- struct rte_eth_ipv6_flow ipv6_mask;
- /** Bit mask for L4 source port in big endian. */
- uint16_t src_port_mask;
- /** Bit mask for L4 destination port in big endian. */
- uint16_t dst_port_mask;
- /** 6 bit mask for proper 6 bytes of Mac address, bit 0 matches the
- first byte on the wire */
- uint8_t mac_addr_byte_mask;
- /** Bit mask for tunnel ID in big endian. */
- uint32_t tunnel_id_mask;
- uint8_t tunnel_type_mask; /**< 1 - Match tunnel type,
- 0 - Ignore tunnel type. */
-};
-
-/**
- * Payload type
- */
-enum rte_eth_payload_type {
- RTE_ETH_PAYLOAD_UNKNOWN = 0,
- RTE_ETH_RAW_PAYLOAD,
- RTE_ETH_L2_PAYLOAD,
- RTE_ETH_L3_PAYLOAD,
- RTE_ETH_L4_PAYLOAD,
- RTE_ETH_PAYLOAD_MAX = 8,
-};
-
-#define RTE_ETH_FDIR_MAX_FLEXLEN 16 /**< Max length of flexbytes. */
-#define RTE_ETH_INSET_SIZE_MAX 128 /**< Max length of input set. */
-
-/**
- * A structure used to select bytes extracted from the protocol layers to
- * flexible payload for filter
- */
-struct rte_eth_flex_payload_cfg {
- enum rte_eth_payload_type type; /**< Payload type */
- uint16_t src_offset[RTE_ETH_FDIR_MAX_FLEXLEN];
- /**< Offset in bytes from the beginning of packet's payload
- src_offset[i] indicates the flexbyte i's offset in original
- packet payload. This value should be less than
- flex_payload_limit in struct rte_eth_fdir_info.*/
-};
-
-/**
- * A structure used to define FDIR masks for flexible payload
- * for each flow type
- */
-struct rte_eth_fdir_flex_mask {
- uint16_t flow_type;
- uint8_t mask[RTE_ETH_FDIR_MAX_FLEXLEN];
- /**< Mask for the whole flexible payload */
-};
-
-
-/*
- * A packet can be identified by hardware as different flow types. Different
- * NIC hardwares may support different flow types.
- * Basically, the NIC hardware identifies the flow type as deep protocol as
- * possible, and exclusively. For example, if a packet is identified as
- * 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow types,
- * though it is an actual IPV4 packet.
- * Note that the flow types are used to define RSS offload types in
- * rte_ethdev.h.
- */
-#define RTE_ETH_FLOW_UNKNOWN 0
-#define RTE_ETH_FLOW_RAW 1
-#define RTE_ETH_FLOW_IPV4 2
-#define RTE_ETH_FLOW_FRAG_IPV4 3
-#define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4
-#define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5
-#define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6
-#define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7
-#define RTE_ETH_FLOW_IPV6 8
-#define RTE_ETH_FLOW_FRAG_IPV6 9
-#define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10
-#define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11
-#define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12
-#define RTE_ETH_FLOW_NONFRAG_IPV6_OTHER 13
-#define RTE_ETH_FLOW_L2_PAYLOAD 14
-#define RTE_ETH_FLOW_IPV6_EX 15
-#define RTE_ETH_FLOW_IPV6_TCP_EX 16
-#define RTE_ETH_FLOW_IPV6_UDP_EX 17
-#define RTE_ETH_FLOW_PORT 18
- /**< Consider device port number as a flow differentiator */
-#define RTE_ETH_FLOW_VXLAN 19 /**< VXLAN protocol based flow */
-#define RTE_ETH_FLOW_GENEVE 20 /**< GENEVE protocol based flow */
-#define RTE_ETH_FLOW_NVGRE 21 /**< NVGRE protocol based flow */
-#define RTE_ETH_FLOW_MAX 22
-
-/**
- * A structure used to define all flexible payload related setting
- * include flex payload and flex mask
- */
-struct rte_eth_fdir_flex_conf {
- uint16_t nb_payloads; /**< The number of following payload cfg */
- uint16_t nb_flexmasks; /**< The number of following mask */
- struct rte_eth_flex_payload_cfg flex_set[RTE_ETH_PAYLOAD_MAX];
- /**< Flex payload configuration for each payload type */
- struct rte_eth_fdir_flex_mask flex_mask[RTE_ETH_FLOW_MAX];
- /**< Flex mask configuration for each flow type */
-};
-
-/**
- * A structure used to configure the Flow Director (FDIR) feature
- * of an Ethernet port.
- *
- * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored.
- */
-struct rte_fdir_conf {
- enum rte_fdir_mode mode; /**< Flow Director mode. */
- enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
- enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
- /** RX queue of packets matching a "drop" filter in perfect mode. */
- uint8_t drop_queue;
- struct rte_eth_fdir_masks mask;
- struct rte_eth_fdir_flex_conf flex_conf;
- /**< Flex payload configuration. */
-};
-
-/**
- * A structure used to enable/disable specific device interrupts.
- */
-struct rte_intr_conf {
- /** enable/disable lsc interrupt. 0 (default) - disable, 1 enable */
- uint16_t lsc;
- /** enable/disable rxq interrupt. 0 (default) - disable, 1 enable */
- uint16_t rxq;
-};
-
-/**
- * A structure used to configure an Ethernet port.
- * Depending upon the RX multi-queue mode, extra advanced
- * configuration settings may be needed.
- */
-struct rte_eth_conf {
- uint32_t link_speeds; /**< bitmap of ETH_LINK_SPEED_XXX of speeds to be
- used. ETH_LINK_SPEED_FIXED disables link
- autonegotiation, and a unique speed shall be
- set. Otherwise, the bitmap defines the set of
- speeds to be advertised. If the special value
- ETH_LINK_SPEED_AUTONEG (0) is used, all speeds
- supported are advertised. */
- struct rte_eth_rxmode rxmode; /**< Port RX configuration. */
- struct rte_eth_txmode txmode; /**< Port TX configuration. */
- uint32_t lpbk_mode; /**< Loopback operation mode. By default the value
- is 0, meaning the loopback mode is disabled.
- Read the datasheet of given ethernet controller
- for details. The possible values of this field
- are defined in implementation of each driver. */
- struct {
- struct rte_eth_rss_conf rss_conf; /**< Port RSS configuration */
- struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf;
- /**< Port vmdq+dcb configuration. */
- struct rte_eth_dcb_rx_conf dcb_rx_conf;
- /**< Port dcb RX configuration. */
- struct rte_eth_vmdq_rx_conf vmdq_rx_conf;
- /**< Port vmdq RX configuration. */
- } rx_adv_conf; /**< Port RX filtering configuration (union). */
- union {
- struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
- /**< Port vmdq+dcb TX configuration. */
- struct rte_eth_dcb_tx_conf dcb_tx_conf;
- /**< Port dcb TX configuration. */
- struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
- /**< Port vmdq TX configuration. */
- } tx_adv_conf; /**< Port TX DCB configuration (union). */
- /** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
- is needed,and the variable must be set ETH_DCB_PFC_SUPPORT. */
- uint32_t dcb_capability_en;
- struct rte_fdir_conf fdir_conf; /**< FDIR configuration. */
- struct rte_intr_conf intr_conf; /**< Interrupt mode configuration. */
-};
diff --git a/tests/headers/layout_mbuf.h b/tests/headers/layout_mbuf.h
index 0bb653b0..dc1c1b24 100644
--- a/tests/headers/layout_mbuf.h
+++ b/tests/headers/layout_mbuf.h
@@ -1,3 +1,4 @@
+
#define RTE_CACHE_LINE_MIN_SIZE 64 /**< Minimum Cache line size. */
#define RTE_CACHE_LINE_SIZE 64
@@ -183,4 +184,4 @@ struct rte_mbuf {
/** Timesync flags for use with IEEE1588. */
uint16_t timesync;
-} __rte_cache_aligned;
+} __rte_cache_aligned; \ No newline at end of file
diff --git a/tests/headers/layout_mbuf_1_0.h b/tests/headers/layout_mbuf_1_0.h
deleted file mode 100644
index ab8bbb54..00000000
--- a/tests/headers/layout_mbuf_1_0.h
+++ /dev/null
@@ -1,189 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-
-#define RTE_CACHE_LINE_MIN_SIZE 64 /**< Minimum Cache line size. */
-
-#define RTE_CACHE_LINE_SIZE 64
-
-typedef char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-typedef long long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-
-typedef uint64_t phys_addr_t;
-
-/**
- * Force alignment
- */
-#define __rte_aligned(a) __attribute__((__aligned__(a)))
-
-/**
- * Force alignment to cache line.
- */
-#define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE)
-
-/**
- * Force minimum cache line alignment.
- */
-#define __rte_cache_min_aligned __rte_aligned(RTE_CACHE_LINE_MIN_SIZE)
-
-/* define a set of marker types that can be used to refer to set points in the
- * mbuf */
-__extension__
-typedef void *MARKER[0]; /**< generic marker for a point in a structure */
-__extension__
-typedef uint8_t MARKER8[0]; /**< generic marker with 1B alignment */
-__extension__
-typedef uint64_t MARKER64[0]; /**< marker that allows us to overwrite 8 bytes
- * with a single assignment */
-
-/** C extension macro for environments lacking C11 features. */
-#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
-#define RTE_STD_C11 __extension__
-#else
-#define RTE_STD_C11
-#endif
-
-/**
- * The atomic counter structure.
- */
-typedef struct {
- volatile int16_t cnt; /**< An internal counter value. */
-} rte_atomic16_t;
-
-/**
- * The generic rte_mbuf, containing a packet mbuf.
- */
-struct rte_mbuf {
- MARKER cacheline0;
-
- void *buf_addr; /**< Virtual address of segment buffer. */
- phys_addr_t buf_physaddr; /**< Physical address of segment buffer. */
-
- uint16_t buf_len; /**< Length of segment buffer. */
-
- /* next 6 bytes are initialised on RX descriptor rearm */
- MARKER8 rearm_data;
- uint16_t data_off;
-
- /**
- * 16-bit Reference counter.
- * It should only be accessed using the following functions:
- * rte_mbuf_refcnt_update(), rte_mbuf_refcnt_read(), and
- * rte_mbuf_refcnt_set(). The functionality of these functions (atomic,
- * or non-atomic) is controlled by the CONFIG_RTE_MBUF_REFCNT_ATOMIC
- * config option.
- */
- RTE_STD_C11
- union {
- rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */
- uint16_t refcnt; /**< Non-atomically accessed refcnt */
- };
- uint8_t nb_segs; /**< Number of segments. */
- uint8_t port; /**< Input port. */
-
- uint64_t ol_flags; /**< Offload features. */
-
- /* remaining bytes are set on RX when pulling packet from descriptor */
- MARKER rx_descriptor_fields1;
-
- /*
- * The packet type, which is the combination of outer/inner L2, L3, L4
- * and tunnel types. The packet_type is about data really present in the
- * mbuf. Example: if vlan stripping is enabled, a received vlan packet
- * would have RTE_PTYPE_L2_ETHER and not RTE_PTYPE_L2_VLAN because the
- * vlan is stripped from the data.
- */
- RTE_STD_C11
- union {
- uint32_t packet_type; /**< L2/L3/L4 and tunnel information. */
- struct {
- uint32_t l2_type:4; /**< (Outer) L2 type. */
- uint32_t l3_type:4; /**< (Outer) L3 type. */
- uint32_t l4_type:4; /**< (Outer) L4 type. */
- uint32_t tun_type:4; /**< Tunnel type. */
- uint32_t inner_l2_type:4; /**< Inner L2 type. */
- uint32_t inner_l3_type:4; /**< Inner L3 type. */
- uint32_t inner_l4_type:4; /**< Inner L4 type. */
- };
- };
-
- uint32_t pkt_len; /**< Total pkt len: sum of all segments. */
- uint16_t data_len; /**< Amount of data in segment buffer. */
- /** VLAN TCI (CPU order), valid if PKT_RX_VLAN_STRIPPED is set. */
- uint16_t vlan_tci;
-
- union {
- uint32_t rss; /**< RSS hash result if RSS enabled */
- struct {
- RTE_STD_C11
- union {
- struct {
- uint16_t hash;
- uint16_t id;
- };
- uint32_t lo;
- /**< Second 4 flexible bytes */
- };
- uint32_t hi;
- /**< First 4 flexible bytes or FD ID, dependent on
- PKT_RX_FDIR_* flag in ol_flags. */
- } fdir; /**< Filter identifier if FDIR enabled */
- struct {
- uint32_t lo;
- uint32_t hi;
- } sched; /**< Hierarchical scheduler */
- uint32_t usr; /**< User defined tags. See rte_distributor_process() */
- } hash; /**< hash information */
-
- uint32_t seqn; /**< Sequence number. See also rte_reorder_insert() */
-
- /** Outer VLAN TCI (CPU order), valid if PKT_RX_QINQ_STRIPPED is set. */
- uint16_t vlan_tci_outer;
-
- /* second cache line - fields only used in slow path or on TX */
- MARKER cacheline1 __rte_cache_min_aligned;
-
- RTE_STD_C11
- union {
- void *userdata; /**< Can be used for external metadata */
- uint64_t udata64; /**< Allow 8-byte userdata on 32-bit */
- };
-
- struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */
- struct rte_mbuf *next; /**< Next segment of scattered packet. */
-
- /* fields to support TX offloads */
- RTE_STD_C11
- union {
- uint64_t tx_offload; /**< combined for easy fetch */
- __extension__
- struct {
- uint64_t l2_len:7;
- /**< L2 (MAC) Header Length for non-tunneling pkt.
- * Outer_L4_len + ... + Inner_L2_len for tunneling pkt.
- */
- uint64_t l3_len:9; /**< L3 (IP) Header Length. */
- uint64_t l4_len:8; /**< L4 (TCP/UDP) Header Length. */
- uint64_t tso_segsz:16; /**< TCP TSO segment size */
-
- /* fields for TX offloading of tunnels */
- uint64_t outer_l3_len:9; /**< Outer L3 (IP) Hdr Length. */
- uint64_t outer_l2_len:7; /**< Outer L2 (MAC) Hdr Length. */
-
- /* uint64_t unused:8; */
- };
- };
-
- /** Size of the application private data. In case of an indirect
- * mbuf, it stores the direct mbuf private data size. */
- uint16_t priv_size;
-
- /** Timesync flags for use with IEEE1588. */
- uint16_t timesync;
-} __rte_cache_aligned;
diff --git a/tests/headers/struct_with_anon_union_1_0.h b/tests/headers/struct_with_anon_union_1_0.h
deleted file mode 100644
index 5cedd4a3..00000000
--- a/tests/headers/struct_with_anon_union_1_0.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-struct foo {
- union {
- unsigned int a;
- unsigned short b;
- } bar;
-};
diff --git a/tests/headers/struct_with_anon_unnamed_union_1_0.h b/tests/headers/struct_with_anon_unnamed_union_1_0.h
deleted file mode 100644
index 99ee6a2e..00000000
--- a/tests/headers/struct_with_anon_unnamed_union_1_0.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-struct foo {
- union {
- unsigned int a;
- unsigned short b;
- };
-};
diff --git a/tests/headers/struct_with_nesting_1_0.h b/tests/headers/struct_with_nesting_1_0.h
deleted file mode 100644
index c5fbae46..00000000
--- a/tests/headers/struct_with_nesting_1_0.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-struct foo {
- unsigned int a;
- union {
- unsigned int b;
- struct {
- unsigned short c1;
- unsigned short c2;
- };
-
- struct {
- unsigned char d1;
- unsigned char d2;
- unsigned char d3;
- unsigned char d4;
- };
- };
-};
diff --git a/tests/headers/typeref_1_0.hpp b/tests/headers/typeref_1_0.hpp
deleted file mode 100644
index 4a54d9b0..00000000
--- a/tests/headers/typeref_1_0.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-struct nsFoo;
-
-namespace mozilla {
-
-struct FragmentOrURL { bool mIsLocalRef; };
-struct Position { };
-
-} // namespace mozilla
-
-class Bar {
- nsFoo* mFoo;
-};
-
-namespace mozilla {
-
-template<typename ReferenceBox>
-struct StyleShapeSource {
- union {
- Position* mPosition;
- FragmentOrURL* mFragmentOrURL;
- };
-};
-
-} // namespace mozilla
-
-struct nsFoo {
- mozilla::StyleShapeSource<int> mBar;
-};
diff --git a/tests/headers/union-in-ns_1_0.hpp b/tests/headers/union-in-ns_1_0.hpp
deleted file mode 100644
index f3ae2210..00000000
--- a/tests/headers/union-in-ns_1_0.hpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// bindgen-flags: --rust-target 1.0 --enable-cxx-namespaces
-
-union bar {
- int baz;
-};
diff --git a/tests/headers/union_dtor_1_0.hpp b/tests/headers/union_dtor_1_0.hpp
deleted file mode 100644
index 01f76366..00000000
--- a/tests/headers/union_dtor_1_0.hpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union UnionWithDtor {
- ~UnionWithDtor();
- int mFoo;
- void* mBar;
-};
diff --git a/tests/headers/union_fields_1_0.hpp b/tests/headers/union_fields_1_0.hpp
deleted file mode 100644
index fdf94ed7..00000000
--- a/tests/headers/union_fields_1_0.hpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-typedef union {
- int mInt;
- float mFloat;
- void* mPointer;
-} nsStyleUnion;
diff --git a/tests/headers/union_template_1_0.hpp b/tests/headers/union_template_1_0.hpp
deleted file mode 100644
index 53df1175..00000000
--- a/tests/headers/union_template_1_0.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-template<typename T>
-struct NastyStruct {
- bool mIsSome;
- union {
- void* mFoo;
- unsigned long mDummy;
- } mStorage;
-
- union {
- short wat;
- int* wut;
- };
-};
-
-template<typename T>
-union Whatever {
- void* mTPtr;
- int mInt;
-};
diff --git a/tests/headers/union_with_anon_struct_1_0.h b/tests/headers/union_with_anon_struct_1_0.h
deleted file mode 100644
index 2672f542..00000000
--- a/tests/headers/union_with_anon_struct_1_0.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union foo {
- struct {
- unsigned int a;
- unsigned int b;
- } bar;
-};
diff --git a/tests/headers/union_with_anon_struct_bitfield_1_0.h b/tests/headers/union_with_anon_struct_bitfield_1_0.h
deleted file mode 100644
index 168b9bae..00000000
--- a/tests/headers/union_with_anon_struct_bitfield_1_0.h
+++ /dev/null
@@ -1,9 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union foo {
- int a;
- struct {
- int b : 7;
- int c : 25;
- };
-};
diff --git a/tests/headers/union_with_anon_union_1_0.h b/tests/headers/union_with_anon_union_1_0.h
deleted file mode 100644
index 898da16d..00000000
--- a/tests/headers/union_with_anon_union_1_0.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union foo {
- union {
- unsigned int a;
- unsigned short b;
- } bar;
-};
diff --git a/tests/headers/union_with_anon_unnamed_struct_1_0.h b/tests/headers/union_with_anon_unnamed_struct_1_0.h
deleted file mode 100644
index f086e765..00000000
--- a/tests/headers/union_with_anon_unnamed_struct_1_0.h
+++ /dev/null
@@ -1,11 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union pixel {
- unsigned int rgba;
- struct {
- unsigned char r;
- unsigned char g;
- unsigned char b;
- unsigned char a;
- };
-};
diff --git a/tests/headers/union_with_anon_unnamed_union_1_0.h b/tests/headers/union_with_anon_unnamed_union_1_0.h
deleted file mode 100644
index bbc2f6b4..00000000
--- a/tests/headers/union_with_anon_unnamed_union_1_0.h
+++ /dev/null
@@ -1,9 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union foo {
- unsigned int a;
- union {
- unsigned short b;
- unsigned char c;
- };
-};
diff --git a/tests/headers/union_with_big_member_1_0.h b/tests/headers/union_with_big_member_1_0.h
deleted file mode 100644
index e1faa402..00000000
--- a/tests/headers/union_with_big_member_1_0.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union WithBigArray {
- int a;
- int b[33];
-};
-
-union WithBigArray2 {
- int a;
- char b[33];
-};
-
-union WithBigMember {
- int a;
- union WithBigArray b;
-};
diff --git a/tests/headers/union_with_nesting_1_0.h b/tests/headers/union_with_nesting_1_0.h
deleted file mode 100644
index 4bd34574..00000000
--- a/tests/headers/union_with_nesting_1_0.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// bindgen-flags: --rust-target 1.0
-
-union foo {
- unsigned int a;
- struct {
- union {
- unsigned short b1;
- unsigned short b2;
- };
-
- union {
- unsigned short c1;
- unsigned short c2;
- };
- };
-};
diff --git a/tests/headers/use-core_1_0.h b/tests/headers/use-core_1_0.h
deleted file mode 100644
index afa54d42..00000000
--- a/tests/headers/use-core_1_0.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// bindgen-flags: --rust-target 1.0 --use-core --raw-line "extern crate core;"
-
-struct foo {
- int a, b;
- void* bar;
-};
-
-union {
- int bar;
- long baz;
-} bazz;
-
-typedef void (*fooFunction)(int bar);