#ifndef TRAFGEN_CONF #define TRAFGEN_CONF #include #include #include #include #include "trafgen_proto.h" #define PROTO_MAX_LAYERS 16 #define TYPE_INC 0 #define TYPE_DEC 1 enum csum { CSUM_IP, CSUM_UDP, CSUM_TCP, CSUM_UDP6, CSUM_TCP6, CSUM_ICMP6, }; struct counter { int type, inc; uint8_t min, max, val; off_t off; }; struct randomizer { off_t off; }; struct csum16 { off_t off, from, to; enum csum which; }; struct packet { uint32_t id; uint8_t *payload; size_t len; struct proto_hdr *headers[PROTO_MAX_LAYERS]; size_t headers_count; struct timespec tstamp; bool is_created; }; struct packet_dyn { struct counter *cnt; size_t clen; struct randomizer *rnd; size_t rlen; struct csum16 *csum; size_t slen; struct proto_field **fields; size_t flen; }; static inline bool packet_dyn_has_elems(struct packet_dyn *p) { return (p->clen || p->rlen || p->slen); } static inline bool packet_dyn_has_only_csums(struct packet_dyn *p) { return (p->clen == 0 && p->rlen == 0 && p->slen); } static inline bool packet_dyn_has_fields(struct packet_dyn *p) { return p->flen; } extern void compile_packets_str(char *str, bool verbose, unsigned int cpu); extern void compile_packets(char *file, bool verbose, unsigned int cpu, bool invoke_cpp, char *const cpp_argv[]); extern void cleanup_packets(void); extern void set_fill(uint8_t val, size_t len); extern struct packet *current_packet(void); extern uint32_t current_packet_id(void); extern struct packet *packet_get(uint32_t id); extern struct packet *realloc_packet(void); #endif /* TRAFGEN_CONF */ .git/refs/?id=ec026b5020688a8bde5fae9a69ae3c59b66ba3ae'>refslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-01-27 16:46:51 +0100
committerArnd Bergmann <arnd@arndb.de>2017-01-27 16:46:51 +0100
commitec026b5020688a8bde5fae9a69ae3c59b66ba3ae (patch)
treef476a1a9970af763720bd64b090879fc9874dbcf
parentbba8e3f42736cf7f974968a818e53b128286ad1d (diff)
parenta971c5545c3d45a1e33fda6e57913bb75aaa20c9 (diff)
Merge tag 'imx-fixes-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into HEAD
Pull "i.MX fixes for 4.10, 3rd round" from Shawn Guo: - Fix a 'defined but not used' warning in MMDC driver when CONFIG_PERF_EVENTS is disabled. - Fix i.MX6DL device tree GPIO4_11 range setting. - A bandaid fix for boot failure found on a couple of platforms due to missing 'chosen' and 'memory' node. * tag 'imx-fixes-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx: Pass 'chosen' and 'memory' nodes ARM: dts: imx6dl: fix GPIO4 range ARM: imx: hide unused variable in #ifdef