* [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device
@ 2017-11-30 8:01 Ophir Munk
2017-11-30 8:01 ` [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions Ophir Munk
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Ophir Munk @ 2017-11-30 8:01 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, Olga Shern, Pascal Mazon, Ophir Munk
The DPDK traffic classifier is the rte_flow API and the tap PMD
must support it including RSS queue mapping actions.
An example usage for this requirement is failsafe transparent
switching from a PCI device to TAP device while RSS queues are the
same on both devices.
TC was chosen as TAP classifier but TC alone does not support RSS
queue mapping. This commit uses a combination of TC rules and eBPF
actions in order to support TAP RSS.
eBPF requires Linux version 3.19. eBPF is effective only when running
with an appropriate kernel version. It must be compiled with the
appropriate Linux kernel headers. In case the kernel headers do
not include eBPF definitions a warning will be issued during
compilation time and TAP RSS will not be supported.
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
The DPDK traffic classifier is the rte_flow API and the tap PMD
must support it including RSS queue mapping actions.
An example usage for this requirement is failsafe transparent
switching from a PCI device to TAP device while RSS queues are the
same on both devices.
TC was chosen as TAP classifier but TC alone does not support RSS
queue mapping. This RFC suggests using a combination of TC rules and eBPF
actions in order to support TAP RSS.
eBPF requires Linux version 3.19. eBPF is effective only when running
with an appropriate kernel version. It must be compiled with the
appropriate Linux kernel headers. In case the kernel headers do
not include eBPF definitions a warning will be issued during
compilation time and TAP RSS will not be supported.
The C source file (tap_bpf_insns.c) includes eBPF "assembly
instructions" in the format of an array of struct bpf_insns.
This array is passed to the kernel for execution in BPF system call.
The C language source file (tap_bpf_program.c) from which the
"assembly instructions" were generated is included in TAP source tree,
however it does not take part in dpdk compilation.
TAP documentation will detail the process of eBPF "assembly instructions"
generation.
eBPF programs controlled from tap PMD will be used to match packets, compute a
hash given the configured key, and send packets using the desired queue.
In an eBPF program, it is typically not possible to edit the queue_mapping field
in skb to direct the packet in the correct queue. That part would be addressed by
chaining a ``skbedit queue_mapping`` action.
A packet would go through these TC rules (on the local side of the tap netdevice):
+-----+---------------------------+----------------------------------+----------+
|PRIO | Match | Action 1 | Action 2 |
+=====+===========================+==================================+==========+
| 1 | marked? | skbedit queue 'mark' --> DPDK | |
+-----+---------------------------+----------------------------------+----------+
| 2 | marked? | skbedit queue 'mark' --> DPDK | |
+-----+---------------------------+----------------------------------+----------+
| ... | | | |
+-----+---------------------------+----------------------------------+----------+
| x | ANY | BPF: append NULL 32bits for hash | |
| | | | |
+-----+---------------------------+----------------------------------+----------+
|x + 1| ACTUAL FLOW RULE 1 MATCH | ... | |
| | | | |
+-----+---------------------------+----------------------------------+----------+
|x + 2| ACTUAL FLOW RULE 2 MATCH | ... | |
| | | | |
+-----+---------------------------+----------------------------------+----------+
| ... | | | |
+-----+---------------------------+----------------------------------+----------+
| BPF compute hash into packet |reclassify|
| | | tailroom && set queue in skb->cb | |
+-----+---------------------------+----------------------------------+----------+
| BPF compute hash into packet |reclassify|
| | | tailroom && set queue in skb->cb | |
+-----+---------------------------+----------------------------------+----------+
| ... | | | |
+-----+---------------------------+----------------------------------+----------+
| BPF compute hash into packet |reclassify|
| | | tailroom && set queue in skb->cb | |
+-----+---------------------------+----------------------------------+----------+
| z | ANY (isolate mode) | DROP | |
+-----+---------------------------+----------------------------------+----------+
Rules 1..x will match marked packets and will redirect them to their queues however
on first classification packets are not marked there will not be redirected.
Only when going later through RSS rules y..z BPF computes RSS hash,
sets queue in dkb->cb, and reclassifies packets. Then packets are classified again
through rules 1-x while being marked and will be redirected.
Rules (x+1)..y are non-RSS TC rules already used in dpdk versions prior to 18.02
doc/guides/prog_guide/rte_flow_tap.rst | 962 +++++++++++++++++++++++++++++++++
drivers/net/tap/Makefile | 6 +-
drivers/net/tap/rte_eth_tap.h | 7 +-
drivers/net/tap/tap_bpf_elf.h | 56 ++
drivers/net/tap/tap_flow.c | 336 ++++++++----
5 files changed, 1263 insertions(+), 104 deletions(-)
create mode 100644 doc/guides/prog_guide/rte_flow_tap.rst
create mode 100644 drivers/net/tap/tap_bpf_elf.h
diff --git a/doc/guides/prog_guide/rte_flow_tap.rst b/doc/guides/prog_guide/rte_flow_tap.rst
new file mode 100644
index 0000000..04ddda6
--- /dev/null
+++ b/doc/guides/prog_guide/rte_flow_tap.rst
@@ -0,0 +1,962 @@
+=====================================
+Flow API support in TAP PMD, using TC
+=====================================
+
+.. contents::
+.. sectnum::
+
+.. footer::
+
+ v0.8 - page ###Page###
+
+.. raw:: pdf
+
+ PageBreak
+
+Rationale
+=========
+
+For this project, the tap PMD has to receive selected traffic from a different
+netdevice (refer to *VM migration with Microsoft Hyper-V and Mellanox
+ConnectX-3* document) and only cover the same set of rules as supported by the
+mlx4 PMD.
+
+The DPDK traffic classifier is the rte_flow API, and the tap PMD must therefore
+implement it. For that, TC was chosen for several reasons:
+
+- it happens very early in the kernel stack for ingress (faster than netfilter).
+- it supports dropping packets given a specific flow.
+- it supports redirecting packets to a different netdevice.
+- it has a "flower" classifier type that meets mostly the pattern items in
+ rte_flow.
+- it can be configured through a netlink socket, without an external tool.
+
+Modes of operation
+==================
+
+There should be two modes of operation for the tap PMD regarding rte_flow:
+*local* and *remote*. Only one mode can be in use at a time for a specific tap
+interface.
+
+The *local* mode would be the default one, if no specific parameter is specified
+in the command line. To start the application with tap in *remote* mode, set the
+``remote`` tap parameter to the interface you want to redirect packets from,
+e.g.::
+
+ testpmd -n 4 -c 0xf -m 1024 --vdev=net_tap,iface=tap0,remote=eth3 -- \
+ -i --burst=64 --coremask=0x2
+
+*Local* mode
+------------
+
+In *local* mode, flow rules would be applied as-is, on the tap netdevice itself
+(e.g.: ``tap0``).
+
+The typical use-case is having a linux program (e.g. a webserver) communicating
+with the DPDK app through the tap netdevice::
+
+ +-------------------------+
+ | DPDK application |
+ +-------------------------+
+ | ^
+ | rte_flow rte_flow |
+ v egress ingress |
+ +-------------------------+
+ | Tap PMD |
+ +-------------------------+
+ | ^
+ | TC TC |
+ v ingress egress |
+ +-------------------------+ +-------------------------+
+ | |<-------------| |
+ | Tap netdevice (tap0) | | Linux app (webserver) |
+ | |------------->| |
+ +-------------------------+ +-------------------------+
+
+.. raw:: pdf
+
+ PageBreak
+
+*Remote* mode
+-------------
+
+In *remote* mode, flow rules would be applied on the tap netdevice (e.g.:
+``tap0``), and use a similar match to redirect specific packets from another
+netdevice (e.g.: ``eth3``, a NetVSC netdevice in our project scenario)::
+
+ +-------------------------+
+ | DPDK application |
+ +-------------------------+
+ | ^
+ | rte_flow rte_flow |
+ v egress ingress |
+ +-------------------------+
+ | Tap PMD |
+ +-------------------------+
+ | ^
+ | TC TC |
+ v ingress egress |
+ +-------------------------+ +-------------------------+
+ | |<------------------redirection-------\ |
+ | Tap netdevice (tap0) | | | |
+ | |------------->|-\ eth3 | |
+ +-------------------------+ +--|--------------------|-+
+ | TC TC ^
+ | egress ingress |
+ v |
+
+.. raw:: pdf
+
+ PageBreak
+
+rte_flow rules conversion
+=========================
+
+Netlink
+-------
+
+The only way to create TC rules in the kernel is through netlink messages.
+Two possibilities arise for managing TC rules:
+
+- Using native netlink API calls in the tap PMD
+- Calling the ``tc`` command from iproute2 inside our PMD, via ``system()``.
+
+The former will be done, as library calls are faster than changing context and
+executing an external program from within the tap PMD. Moreover, the kernel TC
+API might propose features not yet implemented in iproute2. Furthermore, a
+custom implementation enables finer tuning and better control.
+
+..
+ Some implementations for TC configuration through Netlink exist already. It's a
+ good source of inspiration on how to do it:
+
+ - iproute2's tc `source code`__
+ - ovs's tc implementation__ (not yet upstream)
+
+ __ https://github.com/shemminger/iproute2/tree/master/tc
+ __ https://mail.openvswitch.org/pipermail/ovs-dev/2016-November/324693.html
+
+Conversion examples
+-------------------
+
+Here are a few examples of rules and how they can be translated from rte_flow
+rules to TC rules. rte_flow rules will be expressed using testpmd's ``flow``
+command syntax, while TC rules will use iproute2 ``tc`` command syntax.
+
+**Notes**:
+ - rte_flow ``ingress`` direction can be translated into a TC ``egress`` rule,
+ and vice versa, when it applies to a tap interface, as TC considers the
+ kernel netdevice standpoint.
+ - in TC, redirecting a packet works by taking a packet from ``ingress`` and
+ sending to another device's ``egress``.
+
+*Local* mode
+~~~~~~~~~~~~
+
+#. Flow rule to give packets coming on the ``tap0`` interface to RX queue 0:
+
+ Using rte_flow::
+
+ flow validate 0 ingress pattern port index is 0 / end \
+ actions queue index 0 / end
+
+ Using ``tc``::
+
+ tc filter add dev tap0 parent 1: flower indev tap0 \
+ action skbedit queue_mapping 0
+
+#. Flow rule to get packets with source mac ``de:ad:ca:fe:00:02`` on RX queue 2:
+
+ Using rte_flow::
+
+ flow create 0 ingress pattern eth src is de:ad:ca:fe:00:02 / end \
+ actions queue 2 / end
+
+ Using ``tc``::
+
+ tc filter add dev tap0 parent 1: flower src_mac de:ad:ca:fe:00:02 \
+ action skbedit queue_mapping 2
+
+#. Flow rule to drop packets matching specific 5-tuple info:
+
+ Using rte_flow::
+
+ flow create 0 ingress pattern eth dst is 3a:80:ce:61:36:54 \
+ src is 52:43:7b:fd:ac:f3 / ipv4 src is 1.1.1.1 dst is 2.2.2.2 \
+ / udp src is 4444 dst is 5555 / end actions drop / end
+
+ Using ``tc``::
+
+ tc filter add dev tap0 parent 1: flower dst_mac 3a:80:ce:61:36:54 \
+ src_mac 52:43:7b:fd:ac:f3 eth_type ip src_ip 1.1.1.1 dst_ip 2.2.2.2 \
+ ip_proto udp src_port 4444 dst_port 5555 action drop
+
+*Remote* mode
+~~~~~~~~~~~~~
+
+In *remote* mode, an additional rule for redirecting packet is systematically
+required. The examples are similar to the previous section (the rte_flow rule
+will thus be omitted).
+
+#. TC rules to give packets coming on the ``eth3`` interface to ``tap0`` RX
+ queue 0::
+
+ # redirection rule
+ tc filter add dev eth3 parent ffff: flower indev eth3 \
+ action mirred egress redirect dev tap0
+ # actual tap rule
+ tc filter add dev tap0 parent 1: flower indev tap0 \
+ action skbedit queue_mapping 0
+
+#. TC rules to get packets with source mac ``de:ad:ca:fe:00:02`` on RX queue 2::
+
+ # redirection rule
+ tc filter add dev eth3 parent ffff: flower src_mac de:ad:ca:fe:00:02 \
+ action mirred egress redirect dev tap0
+ # actual tap rule
+ tc filter add dev tap0 parent 1: flower src_mac de:ad:ca:fe:00:02 \
+ action skbedit queue_mapping 2
+
+#. TC rules to drop packets matching specific 5-tuple info::
+
+ # redirection rule
+ tc filter add dev eth3 parent ffff: flower dst_mac 3a:80:ce:61:36:54 \
+ src_mac 52:43:7b:fd:ac:f3 eth_type ip src_ip 1.1.1.1 dst_ip 2.2.2.2 \
+ ip_proto udp src_port 4444 dst_port 5555 \
+ action mirred egress redirect dev tap0
+ # actual tap rule
+ tc filter add dev tap0 parent 1: flower dst_mac 3a:80:ce:61:36:54 \
+ src_mac 52:43:7b:fd:ac:f3 eth_type ip src_ip 1.1.1.1 dst_ip 2.2.2.2 \
+ ip_proto udp src_port 4444 dst_port 5555 action drop
+
+One last thing, to redirect packets the other way around (from ``tap0`` to
+``eth3``), we would use a similar rule, exchanging interfaces and using an
+appropriate match, e.g.::
+
+ tc filter add dev tap0 parent ffff: flower indev tap0 \
+ action mirred egress redirect dev eth3
+
+..
+ **Note:** ``parent ffff:`` is for TC ``ingress`` while ``parent 1:`` is for TC
+ ``egress``.
+
+Broadcast and promiscuous support
++++++++++++++++++++++++++++++++++
+
+*Remote* mode requirements:
+
+#. When turning the tap netdevice promiscuous, the remote netdevice should
+ implicitly be turned promiscuous too, to get as many packets as possible.
+
+#. Packets matching the destination MAC configured in the tap PMD should be
+ redirected from the remote without being processed by the stack there in the
+ kernel.
+
+#. In promiscuous mode, an incoming packet should be duplicated to be processed
+ both by the tap PMD and the remote netdevice itself.
+
+#. Incoming packets with broadcast destination MAC (i.e.: ``ff:ff:ff:ff:ff:ff``)
+ should be duplicated to be processed both by the tap PMD and the remote
+ netdevice itself.
+
+#. Incoming packets with IPv6 multicast destination MAC (i.e.:
+ ``33:33:00:00:00:00/33:33:00:00:00:00``) should be duplicated to be processed
+ both by the tap PMD and the remote netdevice itself.
+
+#. Incoming packets with broadcast/multicast bit set in the destination MAC
+ (i.e.: ``01:00:00:00:00:00/01:00:00:00:00:00``) should be duplicated to be
+ processed both by the tap PMD and the remote netdevice itself.
+
+Each of these requirements (except the first one) can be directly translated
+into a TC rule, e.g.::
+
+ # local mac (notice the REDIRECT for mirred action):
+ tc filter add dev eth3 parent ffff: prio 1 flower dst_mac de:ad:be:ef:01:02 \
+ action mirred egress redirect dev tap0
+
+ # tap promisc:
+ tc filter add dev eth3 parent ffff: prio 2 basic \
+ action mirred egress mirror dev tap0
+
+ # broadcast:
+ tc filter add dev eth3 parent ffff: prio 3 flower dst_mac ff:ff:ff:ff:ff:ff \
+ action mirred egress mirror dev tap0
+
+ # broadcast v6 (can't express mac_mask with tc, but it works via netlink):
+ tc filter add dev eth3 parent ffff: prio 4 flower dst_mac 33:33:00:00:00:00 \
+ action mirred egress mirror dev tap0
+
+ # all_multi (can't express mac_mask with tc, but it works via netlink):
+ tc filter add dev eth3 parent ffff: prio 5 flower dst_mac 01:00:00:00:00:00 \
+ action mirred egress mirror dev tap0
+
+When promiscuous mode is switched off or on, the first TC rule will be modified
+to have respectively an empty action (``continue``) or the ``mirror`` action.
+
+The first 5 priorities are always reserved, and can only be used for these
+filters.
+
+On top of that, the tap PMD can configure explicit rte_flow rules, translated as
+TC rules on both the remote netdevice and the tap netdevice. On the remote,
+those would need to be processed after the default rules handling promiscuous
+mode, broadcast and all_multi packets.
+
+When using the ``mirror`` action, the packet is duplicated and sent to the tap
+netdevice, while the original packet gets directly processed by the kernel
+without going through later TC rules for the remote. On the tap netdevice, the
+duplicated packet will go through tap TC rules and be classified depending on
+those rules.
+
+**Note:** It is possible to combine a ``mirror`` action and a ``continue``
+action for a single TC rule. Then the original packet would undergo remaining TC
+rules on the remote netdevice side.
+
+When using the ``redirect`` action, the behavior is similar on the tap side, but
+the packet is not duplicated, no further kernel processing is done for the
+remote side.
+
+The following diagram sums it up. A packet that match a TC rule follows the
+associated action (the number in the diamond represents the rule prio as set in
+the above TC rules)::
+
+
+ Incoming packet |
+ on remote (eth3) |
+ | Going through
+ | TC ingress rules
+ v
+ / \
+ / 5 \
+ / \ yes
+ / mac \____________________> tap0
+ \ match?/ duplicated pkt
+ \ /
+ \ /
+ \ /
+ V no, then continue
+ | with TC rules
+ |
+ v
+ / \
+ / 2 \
+ eth3 yes / \ yes
+ kernel <____________________ /promisc\____________________> tap0
+ stack original pkt \ match?/ duplicated pkt
+ \ /
+ \ /
+ \ /
+ V no, then continue
+ | with TC rules
+ |
+ v
+ / \
+ / 3 \
+ eth3 yes / \ yes
+ kernel <____________________ / bcast \____________________> tap0
+ stack original pkt \ match?/ duplicated pkt
+ \ /
+ \ /
+ \ /
+ V no, then continue
+ | with TC rules
+ |
+ v
+ / \
+ / 4 \
+ eth3 yes / \ yes
+ kernel <____________________ / bcast6\____________________> tap0
+ stack original pkt \ match?/ duplicated pkt
+ \ /
+ \ /
+ \ /
+ V no, then continue
+ | with TC rules
+ |
+ v
+ / \
+ / 5 \
+ eth3 yes / all \ yes
+ kernel <____________________ / multi \____________________> tap0
+ stack original pkt \ match?/ duplicated pkt
+ \ /
+ \ /
+ \ /
+ V no, then continue
+ | with TC rules
+ |
+ v
+ |
+ . remaining TC rules
+ .
+ eth3 |
+ kernel <________________________/
+ stack original pkt
+
+.. raw:: pdf
+
+ PageBreak
+
+Associating an rte_flow rule with a TC one
+==========================================
+
+A TC rule is identified by a ``priority`` (16-bit value) and a ``handle``
+(32-bit value). To delete a rule, the priority must be specified, and if several
+rules have the same priority, the handle is needed to select the correct one.
+
+..
+ Specifying an empty priority and handle when requesting a TC rule creation will
+ let the kernel automatically decide what values to set. In fact, the kernel will
+ start with a high priority (i.e. 49152) and subsequent rules will get decreasing
+ priorities (lower priorites get evaluated first).
+
+To avoid further requests to the kernel to identify what priority/handle has
+been automatically allocated, the tap PMD can set priorities and handles
+systematically when creating a rule.
+
+In *local* mode, an rte_flow rule should be translated into a single TC flow
+identified by priority+handle.
+
+In *remote* mode, an rte_flow rule requires two TC rules, one on the tap
+netdevice itself (for the correct action) and another one on the other netdevice
+where packets are redirected from. Both TC rules' priorities+handles must be
+stored for a specific rte_flow rule, and associated with the device they are
+applied on.
+
+.. raw:: pdf
+
+ PageBreak
+
+Considerations regarding Flow API support
+=========================================
+
+Flow rule attributes
+--------------------
+
+Groups and priorities:
+ There is no native support of groups in TC. Instead, the priority field
+ (which is part of the netlink TC msg header) can be adapted. The four MSB
+ would be used to define the group (allowing for 16 groups), while the 12 LSB
+ would be left to define the actual priority (up to 4096).
+
+ Rules with lower priorities are evaluated first. For rules with identical
+ priorities, the one with the highest handle value gets evaluated first.
+
+Direction:
+ Both ingress and egress filtering can be supported.
+
+Meta item types
+---------------
+
+Most applications will use: ``(END | VOID)``
+
+END, VOID:
+ Supported without problem.
+
+INVERT:
+ There is no easy way to support that in TC. It won't be supported
+
+ **mlx4 will not support it either.**
+
+PF, VF, PORT:
+ Not applicable to a tap netdevice.
+
+Data matching item types
+------------------------
+
+Most applications will use:
+``ETH / (IPV4 | IPV6 | END) / (TCP | UDP | END) / END``
+
+ANY:
+ Should be supported.
+
+ **mlx4 will partially support it.**
+
+RAW:
+ It is not planned to support it for now. Matching Raw packets would require
+ using a different classifier than "flower", which is the most simple and
+ applicable for otherwise most other cases. With TC, it's not possible to
+ support in the same rule both "flower" and raw packets.
+
+ **mlx4 will not support it either**.
+
+VLAN:
+ Matching VLAN ID and prio supported.
+ **Note: linux v4.9 required for VLAN support.**
+
+ETH, IPV4, IPV6, UDP, TCP:
+ Matching source/destination MAC/IP/port is supported, with masks.
+
+ **mlx4 does not support partial bit-masks (full or zeroed only).**
+
+ICMP:
+ By specifying the appropriate ether type, ICMP packets can be matched.
+ However, there is no support for ICMP type or code.
+
+ **mlx4 will not support it, however.**
+
+SCTP:
+ By specifying the appropriate IP protocol, SCTP packets can be matched.
+ However, no specific SCTP fields can be matched.
+
+ **mlx4 will not support it, however.**
+
+VXLAN:
+ VXLAN is not recognized by the "flower" classifier. Kernel-managed VXLAN
+ traffic would come through an additional netdevice, which falls outside
+ the scope of this project. VXLAN traffic should occur outside VMs anyway.
+
+Action types
+------------
+
+Most applications will use: ``(VOID | END | QUEUE | DROP) / END``
+
+By default, multiple actions are possible for TC flow rules. However, they are
+ordered in the kernel. The implementation will need to handle actions in a way
+that orders them intelligently when creating them.
+
+VOID, END:
+ Supported.
+
+PASSTHRU:
+ The generic "continue" action can be used.
+
+ **mlx4 will not support it, however**.
+
+MARK / FLAG:
+ The mark is a field inside an skbuff. However, the tap reads messages (mostly
+ packet data), without that info. As an alternative, it may be possible to
+ create a specific queue to pass packets with a specific mark. Further testing
+ are needed to ensure it is feasable.
+
+QUEUE:
+ The ``skbedit`` action with the ``queue_mapping`` option enables directing
+ packets to specific queues.
+
+ Like rte_flow, specifying several ``skbedit queue_mapping`` actions in TC
+ only considers the last one.
+
+DROP:
+ The generic "drop" action can be used. Packets will effectively be dropped,
+ and not left for the kernel to process.
+
+COUNT: Stats are automatically stored in the kernel. The COUNT action will thus
+ be ignored when creating the rule. ``rte_flow_query()`` can be implemented
+ to request a rule's stats from the kernel.
+
+DUP:
+ Duplicating packets is not supported.
+
+RSS:
+ There's no built-in mechanism for RSS in TC.
+
+ By default, incoming packets go to the tap PMD queue 0. To support RSS in
+ software, several additional queues must be set up. Packets coming in on
+ queue 0 can be considered as requiring RSS, and the PMD will apply software
+ rss (using something like ``rte_softrss()``) to select a queue for the
+ packet.
+
+PF, VF:
+ Not applicable to a tap netdevice.
+
+.. raw:: pdf
+
+ PageBreak
+
+TC limitations for flow collision
+=================================
+
+From TC standpoint, filter rules with identical priorities do not collide, if
+they do specify values (at least one different) for the same fields in the TC
+message, with identical fields masks.
+
+Unfortunately, some flows that obviously are not colliding can be considered
+otherwise by the kernel when parsing the TC messages, and thus their creation
+would be rejected.
+
+Here is a table for matching TC fields with their flow API equivalent:
+
++------------------------------+-----------------------------------+-----------+
+| TC message field | rte_flow API | maskable? |
++==============================+===================================+===========+
+| TCA_FLOWER_KEY_ETH_DST | eth dst | yes |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_ETH_SRC | eth src | yes |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_ETH_TYPE | eth type is 0xZZZZ || | no |
+| | eth / {ipv4|ipv6} | |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_IP_PROTO | eth / {ipv4|ipv6} / {tcp|udp} | no |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_IPV4_SRC | eth / ipv4 src | yes |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_IPV4_DST | eth / ipv4 dst | yes |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_IPV6_SRC | eth / ipv6 src | yes |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_IPV6_DST | eth / ipv6 dst | yes |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_L4_SRC | eth / {ipv4|ipv6} / {tcp|udp} dst | no |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_L4_DST | eth / {ipv4|ipv6} / {tcp|udp} src | no |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_VLAN_ID | eth / vlan vid | no |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_VLAN_PRIO | eth / vlan pcp | no |
++------------------------------+-----------------------------------+-----------+
+| TCA_FLOWER_KEY_VLAN_ETH_TYPE | eth / vlan tpid | no |
++------------------------------+-----------------------------------+-----------+
+
+When creating rules with identical priorities, one must make sure that they
+would be translated in TC using the same fields as shown in the above table.
+
+The following flow rules can share the same priority, as they use the same
+fields with identical masks under the hood::
+
+ > flow create 0 ingress priority 0 pattern eth / ipv4 / end
+ actions drop / end
+ Flow rule #0 created
+ > flow create 0 ingress priority 0 pattern eth type is 0x86dd / end
+ actions drop / end
+ Flow rule #1 created
+
+**Note:** Both rules use ETH_TYPE (mask 0xffff) in their TC form.
+
+Sadly, the following flow rules cannot share the same priority, since fields for
+matching IPv4 and IPv6 src/dst addresses are different::
+
+ > flow create 0 ingress priority 1 pattern eth / ipv4 src is 1.1.1.1 / end
+ actions drop / end
+ Flow rule #0 created
+ > flow create 0 ingress priority 1 pattern eth / ipv6 src is ::1 / end
+ actions drop / end
+ PMD: Kernel refused TC filter rule creation (22): Invalid argument
+ Caught error type 2 (flow rule (handle)): overlapping rules
+
+**Note:** First rule uses ETH_TYPE and IPV4_SRC, while the second uses ETH_TYPE
+and IPV6_SRC.
+
+It is however possible to match different IPvX addresses with the same
+priority::
+
+ > flow create 0 ingress priority 2 pattern eth / ipv4 src is 1.1.1.1 / end
+ actions drop / end
+ Flow rule #0 created
+ > flow create 0 ingress priority 2 pattern eth / ipv4 src is 2.2.2.2 / end
+ actions drop / end
+ Flow rule #1 created
+
+If the first rule specifies both destination and source addresses, then the
+other rule with the same priority must too (with identical masks)::
+
+ > flow create 0 ingress priority 3 pattern eth / ipv4 src is 1.1.1.1
+ dst is 1.1.1.2 / end actions drop / end
+ Flow rule #0 created
+ > flow create 0 ingress priority 3 pattern eth / ipv4 src is 2.2.2.2 / end
+ actions drop / end
+ PMD: Kernel refused TC filter rule creation (22): Invalid argument
+ Caught error type 2 (flow rule (handle)): overlapping rules
+ > flow create 0 ingress priority 3 pattern eth / ipv4 src is 2.2.2.2
+ dst spec 2.2.2.3 dst mask 255.255.255.0 / end actions drop / end
+ PMD: Kernel refused TC filter rule creation (22): Invalid argument
+ Caught error type 2 (flow rule (handle)): overlapping rules
+ > flow create 0 ingress priority 3 pattern eth / ipv4 src is 2.2.2.2
+ dst is 2.2.2.3 / end actions drop / end
+ Flow rule #1 created
+
+**Note:** First rule uses ETH_TYPE, IPV4_SRC and IPV4_DST (with full masks). The
+two others must also use those to share the same priority.
+
+It is possible to match TCP/UDP packets with different ports whatever the
+underlying L3, if the same fields are used (thus no l3 addresses specification).
+For instance::
+
+ > flow create 0 ingress priority 4 pattern eth / ipv4 / tcp dst is 3333 / end
+ actions drop / end
+ Flow rule #0 created
+ > flow create 0 ingress priority 4 pattern eth / ipv6 / udp dst is 4444 / end
+ actions drop / end
+ Flow rule #1 created
+ > flow create 0 ingress priority 4 pattern eth / ipv6 / udp src is 5555 / end
+ actions drop / end
+ PMD: Kernel refused TC filter rule creation (22): Invalid argument
+ Caught error type 2 (flow rule (handle)): overlapping rules
+
+**Note:** First 2 rules use ETH_TYPE, IP_PROTO and L4_DST with different values
+but identical masks, so they're OK. Last rule used L4_SRC instead of L4_DST.
+
+.. raw:: pdf
+
+ PageBreak
+
+RSS implementation for tap
+==========================
+
+There are several areas of research for a tap RSS implementation:
+
+#. userland implementation in tap PMD
+#. userland implementation in DPDK (generic)
+#. userland implementation using combination of TC rules and BPF filters/actions
+#. kernel-side implementation in tap driver
+#. kernel-side implementation as a BPF classifier/action
+#. kernel-side implementation as a separate TC action
+
++--------------+------------------------------+------------------------------+
+| | Pros | Cons |
++==============+==============================+==============================+
+| tap PMD | - no kernel upstreaming | - tap PMD is supposed to be |
+| | | simple, and would no longer|
+| | | be. |
+| | | |
+| | | - complex rework, with many |
+| | | rings for enqueuing packets|
+| | | to the right queue |
+| | | |
+| | | - slower |
+| | | |
+| | | - won't be accepted as it |
+| | | doesn't make sense to redo |
+| | | what the kernel did |
+| | | previously |
++--------------+------------------------------+------------------------------+
+| generic DPDK | - would be useful to others | - design must be compatible |
+| | | with most PMDs |
+| | | |
+| | | - probably the longest to |
+| | | develop |
+| | | |
+| | | - requires DPDK community |
+| | | approval |
+| | | |
+| | | - requires heavy changes in |
+| | | tap PMD itself anyway |
++--------------+------------------------------+------------------------------+
+| TC rules | - no kernel upstreaming | - BPF is complicated to learn|
+| combination | | |
+| | - fast | - Runtime BPF compilation / |
+| | | or bytecode change, would |
+| | - per-flow RSS | be tricky |
+| | | |
+| | - no change in tap PMD | - much rework in the tap PMD |
+| | datapath | to handle lots of new |
+| | | netlink messages / actions |
++--------------+------------------------------+------------------------------+
+| tap driver | - pretty fast as it | - might not be accepted by |
+| | intervenes early in packet | the kernel community as |
+| | RX | they may cling to their |
+| | | jhash2 hashing function for|
+| | | RX. |
+| | | |
+| | | - only a single RSS context |
++--------------+------------------------------+------------------------------+
+| BPF | - fast | - BPF is complicated to learn|
+| classifier - | | |
+| action | - per-flow RSS | - would require changing the |
+| | | kernel API to support |
+| | | editing queue_mapping in an|
+| | | skb |
+| | | |
+| | | - hashing would be performed |
+| | | for each queue of a |
+| | | specific RSS context |
+| | | |
+| | | - probably difficult to gain |
+| | | community acceptance |
++--------------+------------------------------+------------------------------+
+| TC action | - much more flexibility, with| - needs to be in sync with |
+| | per-flow RSS, multiple | iproute2's tc program |
+| | keys, multiple packet | |
+| | fields for the hash... | - kernel upstreaming is not |
+| | | necessarily easy |
+| | - it's a separate kernel | |
+| | module that can be | - rework in tap PMD to |
+| | maintained out-of-tree and | support new RSS action and |
+| | optionally upstreamed | configuration |
+| | anytime | |
+| | | |
+| | - most logical to be handled | |
+| | in kernel as RSS is | |
+| | supposed to be computed in | |
+| | the "NIC" exactly once. | |
+| | | |
+| | - fastest | |
+| | | |
+| | - no change in tap PMD | |
+| | datapath | |
++--------------+------------------------------+------------------------------+
+
+TC rules using BPF from tap PMD
+-------------------------------
+
+The third solution is the best for userland-based solutions.
+It does the job well, fast (datapath running in kernel), is logically happening
+in the kernel in runtime, supports flow-based RSS, has the best potential to
+be accepted by the community.
+
+Advantages with this solution:
+- hash can be recorded in the packet data and read in tap PMD
+- no kernel customization, everything in DPDK
+- packet gets in tap PMD on the correct queue directly
+
+Drawbacks:
+- complicates tap PMD a lot:
+ - 3 BPF programs
+ - new implicit rules
+ - new action and filter support
+ - packet stripping
+- numerous TC rules required (in proportion with the number of queues)
+- fast (kernel + JIT BPF), but several TC rules must be crossed
+
+BPF programs controlled from tap PMD will be used to match packets, compute a
+hash given the configured key, and send packets to tap using the desired queue.
+
+Design
+~~~~~~
+
+BPF has a limited set of functions for editing the skb in TC. They are listed
+in ``linux/net/core/filter.c:tc_cls_act_func_proto()``:
+
+- skb_store_bytes
+- skb_load_bytes
+- skb_pull_data
+- csum_diff
+- csum_update
+- l3_csum_replace
+- l4_csum_replace
+- clone_redirect
+- get_cgroup_classid
+- skb_vlan_push
+- skb_vlan_pop
+- skb_change_proto
+- skb_change_type
+- skb_change_tail
+- skb_get_tunnel_key
+- skb_set_tunnel_key
+- skb_get_tunnel_opt
+- skb_set_tunnel_opt
+- redirect
+- get_route_realm
+- get_hash_recalc
+- set_hash_invalid
+- perf_event_output
+- get_smp_processor_id
+- skb_under_cgroup
+
+In a BPF program, it is typically not possible to edit the queue_mapping field
+to direct the packet in the correct queue. That part would be done by chaining a
+``skbedit queue_mapping`` action.
+
+It is not possible either to directly prepend data to a packet (appending works,
+though).
+
+A packet would go through these rules (on the local side of the tap netdevice):
+
++-----+---------------------------+----------------------------------+----------+
+|PRIO | Match | Action 1 | Action 2 |
++=====+===========================+==================================+==========+
+| 1 | marked? | skbedit queue 'mark' --> DPDK | |
++-----+---------------------------+----------------------------------+----------+
+| 2 | marked? | skbedit queue 'mark' --> DPDK | |
++-----+---------------------------+----------------------------------+----------+
+| ... | | | |
++-----+---------------------------+----------------------------------+----------+
+| x | ANY | BPF: append NULL 32bits for hash | |
+| | | | |
++-----+---------------------------+----------------------------------+----------+
+|x + 1| ACTUAL FLOW RULE 1 MATCH | ... | |
+| | | | |
++-----+---------------------------+----------------------------------+----------+
+|x + 2| ACTUAL FLOW RULE 2 MATCH | ... | |
+| | | | |
++-----+---------------------------+----------------------------------+----------+
+| ... | | | |
++-----+---------------------------+----------------------------------+----------+
+| y | FLOW RULE RSS 1 MATCH | BPF compute hash into packet |reclassify|
+| | | tailroom && set queue in skb->cb | |
++-----+---------------------------+----------------------------------+----------+
+|y + 1| FLOW RULE RSS 2 MATCH | BPF compute hash into packet |reclassify|
+| | | tailroom && set queue in skb->cb | |
++-----+---------------------------+----------------------------------+----------+
+| ... | | | |
++-----+---------------------------+----------------------------------+----------+
+| z | ANY (default RSS) | BPF compute hash into packet |reclassify|
+| | | tailroom && set queue in skb->cb | |
++-----+---------------------------+----------------------------------+----------+
+| z | ANY (isolate mode) | DROP | |
++-----+---------------------------+----------------------------------+----------+
+
+
+
+TC kernel action
+----------------
+
+The latest solution (implementing a TC action) would probably be the most simple
+to implement. It is also very flexible, opening more possibilities for filtering
+and RSS combined.
+
+For this solution, the following parameters could be used to configure RSS in a
+TC netlink message:
+
+``queues`` (u16 \*):
+ list of queues to spread incoming traffic on. That's actually the reta.
+ **Note:** the queue in an ``skb`` is on 16-bits, hence the type here.
+
+``key`` (u8 \*):
+ key to use for the Toeplitz-hash in this flow.
+
+``hash_fields`` (bitfield):
+ similar to what's in DPDK, the bitfield should determine what fields in the
+ packet header to use for hashing. It is likely another means of configuring
+ which fields to pick would be used actually.
+
+``algo`` (unsigned):
+ an enum value from the kernel act_rss header can be used to determine which
+ algorithm (implemented in the kernel) to use. Possible algos could be
+ toeplitz, xor, symmetric hash...
+
+**Note:** The number of queues to use is automatically deduced from the
+``queues`` netlink attribute length. The ``key`` length can be similarly
+obtained.
+
+.. raw:: pdf
+
+ PageBreak
+
+Appendix: TC netlink message
+============================
+
+**Note:** For deterministic behavior, TC queueing disciplines (QDISC), filters
+and classes must be flushed before starting to apply TC rules. There is a little
+bit of boilerplate (with specific netlink messages) to ensure TC rules can be
+applied. Typically, the TC ``ingress`` QDISC must be created first.
+
+For information, netlink messages regarding TC will look like this::
+
+ 0 8 16 24 32
+ +----------+----------+----------+----------+ ---
+ 0 | Length | \
+ +---------------------+---------------------+ \
+ 4 | Type | Flags | |
+ +----------- ---------+---------------------+ >-- struct
+ 8 | Sequence number | | nlmsghdr
+ +-------------------------------------------+ /
+ 12 | Process Port ID (PID) | /
+ +==========+==========+==========+==========+ ---
+ 16 | Family | Rsvd1 | Reserved2 | \
+ +----------+----------+---------------------+ \
+ 20 | Interface index | |
+ +-------------------------------------------+ |
+ 24 | Handle | |
+ +-------------------------------------------+ >-- struct
+ 28 | Parent handle | | tcmsg
+ | MAJOR + MINOR | |
+ +-------------------------------------------+ |
+ 32 | TCM info | /
+ | priority + protocol | /
+ +===========================================+ ---
+ | |
+ | Payload |
+ | |
+ ........................................
+ | |
+ | |
+ +-------------------------------------------+
diff --git a/drivers/net/tap/Makefile b/drivers/net/tap/Makefile
index 405b49e..9afae5e 100644
--- a/drivers/net/tap/Makefile
+++ b/drivers/net/tap/Makefile
@@ -39,6 +39,9 @@ EXPORT_MAP := rte_pmd_tap_version.map
LIBABIVER := 1
+# TAP_MAX_QUEUES must be a power of 2 as it will be used for masking */
+TAP_MAX_QUEUES = 16
+
CFLAGS += -O3
CFLAGS += -I$(SRCDIR)
CFLAGS += -I.
@@ -47,6 +50,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
LDLIBS += -lrte_bus_vdev
+CFLAGS += -DTAP_MAX_QUEUES=$(TAP_MAX_QUEUES)
+
#
# all source are stored in SRCS-y
#
@@ -89,7 +94,6 @@ tap_autoconf.h: tap_autoconf.h.new
mv '$<' '$@'
$(SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP):.c=.o): tap_autoconf.h
-
clean_tap: FORCE
$Q rm -f -- tap_autoconf.h tap_autoconf.h.new
diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index 829f32f..01ac153 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -45,7 +45,7 @@
#include <rte_ether.h>
#ifdef IFF_MULTI_QUEUE
-#define RTE_PMD_TAP_MAX_QUEUES 16
+#define RTE_PMD_TAP_MAX_QUEUES TAP_MAX_QUEUES
#else
#define RTE_PMD_TAP_MAX_QUEUES 1
#endif
@@ -90,6 +90,11 @@ struct pmd_internals {
int ioctl_sock; /* socket for ioctl calls */
int nlsk_fd; /* Netlink socket fd */
int flow_isolate; /* 1 if flow isolation is enabled */
+ int flower_support; /* 1 if kernel supports, else 0 */
+ int flower_vlan_support; /* 1 if kernel supports, else 0 */
+ int rss_enabled; /* 1 if RSS is enabled, else 0 */
+ /* implicit rules set when RSS is enabled */
+ LIST_HEAD(tap_rss_flows, rte_flow) rss_flows;
LIST_HEAD(tap_flows, rte_flow) flows; /* rte_flow rules */
/* implicit rte_flow rules set when a remote device is active */
LIST_HEAD(tap_implicit_flows, rte_flow) implicit_flows;
diff --git a/drivers/net/tap/tap_bpf_elf.h b/drivers/net/tap/tap_bpf_elf.h
new file mode 100644
index 0000000..f3db1bf
--- /dev/null
+++ b/drivers/net/tap/tap_bpf_elf.h
@@ -0,0 +1,56 @@
+/*******************************************************************************
+
+ Copyright (C) 2015 Daniel Borkmann <daniel@iogearbox.net>
+
+ Copied from iproute2's include/bpf_elf.h, available at:
+ https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
+
+ This file is licensed under GNU General Public License (GPL) v2.
+
+ The full GNU General Public License is included in this distribution in
+ the file called "LICENSE.GPL".
+
+*******************************************************************************/
+
+
+#ifndef __BPF_ELF__
+#define __BPF_ELF__
+
+#include <asm/types.h>
+
+/* Note:
+ *
+ * Below ELF section names and bpf_elf_map structure definition
+ * are not (!) kernel ABI. It's rather a "contract" between the
+ * application and the BPF loader in tc. For compatibility, the
+ * section names should stay as-is. Introduction of aliases, if
+ * needed, are a possibility, though.
+ */
+
+/* ELF section names, etc */
+#define ELF_SECTION_LICENSE "license"
+#define ELF_SECTION_MAPS "maps"
+#define ELF_SECTION_PROG "prog"
+#define ELF_SECTION_CLASSIFIER "classifier"
+#define ELF_SECTION_ACTION "action"
+
+#define ELF_MAX_MAPS 64
+#define ELF_MAX_LICENSE_LEN 128
+
+/* Object pinning settings */
+#define PIN_NONE 0
+#define PIN_OBJECT_NS 1
+#define PIN_GLOBAL_NS 2
+
+/* ELF map definition */
+struct bpf_elf_map {
+ __u32 type;
+ __u32 size_key;
+ __u32 size_value;
+ __u32 max_elem;
+ __u32 flags;
+ __u32 id;
+ __u32 pinning;
+};
+
+#endif /* __BPF_ELF__ */
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index ffc0b85..43bab7d 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -43,6 +43,9 @@
#include <tap_autoconf.h>
#include <tap_tcmsgs.h>
+#include <linux/bpf.h>
+#include <linux/tc_act/tc_bpf.h>
+
#ifndef HAVE_TC_FLOWER
/*
* For kernels < 4.2, this enum is not defined. Runtime checks will be made to
@@ -104,6 +107,23 @@ struct remote_rule {
int mirred;
};
+struct action_data {
+ char id[16];
+
+ union {
+ struct tc_gact gact;
+ struct tc_mirred mirred;
+ struct skbedit {
+ struct tc_skbedit skbedit;
+ uint16_t queue;
+ } skbedit;
+ struct bpf {
+ int bpf_fd;
+ char *annotation;
+ } bpf;
+ };
+};
+
static int tap_flow_create_eth(const struct rte_flow_item *item, void *data);
static int tap_flow_create_vlan(const struct rte_flow_item *item, void *data);
static int tap_flow_create_ipv4(const struct rte_flow_item *item, void *data);
@@ -134,6 +154,8 @@ struct remote_rule {
int set,
struct rte_flow_error *error);
+static int rss_enable(struct pmd_internals *pmd);
+
static const struct rte_flow_ops tap_flow_ops = {
.validate = tap_flow_validate,
.create = tap_flow_create,
@@ -816,111 +838,64 @@ struct tap_flow_items {
}
/**
- * Transform a DROP/PASSTHRU action item in the provided flow for TC.
- *
- * @param[in, out] flow
- * Flow to be filled.
- * @param[in] action
- * Appropriate action to be set in the TCA_GACT_PARMS structure.
- *
- * @return
- * 0 if checks are alright, -1 otherwise.
+ * FIXME
*/
static int
-add_action_gact(struct rte_flow *flow, int action)
+add_action(struct rte_flow *flow, size_t *act_index, struct action_data *adata)
{
struct nlmsg *msg = &flow->msg;
- size_t act_index = 1;
- struct tc_gact p = {
- .action = action
- };
- if (nlattr_nested_start(msg, TCA_FLOWER_ACT) < 0)
- return -1;
- if (nlattr_nested_start(msg, act_index++) < 0)
+ if (nlattr_nested_start(msg, ++(*act_index)) < 0)
return -1;
- nlattr_add(&msg->nh, TCA_ACT_KIND, sizeof("gact"), "gact");
- if (nlattr_nested_start(msg, TCA_ACT_OPTIONS) < 0)
- return -1;
- nlattr_add(&msg->nh, TCA_GACT_PARMS, sizeof(p), &p);
- nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
- nlattr_nested_finish(msg); /* nested act_index */
- nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
- return 0;
-}
-
-/**
- * Transform a MIRRED action item in the provided flow for TC.
- *
- * @param[in, out] flow
- * Flow to be filled.
- * @param[in] ifindex
- * Netdevice ifindex, where to mirror/redirect packet to.
- * @param[in] action_type
- * Either TCA_EGRESS_REDIR for redirection or TCA_EGRESS_MIRROR for mirroring.
- *
- * @return
- * 0 if checks are alright, -1 otherwise.
- */
-static int
-add_action_mirred(struct rte_flow *flow, uint16_t ifindex, uint16_t action_type)
-{
- struct nlmsg *msg = &flow->msg;
- size_t act_index = 1;
- struct tc_mirred p = {
- .eaction = action_type,
- .ifindex = ifindex,
- };
- if (nlattr_nested_start(msg, TCA_FLOWER_ACT) < 0)
- return -1;
- if (nlattr_nested_start(msg, act_index++) < 0)
- return -1;
- nlattr_add(&msg->nh, TCA_ACT_KIND, sizeof("mirred"), "mirred");
+ nlattr_add(&msg->nh, TCA_ACT_KIND, strlen(adata->id), adata->id);
if (nlattr_nested_start(msg, TCA_ACT_OPTIONS) < 0)
return -1;
- if (action_type == TCA_EGRESS_MIRROR)
- p.action = TC_ACT_PIPE;
- else /* REDIRECT */
- p.action = TC_ACT_STOLEN;
- nlattr_add(&msg->nh, TCA_MIRRED_PARMS, sizeof(p), &p);
+ if (strcmp("gact", adata->id) == 0) {
+ nlattr_add(&msg->nh, TCA_GACT_PARMS, sizeof(adata->gact),
+ &adata->gact);
+ } else if (strcmp("mirred", adata->id) == 0) {
+ if (adata->mirred.eaction == TCA_EGRESS_MIRROR)
+ adata->mirred.action = TC_ACT_PIPE;
+ else /* REDIRECT */
+ adata->mirred.action = TC_ACT_STOLEN;
+ nlattr_add(&msg->nh, TCA_MIRRED_PARMS, sizeof(adata->mirred),
+ &adata->mirred);
+ } else if (strcmp("skbedit", adata->id) == 0) {
+ nlattr_add(&msg->nh, TCA_SKBEDIT_PARMS,
+ sizeof(adata->skbedit.skbedit),
+ &adata->skbedit.skbedit);
+ nlattr_add16(&msg->nh, TCA_SKBEDIT_QUEUE_MAPPING,
+ adata->skbedit.queue);
+ } else if (strcmp("bpf", adata->id) == 0) {
+ nlattr_add32(&msg->nh, TCA_ACT_BPF_FD, adata->bpf.bpf_fd);
+ nlattr_add(&msg->nh, TCA_ACT_BPF_NAME,
+ strlen(adata->bpf.annotation),
+ adata->bpf.annotation);
+ } else {
+ return -1;
+ }
nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
nlattr_nested_finish(msg); /* nested act_index */
- nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
return 0;
}
/**
- * Transform a QUEUE action item in the provided flow for TC.
- *
- * @param[in, out] flow
- * Flow to be filled.
- * @param[in] queue
- * Queue id to use.
- *
- * @return
- * 0 if checks are alright, -1 otherwise.
+ * FIXME
*/
static int
-add_action_skbedit(struct rte_flow *flow, uint16_t queue)
+add_actions(struct rte_flow *flow, int nb_actions, struct action_data *data,
+ int classifier_action)
{
struct nlmsg *msg = &flow->msg;
- size_t act_index = 1;
- struct tc_skbedit p = {
- .action = TC_ACT_PIPE
- };
+ size_t act_index = 0;
+ int i;
- if (nlattr_nested_start(msg, TCA_FLOWER_ACT) < 0)
- return -1;
- if (nlattr_nested_start(msg, act_index++) < 0)
+ if (nlattr_nested_start(msg, classifier_action) < 0)
return -1;
- nlattr_add(&msg->nh, TCA_ACT_KIND, sizeof("skbedit"), "skbedit");
- if (nlattr_nested_start(msg, TCA_ACT_OPTIONS) < 0)
- return -1;
- nlattr_add(&msg->nh, TCA_SKBEDIT_PARMS, sizeof(p), &p);
- nlattr_add16(&msg->nh, TCA_SKBEDIT_QUEUE_MAPPING, queue);
- nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
- nlattr_nested_finish(msg); /* nested act_index */
+ for (i = 0; i < nb_actions; i++)
+ if (add_action(flow, &act_index, data + i) < 0)
+ return -1;
nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
return 0;
}
@@ -1053,7 +1028,12 @@ struct tap_flow_items {
}
}
if (mirred && flow) {
- uint16_t if_index = pmd->if_index;
+ struct action_data adata = {
+ .id = "mirred",
+ .mirred = {
+ .eaction = mirred,
+ },
+ };
/*
* If attr->egress && mirred, then this is a special
@@ -1061,9 +1041,13 @@ struct tap_flow_items {
* redirect packets coming from the DPDK App, out
* through the remote netdevice.
*/
- if (attr->egress)
- if_index = pmd->remote_if_index;
- if (add_action_mirred(flow, if_index, mirred) < 0)
+ adata.mirred.ifindex = attr->ingress ? pmd->if_index :
+ pmd->remote_if_index;
+ if (mirred == TCA_EGRESS_MIRROR)
+ adata.mirred.action = TC_ACT_PIPE;
+ else
+ adata.mirred.action = TC_ACT_STOLEN;
+ if (add_actions(flow, 1, &adata, TCA_FLOWER_ACT) < 0)
goto exit_action_not_supported;
else
goto end;
@@ -1077,14 +1061,33 @@ struct tap_flow_items {
if (action)
goto exit_action_not_supported;
action = 1;
- if (flow)
- err = add_action_gact(flow, TC_ACT_SHOT);
+ if (flow) {
+ struct action_data adata = {
+ .id = "gact",
+ .gact = {
+ .action = TC_ACT_SHOT,
+ },
+ };
+
+ err = add_actions(flow, 1, &adata,
+ TCA_FLOWER_ACT);
+ }
} else if (actions->type == RTE_FLOW_ACTION_TYPE_PASSTHRU) {
if (action)
goto exit_action_not_supported;
action = 1;
- if (flow)
- err = add_action_gact(flow, TC_ACT_UNSPEC);
+ if (flow) {
+ struct action_data adata = {
+ .id = "gact",
+ .gact = {
+ /* continue */
+ .action = TC_ACT_UNSPEC,
+ },
+ };
+
+ err = add_actions(flow, 1, &adata,
+ TCA_FLOWER_ACT);
+ }
} else if (actions->type == RTE_FLOW_ACTION_TYPE_QUEUE) {
const struct rte_flow_action_queue *queue =
(const struct rte_flow_action_queue *)
@@ -1096,22 +1099,30 @@ struct tap_flow_items {
if (!queue ||
(queue->index > pmd->dev->data->nb_rx_queues - 1))
goto exit_action_not_supported;
- if (flow)
- err = add_action_skbedit(flow, queue->index);
+ if (flow) {
+ struct action_data adata = {
+ .id = "skbedit",
+ .skbedit = {
+ .skbedit = {
+ .action = TC_ACT_PIPE,
+ },
+ .queue = queue->index,
+ },
+ };
+
+ err = add_actions(flow, 1, &adata,
+ TCA_FLOWER_ACT);
+ }
} else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) {
- /* Fake RSS support. */
const struct rte_flow_action_rss *rss =
(const struct rte_flow_action_rss *)
actions->conf;
- if (action)
- goto exit_action_not_supported;
- action = 1;
- if (!rss || rss->num < 1 ||
- (rss->queue[0] > pmd->dev->data->nb_rx_queues - 1))
+ if (action++)
goto exit_action_not_supported;
- if (flow)
- err = add_action_skbedit(flow, rss->queue[0]);
+ if (!pmd->rss_enabled)
+ err = rss_enable(pmd);
+ (void)rss;
} else {
goto exit_action_not_supported;
}
@@ -1632,6 +1643,127 @@ int tap_flow_implicit_destroy(struct pmd_internals *pmd,
return 0;
}
+#define BPF_PROGRAM "tap_bpf_program.o"
+
+/**
+ * Enable RSS on tap: create leading TC rules for queuing.
+ */
+static int rss_enable(struct pmd_internals *pmd)
+{
+ struct rte_flow *rss_flow = NULL;
+ char section[64];
+ struct nlmsg *msg = NULL;
+ /* 4096 is the maximum number of instructions for a BPF program */
+ char annotation[256];
+ int bpf_fd;
+ int i;
+
+ /*
+ * Add a rule per queue to match reclassified packets and direct them to
+ * the correct queue.
+ */
+ for (i = 0; i < pmd->dev->data->nb_rx_queues; i++) {
+ struct action_data adata = {
+ .id = "skbedit",
+ .skbedit = {
+ .skbedit = {
+ .action = TC_ACT_PIPE,
+ },
+ .queue = i,
+ },
+ };
+
+ bpf_fd = 0;
+
+ rss_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
+ if (!rss_flow) {
+ RTE_LOG(ERR, PMD,
+ "Cannot allocate memory for rte_flow");
+ return -1;
+ }
+ msg = &rss_flow->msg;
+ tc_init_msg(msg, pmd->if_index, RTM_NEWTFILTER, NLM_F_REQUEST |
+ NLM_F_ACK | NLM_F_EXCL | NLM_F_CREATE);
+ msg->t.tcm_info = TC_H_MAKE((i + PRIORITY_OFFSET) << 16,
+ htons(ETH_P_ALL));
+ msg->t.tcm_parent = TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
+ tap_flow_set_handle(rss_flow);
+ nlattr_add(&msg->nh, TCA_KIND, sizeof("bpf"), "bpf");
+ if (nlattr_nested_start(msg, TCA_OPTIONS) < 0)
+ return -1;
+ nlattr_add32(&msg->nh, TCA_BPF_FD, bpf_fd);
+ snprintf(annotation, sizeof(annotation), "%s:[%s]",
+ BPF_PROGRAM, section);
+ nlattr_add(&msg->nh, TCA_BPF_NAME, strlen(annotation),
+ annotation);
+
+ if (add_actions(rss_flow, 1, &adata, TCA_BPF_ACT) < 0)
+ return -1;
+ nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
+ /* Netlink message is now ready to be sent */
+ if (nl_send(pmd->nlsk_fd, &msg->nh) < 0)
+ return -1;
+ if (nl_recv_ack(pmd->nlsk_fd) < 0)
+ return -1;
+ LIST_INSERT_HEAD(&pmd->rss_flows, rss_flow, next);
+ }
+
+ snprintf(annotation, sizeof(annotation), "%s:[%s]", BPF_PROGRAM,
+ section);
+ rss_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
+ if (!rss_flow) {
+ RTE_LOG(ERR, PMD,
+ "Cannot allocate memory for rte_flow");
+ return -1;
+ }
+ msg = &rss_flow->msg;
+ tc_init_msg(msg, pmd->if_index, RTM_NEWTFILTER,
+ NLM_F_REQUEST | NLM_F_ACK | NLM_F_EXCL | NLM_F_CREATE);
+ msg->t.tcm_info =
+ TC_H_MAKE((RTE_PMD_TAP_MAX_QUEUES + PRIORITY_OFFSET) << 16,
+ htons(ETH_P_ALL));
+ msg->t.tcm_parent = TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
+ tap_flow_set_handle(rss_flow);
+ nlattr_add(&msg->nh, TCA_KIND, sizeof("flower"), "flower");
+ if (nlattr_nested_start(msg, TCA_OPTIONS) < 0)
+ return -1;
+
+ /* no fields for matching: all packets must match */
+ {
+ /* Actions */
+ struct action_data data[2] = {
+ [0] = {
+ .id = "bpf",
+ .bpf = {
+ .bpf_fd = bpf_fd,
+ .annotation = annotation,
+ },
+ },
+ [1] = {
+ .id = "gact",
+ .gact = {
+ /* continue */
+ .action = TC_ACT_UNSPEC,
+ },
+ },
+ };
+
+ if (add_actions(rss_flow, 2, data, TCA_FLOWER_ACT) < 0)
+ return -1;
+ }
+ nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
+ nlattr_nested_finish(msg); /* nested TCA_OPTIONS */
+ /* Netlink message is now ready to be sent */
+ if (nl_send(pmd->nlsk_fd, &msg->nh) < 0)
+ return -1;
+ if (nl_recv_ack(pmd->nlsk_fd) < 0)
+ return -1;
+ LIST_INSERT_HEAD(&pmd->rss_flows, rss_flow, next);
+
+ pmd->rss_enabled = 1;
+ return 0;
+}
+
/**
* Manage filter operations.
*
--
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
2017-11-30 8:01 [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Ophir Munk
@ 2017-11-30 8:01 ` Ophir Munk
2017-11-30 16:54 ` Stephen Hemminger
2017-11-30 16:47 ` [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Stephen Hemminger
2017-12-05 7:53 ` Pascal Mazon
2 siblings, 1 reply; 11+ messages in thread
From: Ophir Munk @ 2017-11-30 8:01 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, Olga Shern, Pascal Mazon, Ophir Munk
The C source file (tap_bpf_insns.c) includes eBPF "assembly
instructions" in the format of an array of struct bpf_insns.
This array is passed to the kernel for execution in BPF system call.
The C language source file (tap_bpf_program.c) from which the
"assembly instructions" were generated is included in TAP source tree,
however it does not take part in dpdk compilation.
TAP documentation details the process of eBPF "assembly instructions"
generation.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
---
drivers/net/tap/Makefile | 1 +
drivers/net/tap/tap_bpf_api.h | 276 ++
drivers/net/tap/tap_bpf_insns.c | 5427 +++++++++++++++++++++++++++++++++++++
drivers/net/tap/tap_bpf_program.c | 321 +++
drivers/net/tap/tap_bpf_shared.h | 40 +
drivers/net/tap/tap_flow.c | 11 +-
6 files changed, 6075 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/tap/tap_bpf_api.h
create mode 100644 drivers/net/tap/tap_bpf_insns.c
create mode 100644 drivers/net/tap/tap_bpf_program.c
create mode 100644 drivers/net/tap/tap_bpf_shared.h
diff --git a/drivers/net/tap/Makefile b/drivers/net/tap/Makefile
index 9afae5e..c334d90 100644
--- a/drivers/net/tap/Makefile
+++ b/drivers/net/tap/Makefile
@@ -59,6 +59,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += rte_eth_tap.c
SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_flow.c
SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_netlink.c
SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_tcmsgs.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap_bpf_insns.c
include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/tap/tap_bpf_api.h b/drivers/net/tap/tap_bpf_api.h
new file mode 100644
index 0000000..0328dd8
--- /dev/null
+++ b/drivers/net/tap/tap_bpf_api.h
@@ -0,0 +1,276 @@
+/*******************************************************************************
+
+ Copyright (C) 2015 Daniel Borkmann <daniel@iogearbox.net>
+
+ Copied from iproute2's include/bpf_api.h, available at:
+ https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
+
+ This file is licensed under GNU General Public License (GPL) v2.
+
+ The full GNU General Public License is included in this distribution in
+ the file called "LICENSE.GPL".
+
+*******************************************************************************/
+
+
+#ifndef __BPF_API__
+#define __BPF_API__
+
+/* Note:
+ *
+ * This file can be included into eBPF kernel programs. It contains
+ * a couple of useful helper functions, map/section ABI (bpf_elf.h),
+ * misc macros and some eBPF specific LLVM built-ins.
+ */
+
+#include <stdint.h>
+
+#include <linux/pkt_cls.h>
+#include <linux/bpf.h>
+#include <linux/filter.h>
+
+#include <asm/byteorder.h>
+
+#include "tap_bpf_elf.h"
+
+/** Misc macros. */
+
+#ifndef __stringify
+# define __stringify(X) #X
+#endif
+
+#ifndef __maybe_unused
+# define __maybe_unused __attribute__((__unused__))
+#endif
+
+#ifndef offsetof
+# define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
+#endif
+
+#ifndef likely
+# define likely(X) __builtin_expect(!!(X), 1)
+#endif
+
+#ifndef unlikely
+# define unlikely(X) __builtin_expect(!!(X), 0)
+#endif
+
+#ifndef htons
+# define htons(X) __constant_htons((X))
+#endif
+
+#ifndef ntohs
+# define ntohs(X) __constant_ntohs((X))
+#endif
+
+#ifndef htonl
+# define htonl(X) __constant_htonl((X))
+#endif
+
+#ifndef ntohl
+# define ntohl(X) __constant_ntohl((X))
+#endif
+
+#ifndef __inline__
+# define __inline__ __attribute__((always_inline))
+#endif
+
+/** Section helper macros. */
+
+#ifndef __section
+# define __section(NAME) \
+ __attribute__((section(NAME), used))
+#endif
+
+#ifndef __section_tail
+# define __section_tail(ID, KEY) \
+ __section(__stringify(ID) "/" __stringify(KEY))
+#endif
+
+#ifndef __section_xdp_entry
+# define __section_xdp_entry \
+ __section(ELF_SECTION_PROG)
+#endif
+
+#ifndef __section_cls_entry
+# define __section_cls_entry \
+ __section(ELF_SECTION_CLASSIFIER)
+#endif
+
+#ifndef __section_act_entry
+# define __section_act_entry \
+ __section(ELF_SECTION_ACTION)
+#endif
+
+#ifndef __section_lwt_entry
+# define __section_lwt_entry \
+ __section(ELF_SECTION_PROG)
+#endif
+
+#ifndef __section_license
+# define __section_license \
+ __section(ELF_SECTION_LICENSE)
+#endif
+
+#ifndef __section_maps
+# define __section_maps \
+ __section(ELF_SECTION_MAPS)
+#endif
+
+/** Declaration helper macros. */
+
+#ifndef BPF_LICENSE
+# define BPF_LICENSE(NAME) \
+ char ____license[] __section_license = NAME
+#endif
+
+/** Classifier helper */
+
+#ifndef BPF_H_DEFAULT
+# define BPF_H_DEFAULT -1
+#endif
+
+/** BPF helper functions for tc. Individual flags are in linux/bpf.h */
+
+#ifndef __BPF_FUNC
+# define __BPF_FUNC(NAME, ...) \
+ (* NAME)(__VA_ARGS__)__maybe_unused
+#endif
+
+#ifndef BPF_FUNC
+# define BPF_FUNC(NAME, ...) \
+ __BPF_FUNC(NAME, __VA_ARGS__) = (void *)BPF_FUNC_##NAME
+#endif
+
+/* Map access/manipulation */
+static void *BPF_FUNC(map_lookup_elem, void *map, const void *key);
+static int BPF_FUNC(map_update_elem, void *map, const void *key,
+ const void *value, uint32_t flags);
+static int BPF_FUNC(map_delete_elem, void *map, const void *key);
+
+/* Time access */
+static uint64_t BPF_FUNC(ktime_get_ns);
+
+/* Debugging */
+
+/* FIXME: __attribute__ ((format(printf, 1, 3))) not possible unless
+ * llvm bug https://llvm.org/bugs/show_bug.cgi?id=26243 gets resolved.
+ * It would require ____fmt to be made const, which generates a reloc
+ * entry (non-map).
+ */
+static void BPF_FUNC(trace_printk, const char *fmt, int fmt_size, ...);
+
+#ifndef printt
+# define printt(fmt, ...) \
+ ({ \
+ char ____fmt[] = fmt; \
+ trace_printk(____fmt, sizeof(____fmt), ##__VA_ARGS__); \
+ })
+#endif
+
+/* Random numbers */
+static uint32_t BPF_FUNC(get_prandom_u32);
+
+/* Tail calls */
+static void BPF_FUNC(tail_call, struct __sk_buff *skb, void *map,
+ uint32_t index);
+
+/* System helpers */
+static uint32_t BPF_FUNC(get_smp_processor_id);
+static uint32_t BPF_FUNC(get_numa_node_id);
+
+/* Packet misc meta data */
+static uint32_t BPF_FUNC(get_cgroup_classid, struct __sk_buff *skb);
+static int BPF_FUNC(skb_under_cgroup, void *map, uint32_t index);
+
+static uint32_t BPF_FUNC(get_route_realm, struct __sk_buff *skb);
+static uint32_t BPF_FUNC(get_hash_recalc, struct __sk_buff *skb);
+static uint32_t BPF_FUNC(set_hash_invalid, struct __sk_buff *skb);
+
+/* Packet redirection */
+static int BPF_FUNC(redirect, int ifindex, uint32_t flags);
+static int BPF_FUNC(clone_redirect, struct __sk_buff *skb, int ifindex,
+ uint32_t flags);
+
+/* Packet manipulation */
+static int BPF_FUNC(skb_load_bytes, struct __sk_buff *skb, uint32_t off,
+ void *to, uint32_t len);
+static int BPF_FUNC(skb_store_bytes, struct __sk_buff *skb, uint32_t off,
+ const void *from, uint32_t len, uint32_t flags);
+
+static int BPF_FUNC(l3_csum_replace, struct __sk_buff *skb, uint32_t off,
+ uint32_t from, uint32_t to, uint32_t flags);
+static int BPF_FUNC(l4_csum_replace, struct __sk_buff *skb, uint32_t off,
+ uint32_t from, uint32_t to, uint32_t flags);
+static int BPF_FUNC(csum_diff, const void *from, uint32_t from_size,
+ const void *to, uint32_t to_size, uint32_t seed);
+static int BPF_FUNC(csum_update, struct __sk_buff *skb, uint32_t wsum);
+
+static int BPF_FUNC(skb_change_type, struct __sk_buff *skb, uint32_t type);
+static int BPF_FUNC(skb_change_proto, struct __sk_buff *skb, uint32_t proto,
+ uint32_t flags);
+static int BPF_FUNC(skb_change_tail, struct __sk_buff *skb, uint32_t nlen,
+ uint32_t flags);
+
+static int BPF_FUNC(skb_pull_data, struct __sk_buff *skb, uint32_t len);
+
+/* Event notification */
+static int __BPF_FUNC(skb_event_output, struct __sk_buff *skb, void *map,
+ uint64_t index, const void *data, uint32_t size) =
+ (void *) BPF_FUNC_perf_event_output;
+
+/* Packet vlan encap/decap */
+static int BPF_FUNC(skb_vlan_push, struct __sk_buff *skb, uint16_t proto,
+ uint16_t vlan_tci);
+static int BPF_FUNC(skb_vlan_pop, struct __sk_buff *skb);
+
+/* Packet tunnel encap/decap */
+static int BPF_FUNC(skb_get_tunnel_key, struct __sk_buff *skb,
+ struct bpf_tunnel_key *to, uint32_t size, uint32_t flags);
+static int BPF_FUNC(skb_set_tunnel_key, struct __sk_buff *skb,
+ const struct bpf_tunnel_key *from, uint32_t size,
+ uint32_t flags);
+
+static int BPF_FUNC(skb_get_tunnel_opt, struct __sk_buff *skb,
+ void *to, uint32_t size);
+static int BPF_FUNC(skb_set_tunnel_opt, struct __sk_buff *skb,
+ const void *from, uint32_t size);
+
+/** LLVM built-ins, mem*() routines work for constant size */
+
+#ifndef lock_xadd
+# define lock_xadd(ptr, val) ((void) __sync_fetch_and_add(ptr, val))
+#endif
+
+#ifndef memset
+# define memset(s, c, n) __builtin_memset((s), (c), (n))
+#endif
+
+#ifndef memcpy
+# define memcpy(d, s, n) __builtin_memcpy((d), (s), (n))
+#endif
+
+#ifndef memmove
+# define memmove(d, s, n) __builtin_memmove((d), (s), (n))
+#endif
+
+/* FIXME: __builtin_memcmp() is not yet fully useable unless llvm bug
+ * https://llvm.org/bugs/show_bug.cgi?id=26218 gets resolved. Also
+ * this one would generate a reloc entry (non-map), otherwise.
+ */
+#if 0
+#ifndef memcmp
+# define memcmp(a, b, n) __builtin_memcmp((a), (b), (n))
+#endif
+#endif
+
+unsigned long long load_byte(void *skb, unsigned long long off)
+ asm ("llvm.bpf.load.byte");
+
+unsigned long long load_half(void *skb, unsigned long long off)
+ asm ("llvm.bpf.load.half");
+
+unsigned long long load_word(void *skb, unsigned long long off)
+ asm ("llvm.bpf.load.word");
+
+#endif /* __BPF_API__ */
diff --git a/drivers/net/tap/tap_bpf_insns.c b/drivers/net/tap/tap_bpf_insns.c
new file mode 100644
index 0000000..951d037
--- /dev/null
+++ b/drivers/net/tap/tap_bpf_insns.c
@@ -0,0 +1,5427 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright 2017 6WIND S.A.
+ * Copyright 2017 Mellanox.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of 6WIND S.A. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <asm/types.h>
+#include <unistd.h>
+#include <string.h>
+#include <linux/in.h>
+#include <linux/if.h>
+#include <linux/if_ether.h>
+#include <linux/ip.h>
+#include <linux/ipv6.h>
+#include <linux/if_tunnel.h>
+#include <linux/filter.h>
+#include <linux/bpf.h>
+
+#include "tap_bpf_shared.h"
+
+#define ERROR 0
+
+/*
+ * The queue number is offset by 1, to distinguish packets that have
+ * gone through this rule (skb->cb[1] != 0) from others.
+ */
+#define QUEUE_OFFSET 1
+
+#define INV_KEY_IDX 0xdeadbeef
+
+/*
+ *
+ * __section("maps")
+ * struct bpf_elf_map map_keys = {
+ * .type = BPF_MAP_TYPE_HASH,
+ * .id = BPF_MAP_ID_KEY,
+ * .size_key = sizeof(__u32),
+ * .size_value = sizeof(struct rss_key),
+ * .max_elem = 256,
+ * .pinning = PIN_GLOBAL_NS,
+ * };
+ */
+
+/*
+ * struct bpf_insn {
+ * __u8 code; opcode
+ * __u8 dst_reg:4; dest register
+ * __u8 src_reg:4; source register
+ * __s16 off; signed offset
+ * __s32 imm; signed immediate constant
+ * };
+ */
+
+/*
+ * The next bpf_insn array matches cls_q section
+ * see tap_bpf_program.c file
+ *
+ * __section("cls_q") int
+ * match_q (struct __sk_buff *skb)
+ * {
+ * __u32 queue = skb->cb[1];
+ * volatile __u32 q = INV_KEY_IDX;
+ * __u32 match_queue = QUEUE_OFFSET + q;
+ *
+ * if (queue != match_queue)
+ * return TC_ACT_OK;
+ * return TC_ACT_UNSPEC;
+ *
+ * }
+ */
+
+static struct bpf_insn cls_q_insns[] = {
+ {0x61, 1, 1, 52, 0x00000000},
+ {0x18, 2, 0, 0, 0xdeadbeef},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x63, 10, 2, -4, 0x00000000},
+ {0x61, 2, 10, -4, 0x00000000},
+ {0x07, 2, 0, 0, 0x00000001},
+ {0x67, 2, 0, 0, 0x00000020},
+ {0x77, 2, 0, 0, 0x00000020},
+ {0xb7, 0, 0, 0, 0xffffffff},
+ {0x1d, 1, 2, 1, 0x00000000},
+ {0xb7, 0, 0, 0, 0x00000000},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define CLS_Q_INSNS_CNT \
+ (sizeof(cls_q_insns) / sizeof(cls_q_insns[0]))
+
+/**
+ * Load BPF program (section cls_q) into the kernel and return a bpf fd
+ *
+ * @param queue_idx
+ * Queue index matching packet cb
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_cls_q_insns(__u32 queue_idx)
+{
+ cls_q_insns[1].imm = queue_idx;
+
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)cls_q_insns,
+ CLS_Q_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches tailing section
+ * see tap_bpf_program.c file
+ *
+ * __section("tailing") int
+ * tail(struct __sk_buff *skb)
+ * {
+ * skb_change_tail(skb, skb->len + sizeof(__u32), 0);
+ *
+ * return TC_ACT_UNSPEC;
+ * }
+ */
+
+static struct bpf_insn tailing_insns[] = {
+ {0x61, 2, 1, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0x00000004},
+ {0xb7, 3, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000026},
+ {0x18, 0, 0, 0, 0xffffffff},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define TAILING_INSNS_CNT \
+ (sizeof(tailing_insns) / sizeof(tailing_insns[0]))
+
+/**
+ * Load BPF program (section tailing) into the kernel and return a bpf fd.
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_tailing_insns(void)
+{
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)tailing_insns,
+ TAILING_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches hash_pending section
+ * see tap_bpf_program.c file
+ *
+ * __section("hash_appending") int
+ * append_hash(struct __sk_buff *skb)
+ * {
+ * __u32 hash = skb->cb[0];
+ *
+ * skb_store_bytes(skb, skb->len - sizeof(hash), &hash, sizeof(hash), 0);
+ *
+ * return TC_ACT_PIPE;
+ * }
+ */
+
+static struct bpf_insn hash_appending_insns[] = {
+ {0x61, 2, 1, 48, 0x00000000},
+ {0x63, 10, 2, -4, 0x00000000},
+ {0x61, 2, 1, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0xfffffffc},
+ {0xbf, 3, 10, 0, 0x00000000},
+ {0x07, 3, 0, 0, 0xfffffffc},
+ {0xb7, 4, 0, 0, 0x00000004},
+ {0xb7, 5, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000009},
+ {0xb7, 0, 0, 0, 0x00000003},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define HASH_APPENDING_INSNS_CNT \
+ (sizeof(hash_appending_insns) / sizeof(hash_appending_insns[0]))
+
+/**
+ * Load BPF program into the kernel and return a bpf fd.
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_hash_appending_insns(void)
+{
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)hash_appending_insns,
+ HASH_APPENDING_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches queue_setting section
+ * see tap_bpf_program.c file
+ *
+ * static void __attribute__((always_inline))
+ * __section("queue_setting") int
+ * set_queue(struct __sk_buff *skb)
+ * {
+ * __u32 key_idx = INV_KEY_IDX;
+ * __u64 hash = skb->cb[0];
+ * struct rss_key *rsskey;
+ * __u32 queue = 0;
+ *
+ * rsskey = map_lookup_elem(&map_keys, &key_idx);
+ * if (rsskey && rsskey->nb_queues <= TAP_MAX_QUEUES)
+ * queue = rsskey->queues[(hash % rsskey->nb_queues) &
+ * (TAP_MAX_QUEUES - 1)];
+ *
+ * skb->cb[1] = QUEUE_OFFSET + queue;
+ *
+ * return TC_ACT_RECLASSIFY;
+ * }
+ */
+
+static struct bpf_insn queue_setting_insns[] = {
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0x18, 1, 0, 0, 0xdeadbeef},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x63, 10, 1, -4, 0x00000000},
+ {0x61, 7, 6, 48, 0x00000000},
+ {0xbf, 2, 10, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0xfffffffc},
+ {0x18, 1, 1, 0, 0xffffffff},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000001},
+ {0xb7, 1, 0, 0, 0x00000001},
+ {0x15, 0, 0, 13, 0x00000000},
+ {0x61, 2, 0, 200, 0x00000000},
+ {0x25, 2, 0, 11, 0x00000010},
+ {0x67, 7, 0, 0, 0x00000020},
+ {0x77, 7, 0, 0, 0x00000020},
+ {0xbf, 1, 7, 0, 0x00000000},
+ {0x3f, 1, 2, 0, 0x00000000},
+ {0x2f, 1, 2, 0, 0x00000000},
+ {0x1f, 7, 1, 0, 0x00000000},
+ {0x57, 7, 0, 0, 0x0000000f},
+ {0x67, 7, 0, 0, 0x00000002},
+ {0x0f, 0, 7, 0, 0x00000000},
+ {0x61, 1, 0, 136, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000001},
+ {0x63, 6, 1, 52, 0x00000000},
+ {0xb7, 0, 0, 0, 0x00000001},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define QUEUE_SETTING_INSNS_CNT \
+ (sizeof(queue_setting_insns) / sizeof(queue_setting_insns[0]))
+
+/**
+ * Load BPF program (section queue_setting) into the kernel and return a bpf fd
+ *
+ * @param queue_idx
+ * Queue index matching packet cb
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_queue_setting_insns(__u32 queue_idx)
+{
+ queue_setting_insns[1].imm = queue_idx;
+
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)queue_setting_insns,
+ QUEUE_SETTING_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches l2_src_hash section
+ * see tap_bpf_program.c file
+ *
+ * #define HASH(L) \
+ * __section(#L) int \
+ * L ## _hash(struct __sk_buff *skb) \
+ * { \
+ * return hash(skb, HASH_FIELD_ ## L); \
+ * }
+ *
+ * HASH(L2_SRC)
+ */
+
+
+static struct bpf_insn l2_src_hash_insns[] = {
+ {0xbf, 7, 1, 0, 0x00000000},
+ {0x61, 6, 7, 16, 0x00000000},
+ {0x61, 9, 7, 76, 0x00000000},
+ {0x61, 8, 7, 80, 0x00000000},
+ {0x18, 1, 0, 0, 0xdeadbeef},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x63, 10, 1, -4, 0x00000000},
+ {0x61, 1, 7, 48, 0x00000000},
+ {0x7b, 10, 1, -56, 0x00000000},
+ {0xbf, 2, 10, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0xfffffffc},
+ {0x18, 1, 1, 0, 0xffffffff},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000001},
+ {0x55, 0, 0, 21, 0x00000000},
+ {0xb7, 1, 0, 0, 0x00000a64},
+ {0x6b, 10, 1, -16, 0x00000000},
+ {0x18, 1, 0, 0, 0x69666e6f},
+ {0x00, 0, 0, 0, 0x65727567},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x6e207369},
+ {0x00, 0, 0, 0, 0x6320746f},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x20737372},
+ {0x00, 0, 0, 0, 0x2079656b},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x203a2928},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x73, 10, 7, -14, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000023},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0x05, 0, 0, 543, 0x00000000},
+ {0xb7, 1, 0, 0, 0x0000000e},
+ {0x61, 2, 7, 20, 0x00000000},
+ {0x15, 2, 0, 10, 0x00000000},
+ {0x61, 2, 7, 28, 0x00000000},
+ {0x55, 2, 0, 8, 0x0000a888},
+ {0xbf, 2, 7, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000012},
+ {0x2d, 1, 8, 533, 0x00000000},
+ {0xb7, 1, 0, 0, 0x00000012},
+ {0x69, 6, 9, 16, 0x00000000},
+ {0xbf, 7, 2, 0, 0x00000000},
+ {0x61, 2, 0, 128, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0x1d, 3, 4, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000006},
+ {0x57, 2, 0, 0, 0x00000002},
+ {0x15, 2, 0, 508, 0x00000000},
+ {0x7b, 10, 7, -64, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x0000000c},
+ {0x2d, 1, 8, 517, 0x00000000},
+ {0x71, 1, 0, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000018},
+ {0x71, 6, 0, 1, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000010},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 2, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000008},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 3, 0x00000000},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 5, 9, 6, 0x00000000},
+ {0x67, 5, 0, 0, 0x00000038},
+ {0xc7, 5, 0, 0, 0x00000038},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0xb7, 3, 0, 0, 0xffffffff},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0x6d, 5, 3, 1, 0x00000000},
+ {0xbf, 4, 6, 0, 0x00000000},
+ {0x79, 1, 10, -56, 0x00000000},
+ {0xaf, 4, 1, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000001},
+ {0x71, 7, 0, 4, 0x00000000},
+ {0xbf, 1, 7, 0, 0x00000000},
+ {0x77, 1, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003f},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x57, 7, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 7, 0, 0x00000000},
+ {0x71, 5, 9, 7, 0x00000000},
+ {0x67, 5, 0, 0, 0x00000038},
+ {0xc7, 5, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 5, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 7, 0, 5, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003f},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x57, 7, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 7, 0, 0x00000000},
+ {0x71, 5, 9, 8, 0x00000000},
+ {0x67, 5, 0, 0, 0x00000038},
+ {0xc7, 5, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 5, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 7, 0, 6, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003f},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x57, 7, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 7, 0, 0x00000000},
+ {0x71, 5, 9, 9, 0x00000000},
+ {0x67, 5, 0, 0, 0x00000038},
+ {0xc7, 5, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 5, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 7, 0, 7, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003f},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x57, 7, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 7, 0, 0x00000000},
+ {0x71, 5, 9, 10, 0x00000000},
+ {0x67, 5, 0, 0, 0x00000038},
+ {0xc7, 5, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 5, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 7, 0, 8, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003f},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x57, 7, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 7, 0, 0x00000000},
+ {0x71, 5, 9, 11, 0x00000000},
+ {0x67, 5, 0, 0, 0x00000038},
+ {0xc7, 5, 0, 0, 0x00000038},
+ {0x6d, 5, 3, 1, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0xaf, 4, 2, 0, 0x00000000},
+ {0x71, 2, 0, 9, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000007},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 5, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000039},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000006},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 5, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003a},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000005},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 5, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003b},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000004},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 5, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003c},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000003},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 5, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003d},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000002},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 5, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003e},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x77, 2, 0, 0, 0x00000001},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 2, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003f},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x79, 1, 10, -64, 0x00000000},
+ {0x63, 1, 4, 48, 0x00000000},
+ {0x18, 1, 0, 0, 0x25203d20},
+ {0x00, 0, 0, 0, 0x000a2964},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x20782520},
+ {0x00, 0, 0, 0, 0x66666f28},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x6168203a},
+ {0x00, 0, 0, 0, 0x3d206873},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x29642528},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000020},
+ {0xb7, 3, 0, 0, 0x00000001},
+ {0xb7, 5, 0, 0, 0x00000006},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0x05, 0, 0, 13, 0x00000000},
+ {0x57, 6, 0, 0, 0x0000ffff},
+ {0x15, 6, 0, 7, 0x0000dd86},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x55, 6, 0, 10, 0x00000008},
+ {0x0f, 9, 1, 0, 0x00000000},
+ {0x07, 9, 0, 0, 0x00000014},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x2d, 9, 8, 6, 0x00000000},
+ {0x05, 0, 0, 4, 0x00000000},
+ {0x0f, 9, 1, 0, 0x00000000},
+ {0x07, 9, 0, 0, 0x00000028},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x2d, 9, 8, 1, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0xbf, 0, 7, 0, 0x00000000},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define L2_SRC_HASH_INSNS_CNT \
+ (sizeof(l2_src_hash_insns) / sizeof(l2_src_hash_insns[0]))
+
+/**
+ * Load BPF program (section l2_src_hash) into the kernel and return a bpf fd.
+ *
+ * @param key_idx
+ * RSS MAP key index
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_l2_src_hash_insns(__u32 key_idx)
+{
+ l2_src_hash_insns[4].imm = key_idx;
+
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)l2_src_hash_insns,
+ L2_SRC_HASH_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches l2_dst_hash section
+ * see tap_bpf_program.c file
+ *
+ * HASH(L2_DST)
+ */
+
+static struct bpf_insn l2_dst_hash_insns[] = {
+ {0xbf, 7, 1, 0, 0x00000000},
+ {0x61, 6, 7, 16, 0x00000000},
+ {0x61, 9, 7, 76, 0x00000000},
+ {0x61, 8, 7, 80, 0x00000000},
+ {0x18, 1, 0, 0, 0xdeadbeef},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x63, 10, 1, -4, 0x00000000},
+ {0x61, 1, 7, 48, 0x00000000},
+ {0x7b, 10, 1, -56, 0x00000000},
+ {0xbf, 2, 10, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0xfffffffc},
+ {0x18, 1, 1, 0, 0xffffffff},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000001},
+ {0x55, 0, 0, 21, 0x00000000},
+ {0xb7, 1, 0, 0, 0x00000a64},
+ {0x6b, 10, 1, -16, 0x00000000},
+ {0x18, 1, 0, 0, 0x69666e6f},
+ {0x00, 0, 0, 0, 0x65727567},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x6e207369},
+ {0x00, 0, 0, 0, 0x6320746f},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x20737372},
+ {0x00, 0, 0, 0, 0x2079656b},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x203a2928},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x73, 10, 7, -14, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000023},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0x05, 0, 0, 538, 0x00000000},
+ {0xb7, 1, 0, 0, 0x0000000e},
+ {0x61, 2, 7, 20, 0x00000000},
+ {0x15, 2, 0, 10, 0x00000000},
+ {0x61, 2, 7, 28, 0x00000000},
+ {0x55, 2, 0, 8, 0x0000a888},
+ {0xbf, 2, 7, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000012},
+ {0x2d, 1, 8, 528, 0x00000000},
+ {0xb7, 1, 0, 0, 0x00000012},
+ {0x69, 6, 9, 16, 0x00000000},
+ {0xbf, 7, 2, 0, 0x00000000},
+ {0x71, 2, 0, 128, 0x00000000},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x15, 2, 0, 508, 0x00000000},
+ {0xbf, 5, 7, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000006},
+ {0x2d, 1, 8, 517, 0x00000000},
+ {0x71, 1, 0, 1, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000010},
+ {0x71, 6, 0, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000018},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 2, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000008},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 3, 0x00000000},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 3, 9, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000038},
+ {0xc7, 3, 0, 0, 0x00000038},
+ {0xb7, 2, 0, 0, 0xffffffff},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0xbf, 7, 5, 0, 0x00000000},
+ {0x6d, 3, 2, 1, 0x00000000},
+ {0xbf, 4, 6, 0, 0x00000000},
+ {0x79, 1, 10, -56, 0x00000000},
+ {0xaf, 4, 1, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000001},
+ {0x71, 5, 0, 4, 0x00000000},
+ {0xbf, 1, 5, 0, 0x00000000},
+ {0x77, 1, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003f},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0x71, 3, 9, 1, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000038},
+ {0xc7, 3, 0, 0, 0x00000038},
+ {0xb7, 5, 0, 0, 0x00000000},
+ {0x6d, 3, 2, 1, 0x00000000},
+ {0xbf, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 5, 0, 5, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003f},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0x71, 3, 9, 2, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000038},
+ {0xc7, 3, 0, 0, 0x00000038},
+ {0xb7, 5, 0, 0, 0x00000000},
+ {0x6d, 3, 2, 1, 0x00000000},
+ {0xbf, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 5, 0, 6, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003f},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0x71, 3, 9, 3, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000038},
+ {0xc7, 3, 0, 0, 0x00000038},
+ {0xb7, 5, 0, 0, 0x00000000},
+ {0x6d, 3, 2, 1, 0x00000000},
+ {0xbf, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 5, 0, 7, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003f},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0x71, 3, 9, 4, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000038},
+ {0xc7, 3, 0, 0, 0x00000038},
+ {0xb7, 5, 0, 0, 0x00000000},
+ {0x6d, 3, 2, 1, 0x00000000},
+ {0xbf, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 5, 0, 8, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 3, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 5, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003f},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0x71, 3, 9, 5, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000038},
+ {0xc7, 3, 0, 0, 0x00000038},
+ {0xb7, 5, 0, 0, 0x00000000},
+ {0x6d, 3, 2, 1, 0x00000000},
+ {0xbf, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x71, 2, 0, 9, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 5, 2, 0, 0x00000000},
+ {0x77, 5, 0, 0, 0x00000007},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0xbf, 5, 3, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x00000039},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0xbf, 5, 2, 0, 0x00000000},
+ {0x77, 5, 0, 0, 0x00000006},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0xbf, 5, 3, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003a},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0xbf, 5, 2, 0, 0x00000000},
+ {0x77, 5, 0, 0, 0x00000005},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0xbf, 5, 3, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003b},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0xbf, 5, 2, 0, 0x00000000},
+ {0x77, 5, 0, 0, 0x00000004},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0xbf, 5, 3, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003c},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0xbf, 5, 2, 0, 0x00000000},
+ {0x77, 5, 0, 0, 0x00000003},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0xbf, 5, 3, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003d},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0xbf, 5, 2, 0, 0x00000000},
+ {0x77, 5, 0, 0, 0x00000002},
+ {0x57, 5, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 5, 0, 0x00000000},
+ {0xbf, 5, 3, 0, 0x00000000},
+ {0x67, 5, 0, 0, 0x0000003e},
+ {0xc7, 5, 0, 0, 0x0000003f},
+ {0x5f, 5, 1, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x77, 2, 0, 0, 0x00000001},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 2, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003f},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x63, 7, 4, 48, 0x00000000},
+ {0x18, 1, 0, 0, 0x25203d20},
+ {0x00, 0, 0, 0, 0x000a2964},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x20782520},
+ {0x00, 0, 0, 0, 0x66666f28},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x6168203a},
+ {0x00, 0, 0, 0, 0x3d206873},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x29642528},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000020},
+ {0xb7, 3, 0, 0, 0x00000000},
+ {0xb7, 5, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0x05, 0, 0, 13, 0x00000000},
+ {0x57, 6, 0, 0, 0x0000ffff},
+ {0x15, 6, 0, 7, 0x0000dd86},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x55, 6, 0, 10, 0x00000008},
+ {0x0f, 9, 1, 0, 0x00000000},
+ {0x07, 9, 0, 0, 0x00000014},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x2d, 9, 8, 6, 0x00000000},
+ {0x05, 0, 0, 4, 0x00000000},
+ {0x0f, 9, 1, 0, 0x00000000},
+ {0x07, 9, 0, 0, 0x00000028},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x2d, 9, 8, 1, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0xbf, 0, 7, 0, 0x00000000},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+#define L2_DST_HASH_INSNS_CNT \
+ (sizeof(l2_dst_hash_insns) / sizeof(l2_dst_hash_insns[0]))
+
+/**
+ * Load BPF program (section l2_dst_hash) into the kernel and return a bpf fd.
+ *
+ * @param key_idx
+ * RSS MAP key index
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_l2_dst_hash_insns(__u32 key_idx)
+{
+ l2_dst_hash_insns[4].imm = key_idx;
+
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)l2_dst_hash_insns,
+ L2_DST_HASH_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches l3_dst_hash section
+ * see tap_bpf_program.c file
+ *
+ * HASH(L3_DST)
+ */
+
+
+static struct bpf_insn l3_dst_hash_insns[] = {
+ {0xbf, 7, 1, 0, 0x00000000},
+ {0x61, 6, 7, 16, 0x00000000},
+ {0x61, 9, 7, 76, 0x00000000},
+ {0x61, 8, 7, 80, 0x00000000},
+ {0x18, 1, 0, 0, 0xdeadbeef},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x63, 10, 1, -4, 0x00000000},
+ {0x61, 1, 7, 48, 0x00000000},
+ {0x7b, 10, 1, -56, 0x00000000},
+ {0xbf, 2, 10, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0xfffffffc},
+ {0x18, 1, 1, 0, 0xffffffff},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000001},
+ {0x55, 0, 0, 21, 0x00000000},
+ {0xb7, 1, 0, 0, 0x00000a64},
+ {0x6b, 10, 1, -16, 0x00000000},
+ {0x18, 1, 0, 0, 0x69666e6f},
+ {0x00, 0, 0, 0, 0x65727567},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x6e207369},
+ {0x00, 0, 0, 0, 0x6320746f},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x20737372},
+ {0x00, 0, 0, 0, 0x2079656b},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x203a2928},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x73, 10, 7, -14, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000023},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0x05, 0, 0, 1689, 0x00000000},
+ {0xb7, 5, 0, 0, 0x0000000e},
+ {0x61, 1, 7, 20, 0x00000000},
+ {0x15, 1, 0, 10, 0x00000000},
+ {0x61, 1, 7, 28, 0x00000000},
+ {0x55, 1, 0, 8, 0x0000a888},
+ {0xbf, 2, 7, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000012},
+ {0x2d, 1, 8, 1679, 0x00000000},
+ {0xb7, 5, 0, 0, 0x00000012},
+ {0x69, 6, 9, 16, 0x00000000},
+ {0xbf, 7, 2, 0, 0x00000000},
+ {0x61, 1, 0, 128, 0x00000000},
+ {0xbf, 3, 1, 0, 0x00000000},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0x1d, 3, 2, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000006},
+ {0x7b, 10, 7, -64, 0x00000000},
+ {0xbf, 3, 1, 0, 0x00000000},
+ {0x57, 3, 0, 0, 0x00000002},
+ {0x1d, 3, 2, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000006},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x0000ffff},
+ {0x15, 6, 0, 355, 0x0000dd86},
+ {0x55, 6, 0, 1661, 0x00000008},
+ {0x0f, 9, 5, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 2, 9, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0x00000014},
+ {0x2d, 2, 8, 1656, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0x57, 2, 0, 0, 0x00000004},
+ {0xb7, 3, 0, 0, 0x00000000},
+ {0x1d, 2, 3, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000004},
+ {0x57, 1, 0, 0, 0x00000008},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x15, 1, 0, 1648, 0x00000000},
+ {0x71, 1, 0, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000018},
+ {0x71, 6, 0, 1, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000010},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 2, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000008},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 3, 0x00000000},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x71, 7, 8, 16, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0xb7, 3, 0, 0, 0xffffffff},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 4, 6, 0, 0x00000000},
+ {0x79, 1, 10, -56, 0x00000000},
+ {0xaf, 4, 1, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000001},
+ {0x71, 9, 0, 4, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x77, 1, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 17, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 5, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 18, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 6, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 19, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0xaf, 4, 2, 0, 0x00000000},
+ {0x71, 2, 0, 7, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000007},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000039},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000006},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003a},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000005},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003b},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000004},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003c},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000003},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003d},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000002},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003e},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x77, 2, 0, 0, 0x00000001},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 2, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x79, 1, 10, -64, 0x00000000},
+ {0x63, 1, 4, 48, 0x00000000},
+ {0x18, 1, 0, 0, 0x25203d20},
+ {0x00, 0, 0, 0, 0x000a2964},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x20782520},
+ {0x00, 0, 0, 0, 0x66666f28},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x6168203a},
+ {0x00, 0, 0, 0, 0x3d206873},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x29642528},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0x07, 5, 0, 0, 0x00000010},
+ {0x05, 0, 0, 1301, 0x00000000},
+ {0x0f, 9, 5, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 2, 9, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0x00000028},
+ {0x2d, 2, 8, 1302, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0x57, 2, 0, 0, 0x00000004},
+ {0xb7, 3, 0, 0, 0x00000000},
+ {0x1d, 2, 3, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000010},
+ {0x57, 1, 0, 0, 0x00000008},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x15, 1, 0, 1294, 0x00000000},
+ {0x71, 1, 0, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000018},
+ {0x71, 6, 0, 1, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000010},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 2, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000008},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 3, 0x00000000},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x71, 7, 8, 24, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0xb7, 3, 0, 0, 0xffffffff},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 4, 6, 0, 0x00000000},
+ {0x79, 1, 10, -56, 0x00000000},
+ {0xaf, 4, 1, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000001},
+ {0x71, 9, 0, 4, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x77, 1, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 25, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 5, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 26, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 6, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 27, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 7, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 28, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 8, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 29, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 9, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 30, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 10, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 31, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 11, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 32, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 12, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 33, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 13, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 34, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 14, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 35, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 15, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 36, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 16, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 37, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 17, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 38, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 18, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 39, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0xaf, 4, 2, 0, 0x00000000},
+ {0x71, 2, 0, 19, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000007},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000039},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000006},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003a},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000005},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003b},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000004},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003c},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000003},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003d},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000002},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003e},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x77, 2, 0, 0, 0x00000001},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 2, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x79, 1, 10, -64, 0x00000000},
+ {0x63, 1, 4, 48, 0x00000000},
+ {0x18, 1, 0, 0, 0x25203d20},
+ {0x00, 0, 0, 0, 0x000a2964},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x20782520},
+ {0x00, 0, 0, 0, 0x66666f28},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x6168203a},
+ {0x00, 0, 0, 0, 0x3d206873},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x29642528},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0x07, 5, 0, 0, 0x00000018},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0xb7, 2, 0, 0, 0x00000020},
+ {0xb7, 3, 0, 0, 0x00000003},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0xbf, 0, 7, 0, 0x00000000},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define L3_DST_HASH_INSNS_CNT \
+ (sizeof(l3_dst_hash_insns) / sizeof(l3_dst_hash_insns[0]))
+
+/**
+ * Load BPF program (section l3_dst_hash) into the kernel and return a bpf fd.
+ *
+ * @param queue_idx
+ * RSS MAP key index
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_l3_dst_hash_insns(__u32 key_idx)
+{
+ l3_dst_hash_insns[4].imm = key_idx;
+
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)l3_dst_hash_insns,
+ L3_DST_HASH_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches l3_src_hash section
+ * see tap_bpf_program.c file
+ *
+ * HASH(L3_SRC)
+ */
+
+static struct bpf_insn l3_src_hash_insns[] = {
+ {0xbf, 7, 1, 0, 0x00000000},
+ {0x61, 6, 7, 16, 0x00000000},
+ {0x61, 9, 7, 76, 0x00000000},
+ {0x61, 8, 7, 80, 0x00000000},
+ {0x18, 1, 0, 0, 0xdeadbeef},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x63, 10, 1, -4, 0x00000000},
+ {0x61, 1, 7, 48, 0x00000000},
+ {0x7b, 10, 1, -56, 0x00000000},
+ {0xbf, 2, 10, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0xfffffffc},
+ {0x18, 1, 1, 0, 0xffffffff},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000001},
+ {0x55, 0, 0, 21, 0x00000000},
+ {0xb7, 1, 0, 0, 0x00000a64},
+ {0x6b, 10, 1, -16, 0x00000000},
+ {0x18, 1, 0, 0, 0x69666e6f},
+ {0x00, 0, 0, 0, 0x65727567},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x6e207369},
+ {0x00, 0, 0, 0, 0x6320746f},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x20737372},
+ {0x00, 0, 0, 0, 0x2079656b},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x203a2928},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x73, 10, 7, -14, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000023},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0x05, 0, 0, 1679, 0x00000000},
+ {0xb7, 5, 0, 0, 0x0000000e},
+ {0x61, 1, 7, 20, 0x00000000},
+ {0x15, 1, 0, 10, 0x00000000},
+ {0x61, 1, 7, 28, 0x00000000},
+ {0x55, 1, 0, 8, 0x0000a888},
+ {0xbf, 2, 7, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000012},
+ {0x2d, 1, 8, 1669, 0x00000000},
+ {0xb7, 5, 0, 0, 0x00000012},
+ {0x69, 6, 9, 16, 0x00000000},
+ {0xbf, 7, 2, 0, 0x00000000},
+ {0x61, 1, 0, 128, 0x00000000},
+ {0xbf, 3, 1, 0, 0x00000000},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0x1d, 3, 2, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000006},
+ {0xbf, 3, 1, 0, 0x00000000},
+ {0x57, 3, 0, 0, 0x00000002},
+ {0x1d, 3, 2, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000006},
+ {0x7b, 10, 7, -64, 0x00000000},
+ {0x57, 6, 0, 0, 0x0000ffff},
+ {0x15, 6, 0, 351, 0x0000dd86},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x55, 6, 0, 1651, 0x00000008},
+ {0x0f, 9, 5, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 2, 9, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0x00000014},
+ {0x2d, 2, 8, 1646, 0x00000000},
+ {0x57, 1, 0, 0, 0x00000004},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x15, 1, 0, 1643, 0x00000000},
+ {0x71, 1, 0, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000018},
+ {0x71, 6, 0, 1, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000010},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 2, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000008},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 3, 0x00000000},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x71, 7, 8, 12, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0xb7, 3, 0, 0, 0xffffffff},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 4, 6, 0, 0x00000000},
+ {0x79, 1, 10, -56, 0x00000000},
+ {0xaf, 4, 1, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000001},
+ {0x71, 9, 0, 4, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x77, 1, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 13, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 5, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 14, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 6, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 15, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0xaf, 4, 2, 0, 0x00000000},
+ {0x71, 2, 0, 7, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000007},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000039},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000006},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003a},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000005},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003b},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000004},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003c},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000003},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003d},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000002},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003e},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x77, 2, 0, 0, 0x00000001},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 2, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x79, 1, 10, -64, 0x00000000},
+ {0x63, 1, 4, 48, 0x00000000},
+ {0x18, 1, 0, 0, 0x25203d20},
+ {0x00, 0, 0, 0, 0x000a2964},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x20782520},
+ {0x00, 0, 0, 0, 0x66666f28},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x6168203a},
+ {0x00, 0, 0, 0, 0x3d206873},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x29642528},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0x07, 5, 0, 0, 0x0000000c},
+ {0x05, 0, 0, 1296, 0x00000000},
+ {0x0f, 9, 5, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 2, 9, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0x00000028},
+ {0x2d, 2, 8, 1297, 0x00000000},
+ {0x57, 1, 0, 0, 0x00000004},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x15, 1, 0, 1294, 0x00000000},
+ {0x71, 1, 0, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000018},
+ {0x71, 6, 0, 1, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000010},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 2, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000008},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0x71, 1, 0, 3, 0x00000000},
+ {0x4f, 6, 1, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x71, 7, 8, 8, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0xb7, 3, 0, 0, 0xffffffff},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 4, 6, 0, 0x00000000},
+ {0x79, 1, 10, -56, 0x00000000},
+ {0xaf, 4, 1, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000001},
+ {0x71, 9, 0, 4, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x77, 1, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 9, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 5, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 10, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 6, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 11, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 7, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 12, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 8, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 13, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 9, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 14, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 10, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 15, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 11, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 16, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 12, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 17, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 13, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 18, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 14, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 19, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 15, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 20, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 16, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 21, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 17, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 22, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 6, 0, 0, 0x00000000},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x71, 9, 0, 18, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000007},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x00000039},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000006},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003a},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000005},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003b},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000004},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003c},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000003},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003d},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000002},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0xbf, 6, 7, 0, 0x00000000},
+ {0x67, 6, 0, 0, 0x0000003e},
+ {0xc7, 6, 0, 0, 0x0000003f},
+ {0x5f, 6, 1, 0, 0x00000000},
+ {0xaf, 4, 6, 0, 0x00000000},
+ {0xbf, 6, 9, 0, 0x00000000},
+ {0x77, 6, 0, 0, 0x00000001},
+ {0x57, 6, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 6, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 8, 23, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0xaf, 4, 2, 0, 0x00000000},
+ {0x71, 2, 0, 19, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000007},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000039},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000006},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003a},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000005},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003b},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000004},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003c},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000003},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003d},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000002},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003e},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x77, 2, 0, 0, 0x00000001},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 2, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x79, 1, 10, -64, 0x00000000},
+ {0x63, 1, 4, 48, 0x00000000},
+ {0x18, 1, 0, 0, 0x25203d20},
+ {0x00, 0, 0, 0, 0x000a2964},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x20782520},
+ {0x00, 0, 0, 0, 0x66666f28},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x6168203a},
+ {0x00, 0, 0, 0, 0x3d206873},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x29642528},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0x07, 5, 0, 0, 0x00000008},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000020},
+ {0xb7, 3, 0, 0, 0x00000002},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0xbf, 0, 7, 0, 0x00000000},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define L3_SRC_HASH_INSNS_CNT \
+ (sizeof(l3_src_hash_insns) / sizeof(l3_src_hash_insns[0]))
+
+/**
+ * Load BPF program (section l3_src_hash) into the kernel and return a bpf fd.
+ *
+ * @param queue_idx
+ * RSS MAP key index
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_l3_src_hash_insns(__u32 key_idx)
+{
+ l3_src_hash_insns[4].imm = key_idx;
+
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)l3_src_hash_insns,
+ L3_SRC_HASH_INSNS_CNT,
+ "GPL", 0);
+}
+
+/*
+ * The next bpf_insn array matches l4_src_hash section
+ * see tap_bpf_program.c file
+ *
+ * HASH(L4_SRC)
+ */
+
+static struct bpf_insn l4_src_hash_insns[] = {
+ {0xbf, 6, 1, 0, 0x00000000},
+ {0x61, 8, 6, 16, 0x00000000},
+ {0x61, 9, 6, 76, 0x00000000},
+ {0x61, 1, 6, 80, 0x00000000},
+ {0x7b, 10, 1, -56, 0x00000000},
+ {0x18, 1, 0, 0, 0xdeadbeef},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x63, 10, 1, -4, 0x00000000},
+ {0x61, 7, 6, 48, 0x00000000},
+ {0xbf, 2, 10, 0, 0x00000000},
+ {0x07, 2, 0, 0, 0xfffffffc},
+ {0x18, 1, 1, 0, 0xffffffff},
+ {0x00, 0, 0, 0, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000001},
+ {0x55, 0, 0, 21, 0x00000000},
+ {0xb7, 1, 0, 0, 0x00000a64},
+ {0x6b, 10, 1, -16, 0x00000000},
+ {0x18, 1, 0, 0, 0x69666e6f},
+ {0x00, 0, 0, 0, 0x65727567},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x6e207369},
+ {0x00, 0, 0, 0, 0x6320746f},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x20737372},
+ {0x00, 0, 0, 0, 0x2079656b},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x203a2928},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0x73, 10, 7, -14, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000023},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0x05, 0, 0, 272, 0x00000000},
+ {0xb7, 4, 0, 0, 0x0000000e},
+ {0x61, 1, 6, 20, 0x00000000},
+ {0x15, 1, 0, 11, 0x00000000},
+ {0x61, 1, 6, 28, 0x00000000},
+ {0x55, 1, 0, 9, 0x0000a888},
+ {0xbf, 2, 7, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000012},
+ {0x79, 3, 10, -56, 0x00000000},
+ {0x2d, 1, 3, 261, 0x00000000},
+ {0xb7, 4, 0, 0, 0x00000012},
+ {0x69, 8, 9, 16, 0x00000000},
+ {0xbf, 7, 2, 0, 0x00000000},
+ {0x61, 1, 0, 128, 0x00000000},
+ {0xbf, 3, 1, 0, 0x00000000},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0x1d, 3, 2, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000006},
+ {0xbf, 3, 1, 0, 0x00000000},
+ {0x57, 3, 0, 0, 0x00000002},
+ {0x1d, 3, 2, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000006},
+ {0x57, 8, 0, 0, 0x0000ffff},
+ {0x15, 8, 0, 24, 0x0000dd86},
+ {0xbf, 5, 7, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x55, 8, 0, 243, 0x00000008},
+ {0xbf, 2, 9, 0, 0x00000000},
+ {0x0f, 2, 4, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x07, 3, 0, 0, 0x00000014},
+ {0x79, 8, 10, -56, 0x00000000},
+ {0x2d, 3, 8, 236, 0x00000000},
+ {0xbf, 7, 4, 0, 0x00000000},
+ {0xbf, 4, 1, 0, 0x00000000},
+ {0x57, 4, 0, 0, 0x00000004},
+ {0xb7, 3, 0, 0, 0x00000000},
+ {0x1d, 4, 3, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000004},
+ {0xbf, 4, 1, 0, 0x00000000},
+ {0x57, 4, 0, 0, 0x00000008},
+ {0x1d, 4, 3, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000004},
+ {0xbf, 4, 7, 0, 0x00000000},
+ {0x07, 4, 0, 0, 0x00000014},
+ {0x07, 2, 0, 0, 0x00000009},
+ {0x05, 0, 0, 21, 0x00000000},
+ {0xbf, 5, 7, 0, 0x00000000},
+ {0xbf, 2, 9, 0, 0x00000000},
+ {0x0f, 2, 4, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x07, 3, 0, 0, 0x00000028},
+ {0x79, 8, 10, -56, 0x00000000},
+ {0x2d, 3, 8, 214, 0x00000000},
+ {0xbf, 7, 4, 0, 0x00000000},
+ {0xbf, 4, 1, 0, 0x00000000},
+ {0x57, 4, 0, 0, 0x00000004},
+ {0xb7, 3, 0, 0, 0x00000000},
+ {0x1d, 4, 3, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000010},
+ {0xbf, 4, 1, 0, 0x00000000},
+ {0x57, 4, 0, 0, 0x00000008},
+ {0x1d, 4, 3, 1, 0x00000000},
+ {0x07, 0, 0, 0, 0x00000010},
+ {0xbf, 4, 7, 0, 0x00000000},
+ {0x07, 4, 0, 0, 0x00000028},
+ {0x07, 2, 0, 0, 0x00000006},
+ {0x71, 2, 2, 0, 0x00000000},
+ {0x15, 2, 0, 2, 0x00000011},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x55, 2, 0, 197, 0x00000006},
+ {0x57, 1, 0, 0, 0x00000010},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0x15, 1, 0, 194, 0x00000000},
+ {0xbf, 3, 9, 0, 0x00000000},
+ {0x0f, 3, 4, 0, 0x00000000},
+ {0xb7, 7, 0, 0, 0x00000000},
+ {0xbf, 1, 3, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0x00000002},
+ {0x79, 2, 10, -56, 0x00000000},
+ {0x2d, 1, 2, 187, 0x00000000},
+ {0x7b, 10, 4, -56, 0x00000000},
+ {0x71, 1, 0, 1, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000010},
+ {0x71, 8, 0, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x00000018},
+ {0x4f, 8, 1, 0, 0x00000000},
+ {0x71, 1, 0, 2, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000008},
+ {0x4f, 8, 1, 0, 0x00000000},
+ {0x71, 1, 0, 3, 0x00000000},
+ {0x4f, 8, 1, 0, 0x00000000},
+ {0x71, 7, 3, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 2, 0, 0, 0x00000000},
+ {0xb7, 1, 0, 0, 0xffffffff},
+ {0xb7, 4, 0, 0, 0x00000000},
+ {0x6d, 7, 1, 1, 0x00000000},
+ {0xbf, 4, 8, 0, 0x00000000},
+ {0xaf, 4, 5, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x00000001},
+ {0x71, 9, 0, 4, 0x00000000},
+ {0xbf, 1, 9, 0, 0x00000000},
+ {0x77, 1, 0, 0, 0x00000007},
+ {0x4f, 1, 8, 0, 0x00000000},
+ {0xbf, 8, 7, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x00000039},
+ {0xc7, 8, 0, 0, 0x0000003f},
+ {0x5f, 8, 1, 0, 0x00000000},
+ {0xaf, 4, 8, 0, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x77, 8, 0, 0, 0x00000006},
+ {0x57, 8, 0, 0, 0x00000001},
+ {0x4f, 1, 8, 0, 0x00000000},
+ {0xbf, 8, 7, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x0000003a},
+ {0xc7, 8, 0, 0, 0x0000003f},
+ {0x5f, 8, 1, 0, 0x00000000},
+ {0xaf, 4, 8, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x77, 8, 0, 0, 0x00000005},
+ {0x57, 8, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 8, 0, 0x00000000},
+ {0xbf, 8, 7, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x0000003b},
+ {0xc7, 8, 0, 0, 0x0000003f},
+ {0x5f, 8, 1, 0, 0x00000000},
+ {0xaf, 4, 8, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x77, 8, 0, 0, 0x00000004},
+ {0x57, 8, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 8, 0, 0x00000000},
+ {0xbf, 8, 7, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x0000003c},
+ {0xc7, 8, 0, 0, 0x0000003f},
+ {0x5f, 8, 1, 0, 0x00000000},
+ {0xaf, 4, 8, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x77, 8, 0, 0, 0x00000003},
+ {0x57, 8, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 8, 0, 0x00000000},
+ {0xbf, 8, 7, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x0000003d},
+ {0xc7, 8, 0, 0, 0x0000003f},
+ {0x5f, 8, 1, 0, 0x00000000},
+ {0xaf, 4, 8, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x77, 8, 0, 0, 0x00000002},
+ {0x57, 8, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 8, 0, 0x00000000},
+ {0xbf, 8, 7, 0, 0x00000000},
+ {0x67, 8, 0, 0, 0x0000003e},
+ {0xc7, 8, 0, 0, 0x0000003f},
+ {0x5f, 8, 1, 0, 0x00000000},
+ {0xaf, 4, 8, 0, 0x00000000},
+ {0xbf, 8, 9, 0, 0x00000000},
+ {0x77, 8, 0, 0, 0x00000001},
+ {0x57, 8, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 8, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x57, 9, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 9, 0, 0x00000000},
+ {0x71, 7, 3, 1, 0x00000000},
+ {0x67, 7, 0, 0, 0x00000038},
+ {0xc7, 7, 0, 0, 0x00000038},
+ {0xb7, 3, 0, 0, 0xffffffff},
+ {0x6d, 7, 3, 1, 0x00000000},
+ {0xbf, 2, 1, 0, 0x00000000},
+ {0xaf, 4, 2, 0, 0x00000000},
+ {0x71, 2, 0, 5, 0x00000000},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000007},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x00000039},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000006},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003a},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000005},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003b},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000004},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003c},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000003},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003d},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0xbf, 3, 2, 0, 0x00000000},
+ {0x77, 3, 0, 0, 0x00000002},
+ {0x57, 3, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 3, 0, 0x00000000},
+ {0xbf, 3, 7, 0, 0x00000000},
+ {0x67, 3, 0, 0, 0x0000003e},
+ {0xc7, 3, 0, 0, 0x0000003f},
+ {0x5f, 3, 1, 0, 0x00000000},
+ {0xaf, 4, 3, 0, 0x00000000},
+ {0x77, 2, 0, 0, 0x00000001},
+ {0x57, 2, 0, 0, 0x00000001},
+ {0x67, 1, 0, 0, 0x00000001},
+ {0x4f, 1, 2, 0, 0x00000000},
+ {0x67, 7, 0, 0, 0x0000003f},
+ {0xc7, 7, 0, 0, 0x0000003f},
+ {0x5f, 7, 1, 0, 0x00000000},
+ {0xaf, 4, 7, 0, 0x00000000},
+ {0x63, 6, 4, 48, 0x00000000},
+ {0x18, 1, 0, 0, 0x25203d20},
+ {0x00, 0, 0, 0, 0x000a2964},
+ {0x7b, 10, 1, -24, 0x00000000},
+ {0x18, 1, 0, 0, 0x20782520},
+ {0x00, 0, 0, 0, 0x66666f28},
+ {0x7b, 10, 1, -32, 0x00000000},
+ {0x18, 1, 0, 0, 0x6168203a},
+ {0x00, 0, 0, 0, 0x3d206873},
+ {0x7b, 10, 1, -40, 0x00000000},
+ {0x18, 1, 0, 0, 0x68736168},
+ {0x00, 0, 0, 0, 0x29642528},
+ {0x7b, 10, 1, -48, 0x00000000},
+ {0xbf, 1, 10, 0, 0x00000000},
+ {0x07, 1, 0, 0, 0xffffffd0},
+ {0xb7, 2, 0, 0, 0x00000020},
+ {0xb7, 3, 0, 0, 0x00000004},
+ {0x79, 5, 10, -56, 0x00000000},
+ {0x85, 0, 0, 0, 0x00000006},
+ {0xb7, 7, 0, 0, 0x00000003},
+ {0xbf, 0, 7, 0, 0x00000000},
+ {0x95, 0, 0, 0, 0x00000000},
+};
+
+#define L4_SRC_HASH_INSNS_CNT \
+ (sizeof(l4_src_hash_insns) / sizeof(l4_src_hash_insns[0]))
+
+/**
+ * Load BPF program (section l4_src_hash) into the kernel and return a bpf fd.
+ *
+ * @param queue_idx
+ * RSS MAP key index
+ *
+ * @return
+ * -1 if the BPF program couldn't be loaded. An fd (int) otherwise.
+ */
+int bpf_load_l4_src_hash_insns(__u32 key_idx)
+{
+ l4_src_hash_insns[4].imm = key_idx;
+
+ return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
+ (struct bpf_insn *)l4_src_hash_insns,
+ L4_SRC_HASH_INSNS_CNT,
+ "GPL", 0);
+}
+
+#ifndef __NR_bpf
+# if defined(__i386__)
+# define __NR_bpf 357
+# elif defined(__x86_64__)
+# define __NR_bpf 321
+# elif defined(__aarch64__)
+# define __NR_bpf 280
+# elif defined(__sparc__)
+# define __NR_bpf 349
+# elif defined(__s390__)
+# define __NR_bpf 351
+# else
+# error __NR_bpf not defined. libbpf does not support your arch.
+# endif
+#endif
+
+static inline __u64 ptr_to_u64(const void *ptr)
+{
+ return (__u64)(unsigned long)ptr;
+}
+
+static inline int sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr,
+ unsigned int size)
+{
+ return syscall(__NR_bpf, cmd, attr, size);
+}
+
+int bpf_load(enum bpf_prog_type type,
+ const struct bpf_insn *insns,
+ size_t insns_cnt,
+ const char *license,
+ __u32 kern_version)
+{
+ union bpf_attr attr;
+
+ bzero(&attr, sizeof(attr));
+ attr.prog_type = type;
+ attr.insn_cnt = (__u32)insns_cnt;
+ attr.insns = ptr_to_u64(insns);
+ attr.license = ptr_to_u64(license);
+ attr.log_buf = ptr_to_u64(NULL);
+ attr.log_level = 0;
+ attr.kern_version = kern_version;
+
+ return sys_bpf(BPF_PROG_LOAD, &attr, sizeof(attr));
+}
diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
new file mode 100644
index 0000000..e1ae0c5
--- /dev/null
+++ b/drivers/net/tap/tap_bpf_program.c
@@ -0,0 +1,321 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright 2017 6WIND S.A.
+ * Copyright 2017 Mellanox.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of 6WIND S.A. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <asm/types.h>
+#include <linux/in.h>
+#include <linux/if.h>
+#include <linux/if_ether.h>
+#include <linux/ip.h>
+#include <linux/ipv6.h>
+#include <linux/if_tunnel.h>
+#include <linux/filter.h>
+#include <linux/bpf.h>
+
+/* BPF helper functions for our example. */
+#include "tap_bpf_api.h"
+#include "tap_bpf_shared.h"
+
+#define ERROR 0
+
+/*
+ * The queue number is offset by 1, to distinguish packets that have
+ * gone through this rule (skb->cb[1] != 0) from others.
+ */
+#define QUEUE_OFFSET 1
+
+#define INV_KEY_IDX 0xdeadbeef
+
+struct vlan_hdr {
+ __be16 proto;
+ __be16 tci;
+};
+
+__section("maps")
+struct bpf_elf_map map_keys = {
+ .type = BPF_MAP_TYPE_HASH,
+ .id = BPF_MAP_ID_KEY,
+ .size_key = sizeof(__u32),
+ .size_value = sizeof(struct rss_key),
+ .max_elem = 256,
+ .pinning = PIN_GLOBAL_NS,
+};
+
+__section("cls_q") int
+match_q(struct __sk_buff *skb)
+{
+ __u32 queue = skb->cb[1];
+ volatile __u32 q = INV_KEY_IDX;
+ __u32 match_queue = QUEUE_OFFSET + q;
+
+ /* printt("match_q$i() queue = %d\n", queue); */
+
+ if (queue != match_queue)
+ return TC_ACT_OK;
+ return TC_ACT_UNSPEC;
+}
+
+__section("tailing") int
+tail(struct __sk_buff *skb)
+{
+ skb_change_tail(skb, skb->len + sizeof(__u32), 0);
+
+ return TC_ACT_UNSPEC;
+}
+
+static void __attribute__((always_inline))
+toeplitz_hash(__u32 *hash, __u8 *key, __u32 *v, __u8 *data, __u8 data_len)
+{
+ u_int i, b;
+
+#pragma unroll
+ for (i = 0; i < data_len; i++) {
+#pragma unroll
+ for (b = 0; b < 8; b++) {
+ if (data[i] & (1 << (7 - b)))
+ *hash ^= *v;
+ *v <<= 1;
+ if (key[i + 4] & (1 << (7 - b)))
+ *v |= 1;
+ }
+ }
+}
+
+static int __attribute__((always_inline))
+hash(struct __sk_buff *skb, enum hash_field f)
+{
+ void *data_end = (void *)(long)skb->data_end;
+ void *data = (void *)(long)skb->data;
+ __u16 proto = (__u16)skb->protocol;
+ __u32 key_idx = INV_KEY_IDX;
+ __u32 hash = skb->cb[0];
+ struct rss_key *rsskey;
+ __u64 off = ETH_HLEN;
+ __u8 ip_proto = 0;
+ __u8 *key = 0;
+ __u32 v, len;
+
+ rsskey = map_lookup_elem(&map_keys, &key_idx);
+ if (!rsskey) {
+ printt("hash(): rss key is not configured\n");
+ return TC_ACT_OK;
+ }
+ key = (__u8 *)rsskey->key;
+
+ /* Get correct proto for 802.1ad */
+ if (skb->vlan_present && skb->vlan_proto == htons(ETH_P_8021AD)) {
+ if (data + ETH_ALEN * 2 + sizeof(struct vlan_hdr) +
+ sizeof(proto) > data_end)
+ return TC_ACT_OK;
+ proto = *(__u16 *)(data + ETH_ALEN * 2 +
+ sizeof(struct vlan_hdr));
+ off += sizeof(struct vlan_hdr);
+ }
+
+ if (rsskey->hash_fields & (1 << HASH_FIELD_L2_DST)) {
+ if (f == HASH_FIELD_L2_DST) {
+ v = (key[0] << 24) + (key[1] << 16) + (key[2] << 8) + key[3];
+ if (data + ETH_ALEN > data_end)
+ return TC_ACT_OK;
+ toeplitz_hash(&hash, key, &v, data, ETH_ALEN);
+ skb->cb[0] = hash;
+ printt("hash(%d): hash = %x (off = %d)\n",
+ f, skb->cb[0], 0);
+ return TC_ACT_PIPE;
+ }
+ key += ETH_ALEN;
+ }
+ if (rsskey->hash_fields & (1 << HASH_FIELD_L2_SRC)) {
+ if (f == HASH_FIELD_L2_SRC) {
+ v = (key[0] << 24) + (key[1] << 16) + (key[2] << 8) + key[3];
+ if (data + ETH_ALEN * 2 > data_end)
+ return TC_ACT_OK;
+ toeplitz_hash(&hash, key, &v, data + ETH_ALEN, ETH_ALEN);
+ skb->cb[0] = hash;
+ printt("hash(%d): hash = %x (off = %d)\n",
+ f, skb->cb[0], ETH_ALEN);
+ return TC_ACT_PIPE;
+ }
+ key += ETH_ALEN;
+ }
+
+ if (proto == htons(ETH_P_IP)) {
+ struct iphdr *ip;
+
+ if (data + off + sizeof(struct iphdr) > data_end)
+ return TC_ACT_OK;
+ ip = data + off;
+ ip_proto = ip->protocol;
+
+ if (rsskey->hash_fields & (1 << HASH_FIELD_L3_SRC)) {
+ if (f == HASH_FIELD_L3_SRC) {
+ v = (key[0] << 24) + (key[1] << 16) +
+ (key[2] << 8) + key[3];
+ toeplitz_hash(&hash, key, &v, data + off +
+ offsetof(struct iphdr, saddr),
+ sizeof(__u32));
+ skb->cb[0] = hash;
+ printt("hash(%d): hash = %x (off = %d)\n",
+ f, skb->cb[0],
+ off + offsetof(struct iphdr, saddr));
+ return TC_ACT_PIPE;
+ }
+ key += sizeof(__u32);
+ }
+ if (rsskey->hash_fields & (1 << HASH_FIELD_L3_DST)) {
+ if (f == HASH_FIELD_L3_DST) {
+ v = (key[0] << 24) + (key[1] << 16) +
+ (key[2] << 8) + key[3];
+ toeplitz_hash(&hash, key, &v, data + off +
+ offsetof(struct iphdr, daddr),
+ sizeof(__u32));
+ skb->cb[0] = hash;
+ printt("hash(%d): hash = %x (off = %d)\n",
+ f, skb->cb[0],
+ off + offsetof(struct iphdr, daddr));
+ return TC_ACT_PIPE;
+ }
+ key += sizeof(__u32);
+ }
+ off += sizeof(struct iphdr);
+ } else if (proto == htons(ETH_P_IPV6)) {
+ struct ipv6hdr *ip;
+
+ if (data + off + sizeof(struct ipv6hdr) > data_end)
+ return TC_ACT_OK;
+ ip = data + off;
+ ip_proto = ip->nexthdr;
+
+ if (rsskey->hash_fields & (1 << HASH_FIELD_L3_SRC)) {
+ if (f == HASH_FIELD_L3_SRC) {
+ v = (key[0] << 24) + (key[1] << 16) +
+ (key[2] << 8) + key[3];
+ toeplitz_hash(&hash, key, &v, data + off +
+ offsetof(struct ipv6hdr, saddr),
+ sizeof(struct in6_addr));
+ skb->cb[0] = hash;
+ printt("hash(%d): hash = %x (off = %d)\n",
+ f, skb->cb[0],
+ off + offsetof(struct ipv6hdr, saddr));
+ return TC_ACT_PIPE;
+ }
+ key += sizeof(struct in6_addr);
+ }
+ if (rsskey->hash_fields & (1 << HASH_FIELD_L3_DST)) {
+ if (f == HASH_FIELD_L3_DST) {
+ v = (key[0] << 24) + (key[1] << 16) +
+ (key[2] << 8) + key[3];
+ toeplitz_hash(&hash, key, &v, data + off +
+ offsetof(struct ipv6hdr, daddr),
+ sizeof(struct in6_addr));
+ skb->cb[0] = hash;
+ printt("hash(%d): hash = %x (off = %d)\n",
+ f, skb->cb[0],
+ off + offsetof(struct ipv6hdr, daddr));
+ return TC_ACT_PIPE;
+ }
+ key += sizeof(struct in6_addr);
+ }
+ off += sizeof(struct ipv6hdr);
+ } else {
+ /* Unknown protocol: stop hashing there */
+ return TC_ACT_PIPE;
+ }
+
+ /* Unknown ip_proto: stop hashing there */
+ if ((ip_proto == IPPROTO_TCP || ip_proto == IPPROTO_UDP) &&
+ (rsskey->hash_fields & (1 << HASH_FIELD_L4_SRC)) &&
+ (f == HASH_FIELD_L4_SRC)) {
+ v = (key[0] << 24) + (key[1] << 16) + (key[2] << 8) + key[3];
+ if (data + off + sizeof(__u16) > data_end)
+ return TC_ACT_OK;
+ toeplitz_hash(&hash, key, &v, data + off,
+ sizeof(__u16));
+ skb->cb[0] = hash;
+ printt("hash(%d): hash = %x (off = %d)\n",
+ f, skb->cb[0], off);
+ return TC_ACT_PIPE;
+ }
+
+ return TC_ACT_PIPE;
+}
+
+#define HASH(L) \
+ __section(#L) int \
+ L ## _hash(struct __sk_buff *skb) \
+ { \
+ return hash(skb, HASH_FIELD_ ## L); \
+ }
+
+HASH(L2_DST)
+
+HASH(L2_SRC)
+
+HASH(L3_SRC)
+
+HASH(L3_DST)
+
+HASH(L4_SRC)
+
+__section("hash_appending") int
+append_hash(struct __sk_buff *skb)
+{
+ __u32 hash = skb->cb[0];
+
+ skb_store_bytes(skb, skb->len - sizeof(hash), &hash, sizeof(hash), 0);
+
+ return TC_ACT_PIPE;
+}
+
+__section("queue_setting") int
+set_queue(struct __sk_buff *skb)
+{
+ __u32 key_idx = INV_KEY_IDX;
+ __u64 hash = skb->cb[0];
+ struct rss_key *rsskey;
+ __u32 queue = 0;
+
+ rsskey = map_lookup_elem(&map_keys, &key_idx);
+ if (rsskey && rsskey->nb_queues <= TAP_MAX_QUEUES)
+ queue = rsskey->queues[(hash % rsskey->nb_queues) &
+ (TAP_MAX_QUEUES - 1)];
+
+ skb->cb[1] = QUEUE_OFFSET + queue;
+
+ return TC_ACT_RECLASSIFY;
+}
+
+BPF_LICENSE("GPL");
diff --git a/drivers/net/tap/tap_bpf_shared.h b/drivers/net/tap/tap_bpf_shared.h
new file mode 100644
index 0000000..6895cf4
--- /dev/null
+++ b/drivers/net/tap/tap_bpf_shared.h
@@ -0,0 +1,40 @@
+#ifndef __BPF_SHARED__
+#define __BPF_SHARED__
+
+#define TAP_MAX_QUEUES 16
+
+enum hash_field {
+ HASH_FIELD_L2_DST,
+ HASH_FIELD_L2_SRC,
+ HASH_FIELD_L3_SRC,
+ HASH_FIELD_L3_DST,
+ HASH_FIELD_L4_SRC,
+};
+
+enum {
+ BPF_MAP_ID_KEY,
+ BPF_MAP_ID_SIMPLE,
+};
+
+struct rss_key {
+ __u32 key[32];
+ __u32 hash_fields;
+ __u32 key_size;
+ __u32 queues[TAP_MAX_QUEUES];
+ __u32 nb_queues;
+};
+
+int bpf_load_cls_q_insns(__u32 queue_idx);
+int bpf_load_tailing_insns(void);
+int bpf_load_hash_appending_insns(void);
+int bpf_load_queue_setting_insns(__u32 queue_idx);
+int bpf_load_l2_src_hash_insns(__u32 key_idx);
+int bpf_load_l2_dst_hash_insns(__u32 key_idx);
+int bpf_load_l3_dst_hash_insns(__u32 key_idx);
+int bpf_load_l3_src_hash_insns(__u32 key_idx);
+int bpf_load_l4_src_hash_insns(__u32 key_idx);
+
+int bpf_load(enum bpf_prog_type type, const struct bpf_insn *insns,
+ size_t insns_cnt, const char *license, __u32 kern_version);
+
+#endif /* __BPF_SHARED__ */
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 43bab7d..355f493 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -46,6 +46,8 @@
#include <linux/bpf.h>
#include <linux/tc_act/tc_bpf.h>
+#include <tap_bpf_shared.h>
+
#ifndef HAVE_TC_FLOWER
/*
* For kernels < 4.2, this enum is not defined. Runtime checks will be made to
@@ -1673,7 +1675,9 @@ static int rss_enable(struct pmd_internals *pmd)
},
};
- bpf_fd = 0;
+ bpf_fd = bpf_load_cls_q_insns(i);
+ if (bpf_fd == -1)
+ return -1;
rss_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
if (!rss_flow) {
@@ -1708,6 +1712,11 @@ static int rss_enable(struct pmd_internals *pmd)
LIST_INSERT_HEAD(&pmd->rss_flows, rss_flow, next);
}
+ /* Add a rule that adds 4 bytes at packet's end to hold the hash */
+ bpf_fd = bpf_load_tailing_insns();
+ if (bpf_fd == -1)
+ return -1;
+
snprintf(annotation, sizeof(annotation), "%s:[%s]", BPF_PROGRAM,
section);
rss_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
--
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device
2017-11-30 8:01 [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Ophir Munk
2017-11-30 8:01 ` [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions Ophir Munk
@ 2017-11-30 16:47 ` Stephen Hemminger
2017-11-30 16:54 ` Thomas Monjalon
2017-12-05 7:53 ` Pascal Mazon
2 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2017-11-30 16:47 UTC (permalink / raw)
To: Ophir Munk; +Cc: dev, Thomas Monjalon, Olga Shern, Pascal Mazon
On Thu, 30 Nov 2017 08:01:09 +0000
Ophir Munk <ophirmu@mellanox.com> wrote:
> diff --git a/drivers/net/tap/tap_bpf_elf.h b/drivers/net/tap/tap_bpf_elf.h
> new file mode 100644
> index 0000000..f3db1bf
> --- /dev/null
> +++ b/drivers/net/tap/tap_bpf_elf.h
> @@ -0,0 +1,56 @@
> +/*******************************************************************************
> +
> + Copyright (C) 2015 Daniel Borkmann <daniel@iogearbox.net>
> +
> + Copied from iproute2's include/bpf_elf.h, available at:
> + https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
> +
> + This file is licensed under GNU General Public License (GPL) v2.
> +
> + The full GNU General Public License is included in this distribution in
> + the file called "LICENSE.GPL".
> +
> +*******************************************************************************/
> +
> +
> +#ifndef __BPF_ELF__
> +#define __BPF_ELF__
> +
> +#include <asm/types.h>
You can't mix BSD and GPL licenses in DPDK.
That includes headers.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device
2017-11-30 16:47 ` [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Stephen Hemminger
@ 2017-11-30 16:54 ` Thomas Monjalon
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2017-11-30 16:54 UTC (permalink / raw)
To: Stephen Hemminger, Ophir Munk; +Cc: dev, Olga Shern, Pascal Mazon
30/11/2017 17:47, Stephen Hemminger:
> On Thu, 30 Nov 2017 08:01:09 +0000
> Ophir Munk <ophirmu@mellanox.com> wrote:
>
> > diff --git a/drivers/net/tap/tap_bpf_elf.h b/drivers/net/tap/tap_bpf_elf.h
> > new file mode 100644
> > index 0000000..f3db1bf
> > --- /dev/null
> > +++ b/drivers/net/tap/tap_bpf_elf.h
> > @@ -0,0 +1,56 @@
> > +/*******************************************************************************
> > +
> > + Copyright (C) 2015 Daniel Borkmann <daniel@iogearbox.net>
> > +
> > + Copied from iproute2's include/bpf_elf.h, available at:
> > + https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
> > +
> > + This file is licensed under GNU General Public License (GPL) v2.
> > +
> > + The full GNU General Public License is included in this distribution in
> > + the file called "LICENSE.GPL".
> > +
> > +*******************************************************************************/
> > +
> > +
> > +#ifndef __BPF_ELF__
> > +#define __BPF_ELF__
> > +
> > +#include <asm/types.h>
>
> You can't mix BSD and GPL licenses in DPDK.
> That includes headers.
Yes
Anyway these headers must removed because they do not seem needed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
2017-11-30 8:01 ` [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions Ophir Munk
@ 2017-11-30 16:54 ` Stephen Hemminger
2017-11-30 17:05 ` Thomas Monjalon
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2017-11-30 16:54 UTC (permalink / raw)
To: Ophir Munk; +Cc: dev, Thomas Monjalon, Olga Shern, Pascal Mazon
On Thu, 30 Nov 2017 08:01:10 +0000
Ophir Munk <ophirmu@mellanox.com> wrote:
> +static struct bpf_insn l2_src_hash_insns[] = {
> + {0xbf, 7, 1, 0, 0x00000000},
> + {0x61, 6, 7, 16, 0x00000000},
> + {0x61, 9, 7, 76, 0x00000000},
> + {0x61, 8, 7, 80, 0x00000000},
> + {0x18, 1, 0, 0, 0xdeadbeef},
> + {0x00, 0, 0, 0, 0x00000000},
> + {0x63, 10, 1, -4, 0x00000000},
> + {0x61, 1, 7, 48, 0x00000000},
> + {0x7b, 10, 1, -56, 0x00000000},
> + {0xbf, 2, 10, 0, 0x00000000},
> + {0x07, 2, 0, 0, 0xfffffffc},
> + {0x18, 1, 1, 0, 0xffffffff},
> + {0x00, 0, 0, 0, 0x00000000},
> + {0x85, 0, 0, 0, 0x00000001},
> + {0x55, 0, 0, 21, 0x00000000},
> + {0xb7, 1, 0, 0, 0x00000a64},
> + {0x6b, 10, 1, -16, 0x00000000},
> + {0x18, 1, 0, 0, 0x69666e6f},
> + {0x00, 0, 0, 0, 0x65727567},
> + {0x7b, 10, 1, -24, 0x00000000},
> + {0x18, 1, 0, 0, 0x6e207369},
> + {0x00, 0, 0, 0, 0x6320746f},
> + {0x7b, 10, 1, -32, 0x00000000},
> + {0x18, 1, 0, 0, 0x20737372},
> + {0x00, 0, 0, 0, 0x2079656b},
> + {0x7b, 10, 1, -40, 0x00000000},
> + {0x18, 1, 0, 0, 0x68736168},
> + {0x00, 0, 0, 0, 0x203a2928},
> + {0x7b, 10, 1, -48, 0x00000000},
> + {0xb7, 7, 0, 0, 0x00000000},
> + {0x73, 10, 7, -14, 0x00000000},
> + {0xbf, 1, 10, 0, 0x00000000},
> + {0x07, 1, 0, 0, 0xffffffd0},
> + {0xb7, 2, 0, 0, 0x00000023},
> + {0x85, 0, 0, 0, 0x00000006},
> + {0x05, 0, 0, 543, 0x00000000},
> + {0xb7, 1, 0, 0, 0x0000000e},
> + {0x61, 2, 7, 20, 0x00000000},
> + {0x15, 2, 0, 10, 0x00000000},
> + {0x61, 2, 7, 28, 0x00000000},
> + {0x55, 2, 0, 8, 0x0000a888},
> + {0xbf, 2, 7, 0, 0x00000000},
> + {0xb7, 7, 0, 0, 0x00000000},
> + {0xbf, 1, 9, 0, 0x00000000},
> + {0x07, 1, 0, 0, 0x00000012},
> + {0x2d, 1, 8, 533, 0x00000000},
> + {0xb7, 1, 0, 0, 0x00000012},
> + {0x69, 6, 9, 16, 0x00000000},
> + {0xbf, 7, 2, 0, 0x00000000},
> + {0x61, 2, 0, 128, 0x00000000},
> + {0xbf, 3, 2, 0, 0x00000000},
> + {0x57, 3, 0, 0, 0x00000001},
> + {0xb7, 4, 0, 0, 0x00000000},
> + {0x1d, 3, 4, 1, 0x00000000},
> + {0x07, 0, 0, 0, 0x00000006},
> + {0x57, 2, 0, 0, 0x00000002},
> + {0x15, 2, 0, 508, 0x00000000},
> + {0x7b, 10, 7, -64, 0x00000000},
> + {0xb7, 7, 0, 0, 0x00000000},
> + {0xbf, 1, 9, 0, 0x00000000},
> + {0x07, 1, 0, 0, 0x0000000c},
> + {0x2d, 1, 8, 517, 0x00000000},
> + {0x71, 1, 0, 0, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000018},
> + {0x71, 6, 0, 1, 0x00000000},
> + {0x67, 6, 0, 0, 0x00000010},
> + {0x4f, 6, 1, 0, 0x00000000},
> + {0x71, 1, 0, 2, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000008},
> + {0x4f, 6, 1, 0, 0x00000000},
> + {0x71, 1, 0, 3, 0x00000000},
> + {0x4f, 6, 1, 0, 0x00000000},
> + {0x71, 5, 9, 6, 0x00000000},
> + {0x67, 5, 0, 0, 0x00000038},
> + {0xc7, 5, 0, 0, 0x00000038},
> + {0xb7, 2, 0, 0, 0x00000000},
> + {0xb7, 3, 0, 0, 0xffffffff},
> + {0xb7, 4, 0, 0, 0x00000000},
> + {0x6d, 5, 3, 1, 0x00000000},
> + {0xbf, 4, 6, 0, 0x00000000},
> + {0x79, 1, 10, -56, 0x00000000},
> + {0xaf, 4, 1, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x00000001},
> + {0x71, 7, 0, 4, 0x00000000},
> + {0xbf, 1, 7, 0, 0x00000000},
> + {0x77, 1, 0, 0, 0x00000007},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x00000039},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000006},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003a},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000005},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003b},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000004},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003c},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000003},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003d},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000002},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003e},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000001},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0x67, 5, 0, 0, 0x0000003f},
> + {0xc7, 5, 0, 0, 0x0000003f},
> + {0x5f, 5, 1, 0, 0x00000000},
> + {0xaf, 4, 5, 0, 0x00000000},
> + {0x57, 7, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 7, 0, 0x00000000},
> + {0x71, 5, 9, 7, 0x00000000},
> + {0x67, 5, 0, 0, 0x00000038},
> + {0xc7, 5, 0, 0, 0x00000038},
> + {0xb7, 6, 0, 0, 0x00000000},
> + {0x6d, 5, 3, 1, 0x00000000},
> + {0xbf, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x71, 7, 0, 5, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000007},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x00000039},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000006},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003a},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000005},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003b},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000004},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003c},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000003},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003d},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000002},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003e},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000001},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0x67, 5, 0, 0, 0x0000003f},
> + {0xc7, 5, 0, 0, 0x0000003f},
> + {0x5f, 5, 1, 0, 0x00000000},
> + {0xaf, 4, 5, 0, 0x00000000},
> + {0x57, 7, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 7, 0, 0x00000000},
> + {0x71, 5, 9, 8, 0x00000000},
> + {0x67, 5, 0, 0, 0x00000038},
> + {0xc7, 5, 0, 0, 0x00000038},
> + {0xb7, 6, 0, 0, 0x00000000},
> + {0x6d, 5, 3, 1, 0x00000000},
> + {0xbf, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x71, 7, 0, 6, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000007},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x00000039},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000006},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003a},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000005},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003b},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000004},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003c},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000003},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003d},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000002},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003e},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000001},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0x67, 5, 0, 0, 0x0000003f},
> + {0xc7, 5, 0, 0, 0x0000003f},
> + {0x5f, 5, 1, 0, 0x00000000},
> + {0xaf, 4, 5, 0, 0x00000000},
> + {0x57, 7, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 7, 0, 0x00000000},
> + {0x71, 5, 9, 9, 0x00000000},
> + {0x67, 5, 0, 0, 0x00000038},
> + {0xc7, 5, 0, 0, 0x00000038},
> + {0xb7, 6, 0, 0, 0x00000000},
> + {0x6d, 5, 3, 1, 0x00000000},
> + {0xbf, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x71, 7, 0, 7, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000007},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x00000039},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000006},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003a},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000005},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003b},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000004},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003c},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000003},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003d},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000002},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003e},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000001},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0x67, 5, 0, 0, 0x0000003f},
> + {0xc7, 5, 0, 0, 0x0000003f},
> + {0x5f, 5, 1, 0, 0x00000000},
> + {0xaf, 4, 5, 0, 0x00000000},
> + {0x57, 7, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 7, 0, 0x00000000},
> + {0x71, 5, 9, 10, 0x00000000},
> + {0x67, 5, 0, 0, 0x00000038},
> + {0xc7, 5, 0, 0, 0x00000038},
> + {0xb7, 6, 0, 0, 0x00000000},
> + {0x6d, 5, 3, 1, 0x00000000},
> + {0xbf, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x71, 7, 0, 8, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000007},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x00000039},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000006},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003a},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000005},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003b},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000004},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003c},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000003},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003d},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000002},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0xbf, 6, 5, 0, 0x00000000},
> + {0x67, 6, 0, 0, 0x0000003e},
> + {0xc7, 6, 0, 0, 0x0000003f},
> + {0x5f, 6, 1, 0, 0x00000000},
> + {0xaf, 4, 6, 0, 0x00000000},
> + {0xbf, 6, 7, 0, 0x00000000},
> + {0x77, 6, 0, 0, 0x00000001},
> + {0x57, 6, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 6, 0, 0x00000000},
> + {0x67, 5, 0, 0, 0x0000003f},
> + {0xc7, 5, 0, 0, 0x0000003f},
> + {0x5f, 5, 1, 0, 0x00000000},
> + {0xaf, 4, 5, 0, 0x00000000},
> + {0x57, 7, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 7, 0, 0x00000000},
> + {0x71, 5, 9, 11, 0x00000000},
> + {0x67, 5, 0, 0, 0x00000038},
> + {0xc7, 5, 0, 0, 0x00000038},
> + {0x6d, 5, 3, 1, 0x00000000},
> + {0xbf, 2, 1, 0, 0x00000000},
> + {0xaf, 4, 2, 0, 0x00000000},
> + {0x71, 2, 0, 9, 0x00000000},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0xbf, 3, 2, 0, 0x00000000},
> + {0x77, 3, 0, 0, 0x00000007},
> + {0x4f, 1, 3, 0, 0x00000000},
> + {0xbf, 3, 5, 0, 0x00000000},
> + {0x67, 3, 0, 0, 0x00000039},
> + {0xc7, 3, 0, 0, 0x0000003f},
> + {0x5f, 3, 1, 0, 0x00000000},
> + {0xaf, 4, 3, 0, 0x00000000},
> + {0xbf, 3, 2, 0, 0x00000000},
> + {0x77, 3, 0, 0, 0x00000006},
> + {0x57, 3, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 3, 0, 0x00000000},
> + {0xbf, 3, 5, 0, 0x00000000},
> + {0x67, 3, 0, 0, 0x0000003a},
> + {0xc7, 3, 0, 0, 0x0000003f},
> + {0x5f, 3, 1, 0, 0x00000000},
> + {0xaf, 4, 3, 0, 0x00000000},
> + {0xbf, 3, 2, 0, 0x00000000},
> + {0x77, 3, 0, 0, 0x00000005},
> + {0x57, 3, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 3, 0, 0x00000000},
> + {0xbf, 3, 5, 0, 0x00000000},
> + {0x67, 3, 0, 0, 0x0000003b},
> + {0xc7, 3, 0, 0, 0x0000003f},
> + {0x5f, 3, 1, 0, 0x00000000},
> + {0xaf, 4, 3, 0, 0x00000000},
> + {0xbf, 3, 2, 0, 0x00000000},
> + {0x77, 3, 0, 0, 0x00000004},
> + {0x57, 3, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 3, 0, 0x00000000},
> + {0xbf, 3, 5, 0, 0x00000000},
> + {0x67, 3, 0, 0, 0x0000003c},
> + {0xc7, 3, 0, 0, 0x0000003f},
> + {0x5f, 3, 1, 0, 0x00000000},
> + {0xaf, 4, 3, 0, 0x00000000},
> + {0xbf, 3, 2, 0, 0x00000000},
> + {0x77, 3, 0, 0, 0x00000003},
> + {0x57, 3, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 3, 0, 0x00000000},
> + {0xbf, 3, 5, 0, 0x00000000},
> + {0x67, 3, 0, 0, 0x0000003d},
> + {0xc7, 3, 0, 0, 0x0000003f},
> + {0x5f, 3, 1, 0, 0x00000000},
> + {0xaf, 4, 3, 0, 0x00000000},
> + {0xbf, 3, 2, 0, 0x00000000},
> + {0x77, 3, 0, 0, 0x00000002},
> + {0x57, 3, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 3, 0, 0x00000000},
> + {0xbf, 3, 5, 0, 0x00000000},
> + {0x67, 3, 0, 0, 0x0000003e},
> + {0xc7, 3, 0, 0, 0x0000003f},
> + {0x5f, 3, 1, 0, 0x00000000},
> + {0xaf, 4, 3, 0, 0x00000000},
> + {0x77, 2, 0, 0, 0x00000001},
> + {0x57, 2, 0, 0, 0x00000001},
> + {0x67, 1, 0, 0, 0x00000001},
> + {0x4f, 1, 2, 0, 0x00000000},
> + {0x67, 5, 0, 0, 0x0000003f},
> + {0xc7, 5, 0, 0, 0x0000003f},
> + {0x5f, 5, 1, 0, 0x00000000},
> + {0xaf, 4, 5, 0, 0x00000000},
> + {0x79, 1, 10, -64, 0x00000000},
> + {0x63, 1, 4, 48, 0x00000000},
> + {0x18, 1, 0, 0, 0x25203d20},
> + {0x00, 0, 0, 0, 0x000a2964},
> + {0x7b, 10, 1, -24, 0x00000000},
> + {0x18, 1, 0, 0, 0x20782520},
> + {0x00, 0, 0, 0, 0x66666f28},
> + {0x7b, 10, 1, -32, 0x00000000},
> + {0x18, 1, 0, 0, 0x6168203a},
> + {0x00, 0, 0, 0, 0x3d206873},
> + {0x7b, 10, 1, -40, 0x00000000},
> + {0x18, 1, 0, 0, 0x68736168},
> + {0x00, 0, 0, 0, 0x29642528},
> + {0x7b, 10, 1, -48, 0x00000000},
> + {0xbf, 1, 10, 0, 0x00000000},
> + {0x07, 1, 0, 0, 0xffffffd0},
> + {0xb7, 2, 0, 0, 0x00000020},
> + {0xb7, 3, 0, 0, 0x00000001},
> + {0xb7, 5, 0, 0, 0x00000006},
> + {0x85, 0, 0, 0, 0x00000006},
> + {0x05, 0, 0, 13, 0x00000000},
> + {0x57, 6, 0, 0, 0x0000ffff},
> + {0x15, 6, 0, 7, 0x0000dd86},
> + {0xb7, 7, 0, 0, 0x00000003},
> + {0x55, 6, 0, 10, 0x00000008},
> + {0x0f, 9, 1, 0, 0x00000000},
> + {0x07, 9, 0, 0, 0x00000014},
> + {0xb7, 7, 0, 0, 0x00000000},
> + {0x2d, 9, 8, 6, 0x00000000},
> + {0x05, 0, 0, 4, 0x00000000},
> + {0x0f, 9, 1, 0, 0x00000000},
> + {0x07, 9, 0, 0, 0x00000028},
> + {0xb7, 7, 0, 0, 0x00000000},
> + {0x2d, 9, 8, 1, 0x00000000},
> + {0xb7, 7, 0, 0, 0x00000003},
> + {0xbf, 0, 7, 0, 0x00000000},
> + {0x95, 0, 0, 0, 0x00000000},
> +};
Loading BPF is a could solution to doing dynamic flow matching.
It needs to be done differently to be accepted.
Putting raw machine instructions in source code is as bad as binary
blobs. You need to provide original source of program and then have
build instructions to create any needed code.
There licensing concerns here as well. Any BPF program inserted
in the kernel must be GPL. So you need to provide source.
Given the license overlap you should also document that in the rte_flow_tap.rst
file.
<
The program that loads the program can be BSD, it just needs to pick
up the BPF firmware file from a compiled ELF image.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
2017-11-30 16:54 ` Stephen Hemminger
@ 2017-11-30 17:05 ` Thomas Monjalon
2017-11-30 17:20 ` Stephen Hemminger
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Monjalon @ 2017-11-30 17:05 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, Ophir Munk, Olga Shern, Pascal Mazon
30/11/2017 17:54, Stephen Hemminger:
> Loading BPF is a could solution to doing dynamic flow matching.
> It needs to be done differently to be accepted.
>
> Putting raw machine instructions in source code is as bad as binary
> blobs. You need to provide original source of program and then have
> build instructions to create any needed code.
The source program is provided in this patch: tap_bpf_program.c
It is pre-compiled to avoid requiring too many dependencies when building DPDK.
> There licensing concerns here as well. Any BPF program inserted
> in the kernel must be GPL. So you need to provide source.
>
> Given the license overlap you should also document that in the rte_flow_tap.rst
> file.
>
> The program that loads the program can be BSD, it just needs to pick
> up the BPF firmware file from a compiled ELF image.
The program that loads BPF is the TAP PMD itself.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
2017-11-30 17:05 ` Thomas Monjalon
@ 2017-11-30 17:20 ` Stephen Hemminger
2017-11-30 17:39 ` Thomas Monjalon
0 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2017-11-30 17:20 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Ophir Munk, Olga Shern, Pascal Mazon
On Thu, 30 Nov 2017 18:05:22 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:
> 30/11/2017 17:54, Stephen Hemminger:
> > Loading BPF is a could solution to doing dynamic flow matching.
> > It needs to be done differently to be accepted.
> >
> > Putting raw machine instructions in source code is as bad as binary
> > blobs. You need to provide original source of program and then have
> > build instructions to create any needed code.
>
> The source program is provided in this patch: tap_bpf_program.c
> It is pre-compiled to avoid requiring too many dependencies when building DPDK.
But the "freedom to modify" comes into play here. If a *evil* vendor builds
an application based on DPDK and does not provide source. Then user still deserves
the right to modify the eBPF program that it loads as GPL. The best solution
is to make the TAP PMD loader routine load the program from a file.
Although I am certainly not a FSF legal scholar, putting GPL'd object code in
TAP PMD risks accusations of being a derived or combined work.
>
> > There licensing concerns here as well. Any BPF program inserted
> > in the kernel must be GPL. So you need to provide source.
> >
> > Given the license overlap you should also document that in the rte_flow_tap.rst
> > file.
> >
> > The program that loads the program can be BSD, it just needs to pick
> > up the BPF firmware file from a compiled ELF image.
>
> The program that loads BPF is the TAP PMD itself.
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
2017-11-30 17:20 ` Stephen Hemminger
@ 2017-11-30 17:39 ` Thomas Monjalon
2017-12-05 7:59 ` Pascal Mazon
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Monjalon @ 2017-11-30 17:39 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, Ophir Munk, Olga Shern, Pascal Mazon
30/11/2017 18:20, Stephen Hemminger:
> On Thu, 30 Nov 2017 18:05:22 +0100
> Thomas Monjalon <thomas@monjalon.net> wrote:
>
> > 30/11/2017 17:54, Stephen Hemminger:
> > > Loading BPF is a could solution to doing dynamic flow matching.
> > > It needs to be done differently to be accepted.
> > >
> > > Putting raw machine instructions in source code is as bad as binary
> > > blobs. You need to provide original source of program and then have
> > > build instructions to create any needed code.
> >
> > The source program is provided in this patch: tap_bpf_program.c
> > It is pre-compiled to avoid requiring too many dependencies when building DPDK.
>
> But the "freedom to modify" comes into play here. If a *evil* vendor builds
> an application based on DPDK and does not provide source. Then user still deserves
> the right to modify the eBPF program that it loads as GPL. The best solution
> is to make the TAP PMD loader routine load the program from a file.
> Although I am certainly not a FSF legal scholar, putting GPL'd object code in
> TAP PMD risks accusations of being a derived or combined work.
Good point.
The compiled BPF may be provided as a plugin file.
So we would be free to not package this GPL file.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device
2017-11-30 8:01 [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Ophir Munk
2017-11-30 8:01 ` [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions Ophir Munk
2017-11-30 16:47 ` [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Stephen Hemminger
@ 2017-12-05 7:53 ` Pascal Mazon
2 siblings, 0 replies; 11+ messages in thread
From: Pascal Mazon @ 2017-12-05 7:53 UTC (permalink / raw)
To: Ophir Munk, dev; +Cc: Thomas Monjalon, Olga Shern
Hi Ophir,
I wrote that doc (rte_flow_tap) a while ago (10 months+), it is no
longer accurate and would very much need updating.
I might have written some of the code you propose, but I definitely
didn't see this patch before you sent it, you shouldn't use my sign-off.
That goes for the second patch in the series, too.
On 30/11/2017 09:01, Ophir Munk wrote:
> The DPDK traffic classifier is the rte_flow API and the tap PMD
> must support it including RSS queue mapping actions.
> An example usage for this requirement is failsafe transparent
> switching from a PCI device to TAP device while RSS queues are the
> same on both devices.
>
> TC was chosen as TAP classifier but TC alone does not support RSS
> queue mapping. This commit uses a combination of TC rules and eBPF
> actions in order to support TAP RSS.
>
> eBPF requires Linux version 3.19. eBPF is effective only when running
> with an appropriate kernel version. It must be compiled with the
> appropriate Linux kernel headers. In case the kernel headers do
> not include eBPF definitions a warning will be issued during
> compilation time and TAP RSS will not be supported.
>
> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
>
> The DPDK traffic classifier is the rte_flow API and the tap PMD
> must support it including RSS queue mapping actions.
> An example usage for this requirement is failsafe transparent
> switching from a PCI device to TAP device while RSS queues are the
> same on both devices.
> TC was chosen as TAP classifier but TC alone does not support RSS
> queue mapping. This RFC suggests using a combination of TC rules and eBPF
> actions in order to support TAP RSS.
> eBPF requires Linux version 3.19. eBPF is effective only when running
> with an appropriate kernel version. It must be compiled with the
> appropriate Linux kernel headers. In case the kernel headers do
> not include eBPF definitions a warning will be issued during
> compilation time and TAP RSS will not be supported.
> The C source file (tap_bpf_insns.c) includes eBPF "assembly
> instructions" in the format of an array of struct bpf_insns.
> This array is passed to the kernel for execution in BPF system call.
> The C language source file (tap_bpf_program.c) from which the
> "assembly instructions" were generated is included in TAP source tree,
> however it does not take part in dpdk compilation.
> TAP documentation will detail the process of eBPF "assembly instructions"
> generation.
>
> eBPF programs controlled from tap PMD will be used to match packets, compute a
> hash given the configured key, and send packets using the desired queue.
> In an eBPF program, it is typically not possible to edit the queue_mapping field
> in skb to direct the packet in the correct queue. That part would be addressed by
> chaining a ``skbedit queue_mapping`` action.
>
> A packet would go through these TC rules (on the local side of the tap netdevice):
>
> +-----+---------------------------+----------------------------------+----------+
> |PRIO | Match | Action 1 | Action 2 |
> +=====+===========================+==================================+==========+
> | 1 | marked? | skbedit queue 'mark' --> DPDK | |
> +-----+---------------------------+----------------------------------+----------+
> | 2 | marked? | skbedit queue 'mark' --> DPDK | |
> +-----+---------------------------+----------------------------------+----------+
> | ... | | | |
> +-----+---------------------------+----------------------------------+----------+
> | x | ANY | BPF: append NULL 32bits for hash | |
> | | | | |
> +-----+---------------------------+----------------------------------+----------+
> |x + 1| ACTUAL FLOW RULE 1 MATCH | ... | |
> | | | | |
> +-----+---------------------------+----------------------------------+----------+
> |x + 2| ACTUAL FLOW RULE 2 MATCH | ... | |
> | | | | |
> +-----+---------------------------+----------------------------------+----------+
> | ... | | | |
> +-----+---------------------------+----------------------------------+----------+
> | y | FLOW RULE RSS 1 MATCH | BPF compute hash into packet |reclassify|
> | | | tailroom && set queue in skb->cb | |
> +-----+---------------------------+----------------------------------+----------+
> |y + 1| FLOW RULE RSS 2 MATCH | BPF compute hash into packet |reclassify|
> | | | tailroom && set queue in skb->cb | |
> +-----+---------------------------+----------------------------------+----------+
> | ... | | | |
> +-----+---------------------------+----------------------------------+----------+
> | z | ANY (default RSS) | BPF compute hash into packet |reclassify|
> | | | tailroom && set queue in skb->cb | |
> +-----+---------------------------+----------------------------------+----------+
> | z | ANY (isolate mode) | DROP | |
> +-----+---------------------------+----------------------------------+----------+
>
> Rules 1..x will match marked packets and will redirect them to their queues however
> on first classification packets are not marked there will not be redirected.
> Only when going later through RSS rules y..z BPF computes RSS hash,
> sets queue in dkb->cb, and reclassifies packets. Then packets are classified again
> through rules 1-x while being marked and will be redirected.
> Rules (x+1)..y are non-RSS TC rules already used in dpdk versions prior to 18.02
>
> doc/guides/prog_guide/rte_flow_tap.rst | 962 +++++++++++++++++++++++++++++++++
> drivers/net/tap/Makefile | 6 +-
> drivers/net/tap/rte_eth_tap.h | 7 +-
> drivers/net/tap/tap_bpf_elf.h | 56 ++
> drivers/net/tap/tap_flow.c | 336 ++++++++----
> 5 files changed, 1263 insertions(+), 104 deletions(-)
> create mode 100644 doc/guides/prog_guide/rte_flow_tap.rst
> create mode 100644 drivers/net/tap/tap_bpf_elf.h
>
> diff --git a/doc/guides/prog_guide/rte_flow_tap.rst b/doc/guides/prog_guide/rte_flow_tap.rst
> new file mode 100644
> index 0000000..04ddda6
> --- /dev/null
> +++ b/doc/guides/prog_guide/rte_flow_tap.rst
> @@ -0,0 +1,962 @@
> +=====================================
> +Flow API support in TAP PMD, using TC
> +=====================================
> +
> +.. contents::
> +.. sectnum::
> +
> +.. footer::
> +
> + v0.8 - page ###Page###
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +Rationale
> +=========
> +
> +For this project, the tap PMD has to receive selected traffic from a different
> +netdevice (refer to *VM migration with Microsoft Hyper-V and Mellanox
> +ConnectX-3* document) and only cover the same set of rules as supported by the
> +mlx4 PMD.
> +
> +The DPDK traffic classifier is the rte_flow API, and the tap PMD must therefore
> +implement it. For that, TC was chosen for several reasons:
> +
> +- it happens very early in the kernel stack for ingress (faster than netfilter).
> +- it supports dropping packets given a specific flow.
> +- it supports redirecting packets to a different netdevice.
> +- it has a "flower" classifier type that meets mostly the pattern items in
> + rte_flow.
> +- it can be configured through a netlink socket, without an external tool.
> +
> +Modes of operation
> +==================
> +
> +There should be two modes of operation for the tap PMD regarding rte_flow:
> +*local* and *remote*. Only one mode can be in use at a time for a specific tap
> +interface.
> +
> +The *local* mode would be the default one, if no specific parameter is specified
> +in the command line. To start the application with tap in *remote* mode, set the
> +``remote`` tap parameter to the interface you want to redirect packets from,
> +e.g.::
> +
> + testpmd -n 4 -c 0xf -m 1024 --vdev=net_tap,iface=tap0,remote=eth3 -- \
> + -i --burst=64 --coremask=0x2
> +
> +*Local* mode
> +------------
> +
> +In *local* mode, flow rules would be applied as-is, on the tap netdevice itself
> +(e.g.: ``tap0``).
> +
> +The typical use-case is having a linux program (e.g. a webserver) communicating
> +with the DPDK app through the tap netdevice::
> +
> + +-------------------------+
> + | DPDK application |
> + +-------------------------+
> + | ^
> + | rte_flow rte_flow |
> + v egress ingress |
> + +-------------------------+
> + | Tap PMD |
> + +-------------------------+
> + | ^
> + | TC TC |
> + v ingress egress |
> + +-------------------------+ +-------------------------+
> + | |<-------------| |
> + | Tap netdevice (tap0) | | Linux app (webserver) |
> + | |------------->| |
> + +-------------------------+ +-------------------------+
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +*Remote* mode
> +-------------
> +
> +In *remote* mode, flow rules would be applied on the tap netdevice (e.g.:
> +``tap0``), and use a similar match to redirect specific packets from another
> +netdevice (e.g.: ``eth3``, a NetVSC netdevice in our project scenario)::
> +
> + +-------------------------+
> + | DPDK application |
> + +-------------------------+
> + | ^
> + | rte_flow rte_flow |
> + v egress ingress |
> + +-------------------------+
> + | Tap PMD |
> + +-------------------------+
> + | ^
> + | TC TC |
> + v ingress egress |
> + +-------------------------+ +-------------------------+
> + | |<------------------redirection-------\ |
> + | Tap netdevice (tap0) | | | |
> + | |------------->|-\ eth3 | |
> + +-------------------------+ +--|--------------------|-+
> + | TC TC ^
> + | egress ingress |
> + v |
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +rte_flow rules conversion
> +=========================
> +
> +Netlink
> +-------
> +
> +The only way to create TC rules in the kernel is through netlink messages.
> +Two possibilities arise for managing TC rules:
> +
> +- Using native netlink API calls in the tap PMD
> +- Calling the ``tc`` command from iproute2 inside our PMD, via ``system()``.
> +
> +The former will be done, as library calls are faster than changing context and
> +executing an external program from within the tap PMD. Moreover, the kernel TC
> +API might propose features not yet implemented in iproute2. Furthermore, a
> +custom implementation enables finer tuning and better control.
> +
> +..
> + Some implementations for TC configuration through Netlink exist already. It's a
> + good source of inspiration on how to do it:
> +
> + - iproute2's tc `source code`__
> + - ovs's tc implementation__ (not yet upstream)
> +
> + __ https://github.com/shemminger/iproute2/tree/master/tc
> + __ https://mail.openvswitch.org/pipermail/ovs-dev/2016-November/324693.html
> +
> +Conversion examples
> +-------------------
> +
> +Here are a few examples of rules and how they can be translated from rte_flow
> +rules to TC rules. rte_flow rules will be expressed using testpmd's ``flow``
> +command syntax, while TC rules will use iproute2 ``tc`` command syntax.
> +
> +**Notes**:
> + - rte_flow ``ingress`` direction can be translated into a TC ``egress`` rule,
> + and vice versa, when it applies to a tap interface, as TC considers the
> + kernel netdevice standpoint.
> + - in TC, redirecting a packet works by taking a packet from ``ingress`` and
> + sending to another device's ``egress``.
> +
> +*Local* mode
> +~~~~~~~~~~~~
> +
> +#. Flow rule to give packets coming on the ``tap0`` interface to RX queue 0:
> +
> + Using rte_flow::
> +
> + flow validate 0 ingress pattern port index is 0 / end \
> + actions queue index 0 / end
> +
> + Using ``tc``::
> +
> + tc filter add dev tap0 parent 1: flower indev tap0 \
> + action skbedit queue_mapping 0
> +
> +#. Flow rule to get packets with source mac ``de:ad:ca:fe:00:02`` on RX queue 2:
> +
> + Using rte_flow::
> +
> + flow create 0 ingress pattern eth src is de:ad:ca:fe:00:02 / end \
> + actions queue 2 / end
> +
> + Using ``tc``::
> +
> + tc filter add dev tap0 parent 1: flower src_mac de:ad:ca:fe:00:02 \
> + action skbedit queue_mapping 2
> +
> +#. Flow rule to drop packets matching specific 5-tuple info:
> +
> + Using rte_flow::
> +
> + flow create 0 ingress pattern eth dst is 3a:80:ce:61:36:54 \
> + src is 52:43:7b:fd:ac:f3 / ipv4 src is 1.1.1.1 dst is 2.2.2.2 \
> + / udp src is 4444 dst is 5555 / end actions drop / end
> +
> + Using ``tc``::
> +
> + tc filter add dev tap0 parent 1: flower dst_mac 3a:80:ce:61:36:54 \
> + src_mac 52:43:7b:fd:ac:f3 eth_type ip src_ip 1.1.1.1 dst_ip 2.2.2.2 \
> + ip_proto udp src_port 4444 dst_port 5555 action drop
> +
> +*Remote* mode
> +~~~~~~~~~~~~~
> +
> +In *remote* mode, an additional rule for redirecting packet is systematically
> +required. The examples are similar to the previous section (the rte_flow rule
> +will thus be omitted).
> +
> +#. TC rules to give packets coming on the ``eth3`` interface to ``tap0`` RX
> + queue 0::
> +
> + # redirection rule
> + tc filter add dev eth3 parent ffff: flower indev eth3 \
> + action mirred egress redirect dev tap0
> + # actual tap rule
> + tc filter add dev tap0 parent 1: flower indev tap0 \
> + action skbedit queue_mapping 0
> +
> +#. TC rules to get packets with source mac ``de:ad:ca:fe:00:02`` on RX queue 2::
> +
> + # redirection rule
> + tc filter add dev eth3 parent ffff: flower src_mac de:ad:ca:fe:00:02 \
> + action mirred egress redirect dev tap0
> + # actual tap rule
> + tc filter add dev tap0 parent 1: flower src_mac de:ad:ca:fe:00:02 \
> + action skbedit queue_mapping 2
> +
> +#. TC rules to drop packets matching specific 5-tuple info::
> +
> + # redirection rule
> + tc filter add dev eth3 parent ffff: flower dst_mac 3a:80:ce:61:36:54 \
> + src_mac 52:43:7b:fd:ac:f3 eth_type ip src_ip 1.1.1.1 dst_ip 2.2.2.2 \
> + ip_proto udp src_port 4444 dst_port 5555 \
> + action mirred egress redirect dev tap0
> + # actual tap rule
> + tc filter add dev tap0 parent 1: flower dst_mac 3a:80:ce:61:36:54 \
> + src_mac 52:43:7b:fd:ac:f3 eth_type ip src_ip 1.1.1.1 dst_ip 2.2.2.2 \
> + ip_proto udp src_port 4444 dst_port 5555 action drop
> +
> +One last thing, to redirect packets the other way around (from ``tap0`` to
> +``eth3``), we would use a similar rule, exchanging interfaces and using an
> +appropriate match, e.g.::
> +
> + tc filter add dev tap0 parent ffff: flower indev tap0 \
> + action mirred egress redirect dev eth3
> +
> +..
> + **Note:** ``parent ffff:`` is for TC ``ingress`` while ``parent 1:`` is for TC
> + ``egress``.
> +
> +Broadcast and promiscuous support
> ++++++++++++++++++++++++++++++++++
> +
> +*Remote* mode requirements:
> +
> +#. When turning the tap netdevice promiscuous, the remote netdevice should
> + implicitly be turned promiscuous too, to get as many packets as possible.
> +
> +#. Packets matching the destination MAC configured in the tap PMD should be
> + redirected from the remote without being processed by the stack there in the
> + kernel.
> +
> +#. In promiscuous mode, an incoming packet should be duplicated to be processed
> + both by the tap PMD and the remote netdevice itself.
> +
> +#. Incoming packets with broadcast destination MAC (i.e.: ``ff:ff:ff:ff:ff:ff``)
> + should be duplicated to be processed both by the tap PMD and the remote
> + netdevice itself.
> +
> +#. Incoming packets with IPv6 multicast destination MAC (i.e.:
> + ``33:33:00:00:00:00/33:33:00:00:00:00``) should be duplicated to be processed
> + both by the tap PMD and the remote netdevice itself.
> +
> +#. Incoming packets with broadcast/multicast bit set in the destination MAC
> + (i.e.: ``01:00:00:00:00:00/01:00:00:00:00:00``) should be duplicated to be
> + processed both by the tap PMD and the remote netdevice itself.
> +
> +Each of these requirements (except the first one) can be directly translated
> +into a TC rule, e.g.::
> +
> + # local mac (notice the REDIRECT for mirred action):
> + tc filter add dev eth3 parent ffff: prio 1 flower dst_mac de:ad:be:ef:01:02 \
> + action mirred egress redirect dev tap0
> +
> + # tap promisc:
> + tc filter add dev eth3 parent ffff: prio 2 basic \
> + action mirred egress mirror dev tap0
> +
> + # broadcast:
> + tc filter add dev eth3 parent ffff: prio 3 flower dst_mac ff:ff:ff:ff:ff:ff \
> + action mirred egress mirror dev tap0
> +
> + # broadcast v6 (can't express mac_mask with tc, but it works via netlink):
> + tc filter add dev eth3 parent ffff: prio 4 flower dst_mac 33:33:00:00:00:00 \
> + action mirred egress mirror dev tap0
> +
> + # all_multi (can't express mac_mask with tc, but it works via netlink):
> + tc filter add dev eth3 parent ffff: prio 5 flower dst_mac 01:00:00:00:00:00 \
> + action mirred egress mirror dev tap0
> +
> +When promiscuous mode is switched off or on, the first TC rule will be modified
> +to have respectively an empty action (``continue``) or the ``mirror`` action.
> +
> +The first 5 priorities are always reserved, and can only be used for these
> +filters.
> +
> +On top of that, the tap PMD can configure explicit rte_flow rules, translated as
> +TC rules on both the remote netdevice and the tap netdevice. On the remote,
> +those would need to be processed after the default rules handling promiscuous
> +mode, broadcast and all_multi packets.
> +
> +When using the ``mirror`` action, the packet is duplicated and sent to the tap
> +netdevice, while the original packet gets directly processed by the kernel
> +without going through later TC rules for the remote. On the tap netdevice, the
> +duplicated packet will go through tap TC rules and be classified depending on
> +those rules.
> +
> +**Note:** It is possible to combine a ``mirror`` action and a ``continue``
> +action for a single TC rule. Then the original packet would undergo remaining TC
> +rules on the remote netdevice side.
> +
> +When using the ``redirect`` action, the behavior is similar on the tap side, but
> +the packet is not duplicated, no further kernel processing is done for the
> +remote side.
> +
> +The following diagram sums it up. A packet that match a TC rule follows the
> +associated action (the number in the diamond represents the rule prio as set in
> +the above TC rules)::
> +
> +
> + Incoming packet |
> + on remote (eth3) |
> + | Going through
> + | TC ingress rules
> + v
> + / \
> + / 5 \
> + / \ yes
> + / mac \____________________> tap0
> + \ match?/ duplicated pkt
> + \ /
> + \ /
> + \ /
> + V no, then continue
> + | with TC rules
> + |
> + v
> + / \
> + / 2 \
> + eth3 yes / \ yes
> + kernel <____________________ /promisc\____________________> tap0
> + stack original pkt \ match?/ duplicated pkt
> + \ /
> + \ /
> + \ /
> + V no, then continue
> + | with TC rules
> + |
> + v
> + / \
> + / 3 \
> + eth3 yes / \ yes
> + kernel <____________________ / bcast \____________________> tap0
> + stack original pkt \ match?/ duplicated pkt
> + \ /
> + \ /
> + \ /
> + V no, then continue
> + | with TC rules
> + |
> + v
> + / \
> + / 4 \
> + eth3 yes / \ yes
> + kernel <____________________ / bcast6\____________________> tap0
> + stack original pkt \ match?/ duplicated pkt
> + \ /
> + \ /
> + \ /
> + V no, then continue
> + | with TC rules
> + |
> + v
> + / \
> + / 5 \
> + eth3 yes / all \ yes
> + kernel <____________________ / multi \____________________> tap0
> + stack original pkt \ match?/ duplicated pkt
> + \ /
> + \ /
> + \ /
> + V no, then continue
> + | with TC rules
> + |
> + v
> + |
> + . remaining TC rules
> + .
> + eth3 |
> + kernel <________________________/
> + stack original pkt
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +Associating an rte_flow rule with a TC one
> +==========================================
> +
> +A TC rule is identified by a ``priority`` (16-bit value) and a ``handle``
> +(32-bit value). To delete a rule, the priority must be specified, and if several
> +rules have the same priority, the handle is needed to select the correct one.
> +
> +..
> + Specifying an empty priority and handle when requesting a TC rule creation will
> + let the kernel automatically decide what values to set. In fact, the kernel will
> + start with a high priority (i.e. 49152) and subsequent rules will get decreasing
> + priorities (lower priorites get evaluated first).
> +
> +To avoid further requests to the kernel to identify what priority/handle has
> +been automatically allocated, the tap PMD can set priorities and handles
> +systematically when creating a rule.
> +
> +In *local* mode, an rte_flow rule should be translated into a single TC flow
> +identified by priority+handle.
> +
> +In *remote* mode, an rte_flow rule requires two TC rules, one on the tap
> +netdevice itself (for the correct action) and another one on the other netdevice
> +where packets are redirected from. Both TC rules' priorities+handles must be
> +stored for a specific rte_flow rule, and associated with the device they are
> +applied on.
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +Considerations regarding Flow API support
> +=========================================
> +
> +Flow rule attributes
> +--------------------
> +
> +Groups and priorities:
> + There is no native support of groups in TC. Instead, the priority field
> + (which is part of the netlink TC msg header) can be adapted. The four MSB
> + would be used to define the group (allowing for 16 groups), while the 12 LSB
> + would be left to define the actual priority (up to 4096).
> +
> + Rules with lower priorities are evaluated first. For rules with identical
> + priorities, the one with the highest handle value gets evaluated first.
> +
> +Direction:
> + Both ingress and egress filtering can be supported.
> +
> +Meta item types
> +---------------
> +
> +Most applications will use: ``(END | VOID)``
> +
> +END, VOID:
> + Supported without problem.
> +
> +INVERT:
> + There is no easy way to support that in TC. It won't be supported
> +
> + **mlx4 will not support it either.**
> +
> +PF, VF, PORT:
> + Not applicable to a tap netdevice.
> +
> +Data matching item types
> +------------------------
> +
> +Most applications will use:
> +``ETH / (IPV4 | IPV6 | END) / (TCP | UDP | END) / END``
> +
> +ANY:
> + Should be supported.
> +
> + **mlx4 will partially support it.**
> +
> +RAW:
> + It is not planned to support it for now. Matching Raw packets would require
> + using a different classifier than "flower", which is the most simple and
> + applicable for otherwise most other cases. With TC, it's not possible to
> + support in the same rule both "flower" and raw packets.
> +
> + **mlx4 will not support it either**.
> +
> +VLAN:
> + Matching VLAN ID and prio supported.
> + **Note: linux v4.9 required for VLAN support.**
> +
> +ETH, IPV4, IPV6, UDP, TCP:
> + Matching source/destination MAC/IP/port is supported, with masks.
> +
> + **mlx4 does not support partial bit-masks (full or zeroed only).**
> +
> +ICMP:
> + By specifying the appropriate ether type, ICMP packets can be matched.
> + However, there is no support for ICMP type or code.
> +
> + **mlx4 will not support it, however.**
> +
> +SCTP:
> + By specifying the appropriate IP protocol, SCTP packets can be matched.
> + However, no specific SCTP fields can be matched.
> +
> + **mlx4 will not support it, however.**
> +
> +VXLAN:
> + VXLAN is not recognized by the "flower" classifier. Kernel-managed VXLAN
> + traffic would come through an additional netdevice, which falls outside
> + the scope of this project. VXLAN traffic should occur outside VMs anyway.
> +
> +Action types
> +------------
> +
> +Most applications will use: ``(VOID | END | QUEUE | DROP) / END``
> +
> +By default, multiple actions are possible for TC flow rules. However, they are
> +ordered in the kernel. The implementation will need to handle actions in a way
> +that orders them intelligently when creating them.
> +
> +VOID, END:
> + Supported.
> +
> +PASSTHRU:
> + The generic "continue" action can be used.
> +
> + **mlx4 will not support it, however**.
> +
> +MARK / FLAG:
> + The mark is a field inside an skbuff. However, the tap reads messages (mostly
> + packet data), without that info. As an alternative, it may be possible to
> + create a specific queue to pass packets with a specific mark. Further testing
> + are needed to ensure it is feasable.
> +
> +QUEUE:
> + The ``skbedit`` action with the ``queue_mapping`` option enables directing
> + packets to specific queues.
> +
> + Like rte_flow, specifying several ``skbedit queue_mapping`` actions in TC
> + only considers the last one.
> +
> +DROP:
> + The generic "drop" action can be used. Packets will effectively be dropped,
> + and not left for the kernel to process.
> +
> +COUNT: Stats are automatically stored in the kernel. The COUNT action will thus
> + be ignored when creating the rule. ``rte_flow_query()`` can be implemented
> + to request a rule's stats from the kernel.
> +
> +DUP:
> + Duplicating packets is not supported.
> +
> +RSS:
> + There's no built-in mechanism for RSS in TC.
> +
> + By default, incoming packets go to the tap PMD queue 0. To support RSS in
> + software, several additional queues must be set up. Packets coming in on
> + queue 0 can be considered as requiring RSS, and the PMD will apply software
> + rss (using something like ``rte_softrss()``) to select a queue for the
> + packet.
> +
> +PF, VF:
> + Not applicable to a tap netdevice.
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +TC limitations for flow collision
> +=================================
> +
> +From TC standpoint, filter rules with identical priorities do not collide, if
> +they do specify values (at least one different) for the same fields in the TC
> +message, with identical fields masks.
> +
> +Unfortunately, some flows that obviously are not colliding can be considered
> +otherwise by the kernel when parsing the TC messages, and thus their creation
> +would be rejected.
> +
> +Here is a table for matching TC fields with their flow API equivalent:
> +
> ++------------------------------+-----------------------------------+-----------+
> +| TC message field | rte_flow API | maskable? |
> ++==============================+===================================+===========+
> +| TCA_FLOWER_KEY_ETH_DST | eth dst | yes |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_ETH_SRC | eth src | yes |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_ETH_TYPE | eth type is 0xZZZZ || | no |
> +| | eth / {ipv4|ipv6} | |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_IP_PROTO | eth / {ipv4|ipv6} / {tcp|udp} | no |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_IPV4_SRC | eth / ipv4 src | yes |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_IPV4_DST | eth / ipv4 dst | yes |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_IPV6_SRC | eth / ipv6 src | yes |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_IPV6_DST | eth / ipv6 dst | yes |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_L4_SRC | eth / {ipv4|ipv6} / {tcp|udp} dst | no |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_L4_DST | eth / {ipv4|ipv6} / {tcp|udp} src | no |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_VLAN_ID | eth / vlan vid | no |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_VLAN_PRIO | eth / vlan pcp | no |
> ++------------------------------+-----------------------------------+-----------+
> +| TCA_FLOWER_KEY_VLAN_ETH_TYPE | eth / vlan tpid | no |
> ++------------------------------+-----------------------------------+-----------+
> +
> +When creating rules with identical priorities, one must make sure that they
> +would be translated in TC using the same fields as shown in the above table.
> +
> +The following flow rules can share the same priority, as they use the same
> +fields with identical masks under the hood::
> +
> + > flow create 0 ingress priority 0 pattern eth / ipv4 / end
> + actions drop / end
> + Flow rule #0 created
> + > flow create 0 ingress priority 0 pattern eth type is 0x86dd / end
> + actions drop / end
> + Flow rule #1 created
> +
> +**Note:** Both rules use ETH_TYPE (mask 0xffff) in their TC form.
> +
> +Sadly, the following flow rules cannot share the same priority, since fields for
> +matching IPv4 and IPv6 src/dst addresses are different::
> +
> + > flow create 0 ingress priority 1 pattern eth / ipv4 src is 1.1.1.1 / end
> + actions drop / end
> + Flow rule #0 created
> + > flow create 0 ingress priority 1 pattern eth / ipv6 src is ::1 / end
> + actions drop / end
> + PMD: Kernel refused TC filter rule creation (22): Invalid argument
> + Caught error type 2 (flow rule (handle)): overlapping rules
> +
> +**Note:** First rule uses ETH_TYPE and IPV4_SRC, while the second uses ETH_TYPE
> +and IPV6_SRC.
> +
> +It is however possible to match different IPvX addresses with the same
> +priority::
> +
> + > flow create 0 ingress priority 2 pattern eth / ipv4 src is 1.1.1.1 / end
> + actions drop / end
> + Flow rule #0 created
> + > flow create 0 ingress priority 2 pattern eth / ipv4 src is 2.2.2.2 / end
> + actions drop / end
> + Flow rule #1 created
> +
> +If the first rule specifies both destination and source addresses, then the
> +other rule with the same priority must too (with identical masks)::
> +
> + > flow create 0 ingress priority 3 pattern eth / ipv4 src is 1.1.1.1
> + dst is 1.1.1.2 / end actions drop / end
> + Flow rule #0 created
> + > flow create 0 ingress priority 3 pattern eth / ipv4 src is 2.2.2.2 / end
> + actions drop / end
> + PMD: Kernel refused TC filter rule creation (22): Invalid argument
> + Caught error type 2 (flow rule (handle)): overlapping rules
> + > flow create 0 ingress priority 3 pattern eth / ipv4 src is 2.2.2.2
> + dst spec 2.2.2.3 dst mask 255.255.255.0 / end actions drop / end
> + PMD: Kernel refused TC filter rule creation (22): Invalid argument
> + Caught error type 2 (flow rule (handle)): overlapping rules
> + > flow create 0 ingress priority 3 pattern eth / ipv4 src is 2.2.2.2
> + dst is 2.2.2.3 / end actions drop / end
> + Flow rule #1 created
> +
> +**Note:** First rule uses ETH_TYPE, IPV4_SRC and IPV4_DST (with full masks). The
> +two others must also use those to share the same priority.
> +
> +It is possible to match TCP/UDP packets with different ports whatever the
> +underlying L3, if the same fields are used (thus no l3 addresses specification).
> +For instance::
> +
> + > flow create 0 ingress priority 4 pattern eth / ipv4 / tcp dst is 3333 / end
> + actions drop / end
> + Flow rule #0 created
> + > flow create 0 ingress priority 4 pattern eth / ipv6 / udp dst is 4444 / end
> + actions drop / end
> + Flow rule #1 created
> + > flow create 0 ingress priority 4 pattern eth / ipv6 / udp src is 5555 / end
> + actions drop / end
> + PMD: Kernel refused TC filter rule creation (22): Invalid argument
> + Caught error type 2 (flow rule (handle)): overlapping rules
> +
> +**Note:** First 2 rules use ETH_TYPE, IP_PROTO and L4_DST with different values
> +but identical masks, so they're OK. Last rule used L4_SRC instead of L4_DST.
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +RSS implementation for tap
> +==========================
> +
> +There are several areas of research for a tap RSS implementation:
> +
> +#. userland implementation in tap PMD
> +#. userland implementation in DPDK (generic)
> +#. userland implementation using combination of TC rules and BPF filters/actions
> +#. kernel-side implementation in tap driver
> +#. kernel-side implementation as a BPF classifier/action
> +#. kernel-side implementation as a separate TC action
> +
> ++--------------+------------------------------+------------------------------+
> +| | Pros | Cons |
> ++==============+==============================+==============================+
> +| tap PMD | - no kernel upstreaming | - tap PMD is supposed to be |
> +| | | simple, and would no longer|
> +| | | be. |
> +| | | |
> +| | | - complex rework, with many |
> +| | | rings for enqueuing packets|
> +| | | to the right queue |
> +| | | |
> +| | | - slower |
> +| | | |
> +| | | - won't be accepted as it |
> +| | | doesn't make sense to redo |
> +| | | what the kernel did |
> +| | | previously |
> ++--------------+------------------------------+------------------------------+
> +| generic DPDK | - would be useful to others | - design must be compatible |
> +| | | with most PMDs |
> +| | | |
> +| | | - probably the longest to |
> +| | | develop |
> +| | | |
> +| | | - requires DPDK community |
> +| | | approval |
> +| | | |
> +| | | - requires heavy changes in |
> +| | | tap PMD itself anyway |
> ++--------------+------------------------------+------------------------------+
> +| TC rules | - no kernel upstreaming | - BPF is complicated to learn|
> +| combination | | |
> +| | - fast | - Runtime BPF compilation / |
> +| | | or bytecode change, would |
> +| | - per-flow RSS | be tricky |
> +| | | |
> +| | - no change in tap PMD | - much rework in the tap PMD |
> +| | datapath | to handle lots of new |
> +| | | netlink messages / actions |
> ++--------------+------------------------------+------------------------------+
> +| tap driver | - pretty fast as it | - might not be accepted by |
> +| | intervenes early in packet | the kernel community as |
> +| | RX | they may cling to their |
> +| | | jhash2 hashing function for|
> +| | | RX. |
> +| | | |
> +| | | - only a single RSS context |
> ++--------------+------------------------------+------------------------------+
> +| BPF | - fast | - BPF is complicated to learn|
> +| classifier - | | |
> +| action | - per-flow RSS | - would require changing the |
> +| | | kernel API to support |
> +| | | editing queue_mapping in an|
> +| | | skb |
> +| | | |
> +| | | - hashing would be performed |
> +| | | for each queue of a |
> +| | | specific RSS context |
> +| | | |
> +| | | - probably difficult to gain |
> +| | | community acceptance |
> ++--------------+------------------------------+------------------------------+
> +| TC action | - much more flexibility, with| - needs to be in sync with |
> +| | per-flow RSS, multiple | iproute2's tc program |
> +| | keys, multiple packet | |
> +| | fields for the hash... | - kernel upstreaming is not |
> +| | | necessarily easy |
> +| | - it's a separate kernel | |
> +| | module that can be | - rework in tap PMD to |
> +| | maintained out-of-tree and | support new RSS action and |
> +| | optionally upstreamed | configuration |
> +| | anytime | |
> +| | | |
> +| | - most logical to be handled | |
> +| | in kernel as RSS is | |
> +| | supposed to be computed in | |
> +| | the "NIC" exactly once. | |
> +| | | |
> +| | - fastest | |
> +| | | |
> +| | - no change in tap PMD | |
> +| | datapath | |
> ++--------------+------------------------------+------------------------------+
> +
> +TC rules using BPF from tap PMD
> +-------------------------------
> +
> +The third solution is the best for userland-based solutions.
> +It does the job well, fast (datapath running in kernel), is logically happening
> +in the kernel in runtime, supports flow-based RSS, has the best potential to
> +be accepted by the community.
> +
> +Advantages with this solution:
> +- hash can be recorded in the packet data and read in tap PMD
> +- no kernel customization, everything in DPDK
> +- packet gets in tap PMD on the correct queue directly
> +
> +Drawbacks:
> +- complicates tap PMD a lot:
> + - 3 BPF programs
> + - new implicit rules
> + - new action and filter support
> + - packet stripping
> +- numerous TC rules required (in proportion with the number of queues)
> +- fast (kernel + JIT BPF), but several TC rules must be crossed
> +
> +BPF programs controlled from tap PMD will be used to match packets, compute a
> +hash given the configured key, and send packets to tap using the desired queue.
> +
> +Design
> +~~~~~~
> +
> +BPF has a limited set of functions for editing the skb in TC. They are listed
> +in ``linux/net/core/filter.c:tc_cls_act_func_proto()``:
> +
> +- skb_store_bytes
> +- skb_load_bytes
> +- skb_pull_data
> +- csum_diff
> +- csum_update
> +- l3_csum_replace
> +- l4_csum_replace
> +- clone_redirect
> +- get_cgroup_classid
> +- skb_vlan_push
> +- skb_vlan_pop
> +- skb_change_proto
> +- skb_change_type
> +- skb_change_tail
> +- skb_get_tunnel_key
> +- skb_set_tunnel_key
> +- skb_get_tunnel_opt
> +- skb_set_tunnel_opt
> +- redirect
> +- get_route_realm
> +- get_hash_recalc
> +- set_hash_invalid
> +- perf_event_output
> +- get_smp_processor_id
> +- skb_under_cgroup
> +
> +In a BPF program, it is typically not possible to edit the queue_mapping field
> +to direct the packet in the correct queue. That part would be done by chaining a
> +``skbedit queue_mapping`` action.
> +
> +It is not possible either to directly prepend data to a packet (appending works,
> +though).
> +
> +A packet would go through these rules (on the local side of the tap netdevice):
> +
> ++-----+---------------------------+----------------------------------+----------+
> +|PRIO | Match | Action 1 | Action 2 |
> ++=====+===========================+==================================+==========+
> +| 1 | marked? | skbedit queue 'mark' --> DPDK | |
> ++-----+---------------------------+----------------------------------+----------+
> +| 2 | marked? | skbedit queue 'mark' --> DPDK | |
> ++-----+---------------------------+----------------------------------+----------+
> +| ... | | | |
> ++-----+---------------------------+----------------------------------+----------+
> +| x | ANY | BPF: append NULL 32bits for hash | |
> +| | | | |
> ++-----+---------------------------+----------------------------------+----------+
> +|x + 1| ACTUAL FLOW RULE 1 MATCH | ... | |
> +| | | | |
> ++-----+---------------------------+----------------------------------+----------+
> +|x + 2| ACTUAL FLOW RULE 2 MATCH | ... | |
> +| | | | |
> ++-----+---------------------------+----------------------------------+----------+
> +| ... | | | |
> ++-----+---------------------------+----------------------------------+----------+
> +| y | FLOW RULE RSS 1 MATCH | BPF compute hash into packet |reclassify|
> +| | | tailroom && set queue in skb->cb | |
> ++-----+---------------------------+----------------------------------+----------+
> +|y + 1| FLOW RULE RSS 2 MATCH | BPF compute hash into packet |reclassify|
> +| | | tailroom && set queue in skb->cb | |
> ++-----+---------------------------+----------------------------------+----------+
> +| ... | | | |
> ++-----+---------------------------+----------------------------------+----------+
> +| z | ANY (default RSS) | BPF compute hash into packet |reclassify|
> +| | | tailroom && set queue in skb->cb | |
> ++-----+---------------------------+----------------------------------+----------+
> +| z | ANY (isolate mode) | DROP | |
> ++-----+---------------------------+----------------------------------+----------+
> +
> +
> +
> +TC kernel action
> +----------------
> +
> +The latest solution (implementing a TC action) would probably be the most simple
> +to implement. It is also very flexible, opening more possibilities for filtering
> +and RSS combined.
> +
> +For this solution, the following parameters could be used to configure RSS in a
> +TC netlink message:
> +
> +``queues`` (u16 \*):
> + list of queues to spread incoming traffic on. That's actually the reta.
> + **Note:** the queue in an ``skb`` is on 16-bits, hence the type here.
> +
> +``key`` (u8 \*):
> + key to use for the Toeplitz-hash in this flow.
> +
> +``hash_fields`` (bitfield):
> + similar to what's in DPDK, the bitfield should determine what fields in the
> + packet header to use for hashing. It is likely another means of configuring
> + which fields to pick would be used actually.
> +
> +``algo`` (unsigned):
> + an enum value from the kernel act_rss header can be used to determine which
> + algorithm (implemented in the kernel) to use. Possible algos could be
> + toeplitz, xor, symmetric hash...
> +
> +**Note:** The number of queues to use is automatically deduced from the
> +``queues`` netlink attribute length. The ``key`` length can be similarly
> +obtained.
> +
> +.. raw:: pdf
> +
> + PageBreak
> +
> +Appendix: TC netlink message
> +============================
> +
> +**Note:** For deterministic behavior, TC queueing disciplines (QDISC), filters
> +and classes must be flushed before starting to apply TC rules. There is a little
> +bit of boilerplate (with specific netlink messages) to ensure TC rules can be
> +applied. Typically, the TC ``ingress`` QDISC must be created first.
> +
> +For information, netlink messages regarding TC will look like this::
> +
> + 0 8 16 24 32
> + +----------+----------+----------+----------+ ---
> + 0 | Length | \
> + +---------------------+---------------------+ \
> + 4 | Type | Flags | |
> + +----------- ---------+---------------------+ >-- struct
> + 8 | Sequence number | | nlmsghdr
> + +-------------------------------------------+ /
> + 12 | Process Port ID (PID) | /
> + +==========+==========+==========+==========+ ---
> + 16 | Family | Rsvd1 | Reserved2 | \
> + +----------+----------+---------------------+ \
> + 20 | Interface index | |
> + +-------------------------------------------+ |
> + 24 | Handle | |
> + +-------------------------------------------+ >-- struct
> + 28 | Parent handle | | tcmsg
> + | MAJOR + MINOR | |
> + +-------------------------------------------+ |
> + 32 | TCM info | /
> + | priority + protocol | /
> + +===========================================+ ---
> + | |
> + | Payload |
> + | |
> + ........................................
> + | |
> + | |
> + +-------------------------------------------+
> diff --git a/drivers/net/tap/Makefile b/drivers/net/tap/Makefile
> index 405b49e..9afae5e 100644
> --- a/drivers/net/tap/Makefile
> +++ b/drivers/net/tap/Makefile
> @@ -39,6 +39,9 @@ EXPORT_MAP := rte_pmd_tap_version.map
>
> LIBABIVER := 1
>
> +# TAP_MAX_QUEUES must be a power of 2 as it will be used for masking */
> +TAP_MAX_QUEUES = 16
> +
> CFLAGS += -O3
> CFLAGS += -I$(SRCDIR)
> CFLAGS += -I.
> @@ -47,6 +50,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
> LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
> LDLIBS += -lrte_bus_vdev
>
> +CFLAGS += -DTAP_MAX_QUEUES=$(TAP_MAX_QUEUES)
> +
> #
> # all source are stored in SRCS-y
> #
> @@ -89,7 +94,6 @@ tap_autoconf.h: tap_autoconf.h.new
> mv '$<' '$@'
>
> $(SRCS-$(CONFIG_RTE_LIBRTE_PMD_TAP):.c=.o): tap_autoconf.h
> -
> clean_tap: FORCE
> $Q rm -f -- tap_autoconf.h tap_autoconf.h.new
>
> diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
> index 829f32f..01ac153 100644
> --- a/drivers/net/tap/rte_eth_tap.h
> +++ b/drivers/net/tap/rte_eth_tap.h
> @@ -45,7 +45,7 @@
> #include <rte_ether.h>
>
> #ifdef IFF_MULTI_QUEUE
> -#define RTE_PMD_TAP_MAX_QUEUES 16
> +#define RTE_PMD_TAP_MAX_QUEUES TAP_MAX_QUEUES
> #else
> #define RTE_PMD_TAP_MAX_QUEUES 1
> #endif
> @@ -90,6 +90,11 @@ struct pmd_internals {
> int ioctl_sock; /* socket for ioctl calls */
> int nlsk_fd; /* Netlink socket fd */
> int flow_isolate; /* 1 if flow isolation is enabled */
> + int flower_support; /* 1 if kernel supports, else 0 */
> + int flower_vlan_support; /* 1 if kernel supports, else 0 */
> + int rss_enabled; /* 1 if RSS is enabled, else 0 */
> + /* implicit rules set when RSS is enabled */
> + LIST_HEAD(tap_rss_flows, rte_flow) rss_flows;
> LIST_HEAD(tap_flows, rte_flow) flows; /* rte_flow rules */
> /* implicit rte_flow rules set when a remote device is active */
> LIST_HEAD(tap_implicit_flows, rte_flow) implicit_flows;
> diff --git a/drivers/net/tap/tap_bpf_elf.h b/drivers/net/tap/tap_bpf_elf.h
> new file mode 100644
> index 0000000..f3db1bf
> --- /dev/null
> +++ b/drivers/net/tap/tap_bpf_elf.h
> @@ -0,0 +1,56 @@
> +/*******************************************************************************
> +
> + Copyright (C) 2015 Daniel Borkmann <daniel@iogearbox.net>
> +
> + Copied from iproute2's include/bpf_elf.h, available at:
> + https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
> +
> + This file is licensed under GNU General Public License (GPL) v2.
> +
> + The full GNU General Public License is included in this distribution in
> + the file called "LICENSE.GPL".
> +
> +*******************************************************************************/
> +
> +
> +#ifndef __BPF_ELF__
> +#define __BPF_ELF__
> +
> +#include <asm/types.h>
> +
> +/* Note:
> + *
> + * Below ELF section names and bpf_elf_map structure definition
> + * are not (!) kernel ABI. It's rather a "contract" between the
> + * application and the BPF loader in tc. For compatibility, the
> + * section names should stay as-is. Introduction of aliases, if
> + * needed, are a possibility, though.
> + */
> +
> +/* ELF section names, etc */
> +#define ELF_SECTION_LICENSE "license"
> +#define ELF_SECTION_MAPS "maps"
> +#define ELF_SECTION_PROG "prog"
> +#define ELF_SECTION_CLASSIFIER "classifier"
> +#define ELF_SECTION_ACTION "action"
> +
> +#define ELF_MAX_MAPS 64
> +#define ELF_MAX_LICENSE_LEN 128
> +
> +/* Object pinning settings */
> +#define PIN_NONE 0
> +#define PIN_OBJECT_NS 1
> +#define PIN_GLOBAL_NS 2
> +
> +/* ELF map definition */
> +struct bpf_elf_map {
> + __u32 type;
> + __u32 size_key;
> + __u32 size_value;
> + __u32 max_elem;
> + __u32 flags;
> + __u32 id;
> + __u32 pinning;
> +};
> +
> +#endif /* __BPF_ELF__ */
> diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
> index ffc0b85..43bab7d 100644
> --- a/drivers/net/tap/tap_flow.c
> +++ b/drivers/net/tap/tap_flow.c
> @@ -43,6 +43,9 @@
> #include <tap_autoconf.h>
> #include <tap_tcmsgs.h>
>
> +#include <linux/bpf.h>
> +#include <linux/tc_act/tc_bpf.h>
> +
> #ifndef HAVE_TC_FLOWER
> /*
> * For kernels < 4.2, this enum is not defined. Runtime checks will be made to
> @@ -104,6 +107,23 @@ struct remote_rule {
> int mirred;
> };
>
> +struct action_data {
> + char id[16];
> +
> + union {
> + struct tc_gact gact;
> + struct tc_mirred mirred;
> + struct skbedit {
> + struct tc_skbedit skbedit;
> + uint16_t queue;
> + } skbedit;
> + struct bpf {
> + int bpf_fd;
> + char *annotation;
> + } bpf;
> + };
> +};
> +
> static int tap_flow_create_eth(const struct rte_flow_item *item, void *data);
> static int tap_flow_create_vlan(const struct rte_flow_item *item, void *data);
> static int tap_flow_create_ipv4(const struct rte_flow_item *item, void *data);
> @@ -134,6 +154,8 @@ struct remote_rule {
> int set,
> struct rte_flow_error *error);
>
> +static int rss_enable(struct pmd_internals *pmd);
> +
> static const struct rte_flow_ops tap_flow_ops = {
> .validate = tap_flow_validate,
> .create = tap_flow_create,
> @@ -816,111 +838,64 @@ struct tap_flow_items {
> }
>
> /**
> - * Transform a DROP/PASSTHRU action item in the provided flow for TC.
> - *
> - * @param[in, out] flow
> - * Flow to be filled.
> - * @param[in] action
> - * Appropriate action to be set in the TCA_GACT_PARMS structure.
> - *
> - * @return
> - * 0 if checks are alright, -1 otherwise.
> + * FIXME
> */
> static int
> -add_action_gact(struct rte_flow *flow, int action)
> +add_action(struct rte_flow *flow, size_t *act_index, struct action_data *adata)
> {
> struct nlmsg *msg = &flow->msg;
> - size_t act_index = 1;
> - struct tc_gact p = {
> - .action = action
> - };
>
> - if (nlattr_nested_start(msg, TCA_FLOWER_ACT) < 0)
> - return -1;
> - if (nlattr_nested_start(msg, act_index++) < 0)
> + if (nlattr_nested_start(msg, ++(*act_index)) < 0)
> return -1;
> - nlattr_add(&msg->nh, TCA_ACT_KIND, sizeof("gact"), "gact");
> - if (nlattr_nested_start(msg, TCA_ACT_OPTIONS) < 0)
> - return -1;
> - nlattr_add(&msg->nh, TCA_GACT_PARMS, sizeof(p), &p);
> - nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
> - nlattr_nested_finish(msg); /* nested act_index */
> - nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
> - return 0;
> -}
> -
> -/**
> - * Transform a MIRRED action item in the provided flow for TC.
> - *
> - * @param[in, out] flow
> - * Flow to be filled.
> - * @param[in] ifindex
> - * Netdevice ifindex, where to mirror/redirect packet to.
> - * @param[in] action_type
> - * Either TCA_EGRESS_REDIR for redirection or TCA_EGRESS_MIRROR for mirroring.
> - *
> - * @return
> - * 0 if checks are alright, -1 otherwise.
> - */
> -static int
> -add_action_mirred(struct rte_flow *flow, uint16_t ifindex, uint16_t action_type)
> -{
> - struct nlmsg *msg = &flow->msg;
> - size_t act_index = 1;
> - struct tc_mirred p = {
> - .eaction = action_type,
> - .ifindex = ifindex,
> - };
>
> - if (nlattr_nested_start(msg, TCA_FLOWER_ACT) < 0)
> - return -1;
> - if (nlattr_nested_start(msg, act_index++) < 0)
> - return -1;
> - nlattr_add(&msg->nh, TCA_ACT_KIND, sizeof("mirred"), "mirred");
> + nlattr_add(&msg->nh, TCA_ACT_KIND, strlen(adata->id), adata->id);
> if (nlattr_nested_start(msg, TCA_ACT_OPTIONS) < 0)
> return -1;
> - if (action_type == TCA_EGRESS_MIRROR)
> - p.action = TC_ACT_PIPE;
> - else /* REDIRECT */
> - p.action = TC_ACT_STOLEN;
> - nlattr_add(&msg->nh, TCA_MIRRED_PARMS, sizeof(p), &p);
> + if (strcmp("gact", adata->id) == 0) {
> + nlattr_add(&msg->nh, TCA_GACT_PARMS, sizeof(adata->gact),
> + &adata->gact);
> + } else if (strcmp("mirred", adata->id) == 0) {
> + if (adata->mirred.eaction == TCA_EGRESS_MIRROR)
> + adata->mirred.action = TC_ACT_PIPE;
> + else /* REDIRECT */
> + adata->mirred.action = TC_ACT_STOLEN;
> + nlattr_add(&msg->nh, TCA_MIRRED_PARMS, sizeof(adata->mirred),
> + &adata->mirred);
> + } else if (strcmp("skbedit", adata->id) == 0) {
> + nlattr_add(&msg->nh, TCA_SKBEDIT_PARMS,
> + sizeof(adata->skbedit.skbedit),
> + &adata->skbedit.skbedit);
> + nlattr_add16(&msg->nh, TCA_SKBEDIT_QUEUE_MAPPING,
> + adata->skbedit.queue);
> + } else if (strcmp("bpf", adata->id) == 0) {
> + nlattr_add32(&msg->nh, TCA_ACT_BPF_FD, adata->bpf.bpf_fd);
> + nlattr_add(&msg->nh, TCA_ACT_BPF_NAME,
> + strlen(adata->bpf.annotation),
> + adata->bpf.annotation);
> + } else {
> + return -1;
> + }
> nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
> nlattr_nested_finish(msg); /* nested act_index */
> - nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
> return 0;
> }
>
> /**
> - * Transform a QUEUE action item in the provided flow for TC.
> - *
> - * @param[in, out] flow
> - * Flow to be filled.
> - * @param[in] queue
> - * Queue id to use.
> - *
> - * @return
> - * 0 if checks are alright, -1 otherwise.
> + * FIXME
> */
> static int
> -add_action_skbedit(struct rte_flow *flow, uint16_t queue)
> +add_actions(struct rte_flow *flow, int nb_actions, struct action_data *data,
> + int classifier_action)
> {
> struct nlmsg *msg = &flow->msg;
> - size_t act_index = 1;
> - struct tc_skbedit p = {
> - .action = TC_ACT_PIPE
> - };
> + size_t act_index = 0;
> + int i;
>
> - if (nlattr_nested_start(msg, TCA_FLOWER_ACT) < 0)
> - return -1;
> - if (nlattr_nested_start(msg, act_index++) < 0)
> + if (nlattr_nested_start(msg, classifier_action) < 0)
> return -1;
> - nlattr_add(&msg->nh, TCA_ACT_KIND, sizeof("skbedit"), "skbedit");
> - if (nlattr_nested_start(msg, TCA_ACT_OPTIONS) < 0)
> - return -1;
> - nlattr_add(&msg->nh, TCA_SKBEDIT_PARMS, sizeof(p), &p);
> - nlattr_add16(&msg->nh, TCA_SKBEDIT_QUEUE_MAPPING, queue);
> - nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
> - nlattr_nested_finish(msg); /* nested act_index */
> + for (i = 0; i < nb_actions; i++)
> + if (add_action(flow, &act_index, data + i) < 0)
> + return -1;
> nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
> return 0;
> }
> @@ -1053,7 +1028,12 @@ struct tap_flow_items {
> }
> }
> if (mirred && flow) {
> - uint16_t if_index = pmd->if_index;
> + struct action_data adata = {
> + .id = "mirred",
> + .mirred = {
> + .eaction = mirred,
> + },
> + };
>
> /*
> * If attr->egress && mirred, then this is a special
> @@ -1061,9 +1041,13 @@ struct tap_flow_items {
> * redirect packets coming from the DPDK App, out
> * through the remote netdevice.
> */
> - if (attr->egress)
> - if_index = pmd->remote_if_index;
> - if (add_action_mirred(flow, if_index, mirred) < 0)
> + adata.mirred.ifindex = attr->ingress ? pmd->if_index :
> + pmd->remote_if_index;
> + if (mirred == TCA_EGRESS_MIRROR)
> + adata.mirred.action = TC_ACT_PIPE;
> + else
> + adata.mirred.action = TC_ACT_STOLEN;
> + if (add_actions(flow, 1, &adata, TCA_FLOWER_ACT) < 0)
> goto exit_action_not_supported;
> else
> goto end;
> @@ -1077,14 +1061,33 @@ struct tap_flow_items {
> if (action)
> goto exit_action_not_supported;
> action = 1;
> - if (flow)
> - err = add_action_gact(flow, TC_ACT_SHOT);
> + if (flow) {
> + struct action_data adata = {
> + .id = "gact",
> + .gact = {
> + .action = TC_ACT_SHOT,
> + },
> + };
> +
> + err = add_actions(flow, 1, &adata,
> + TCA_FLOWER_ACT);
> + }
> } else if (actions->type == RTE_FLOW_ACTION_TYPE_PASSTHRU) {
> if (action)
> goto exit_action_not_supported;
> action = 1;
> - if (flow)
> - err = add_action_gact(flow, TC_ACT_UNSPEC);
> + if (flow) {
> + struct action_data adata = {
> + .id = "gact",
> + .gact = {
> + /* continue */
> + .action = TC_ACT_UNSPEC,
> + },
> + };
> +
> + err = add_actions(flow, 1, &adata,
> + TCA_FLOWER_ACT);
> + }
> } else if (actions->type == RTE_FLOW_ACTION_TYPE_QUEUE) {
> const struct rte_flow_action_queue *queue =
> (const struct rte_flow_action_queue *)
> @@ -1096,22 +1099,30 @@ struct tap_flow_items {
> if (!queue ||
> (queue->index > pmd->dev->data->nb_rx_queues - 1))
> goto exit_action_not_supported;
> - if (flow)
> - err = add_action_skbedit(flow, queue->index);
> + if (flow) {
> + struct action_data adata = {
> + .id = "skbedit",
> + .skbedit = {
> + .skbedit = {
> + .action = TC_ACT_PIPE,
> + },
> + .queue = queue->index,
> + },
> + };
> +
> + err = add_actions(flow, 1, &adata,
> + TCA_FLOWER_ACT);
> + }
> } else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) {
> - /* Fake RSS support. */
> const struct rte_flow_action_rss *rss =
> (const struct rte_flow_action_rss *)
> actions->conf;
>
> - if (action)
> - goto exit_action_not_supported;
> - action = 1;
> - if (!rss || rss->num < 1 ||
> - (rss->queue[0] > pmd->dev->data->nb_rx_queues - 1))
> + if (action++)
> goto exit_action_not_supported;
> - if (flow)
> - err = add_action_skbedit(flow, rss->queue[0]);
> + if (!pmd->rss_enabled)
> + err = rss_enable(pmd);
> + (void)rss;
> } else {
> goto exit_action_not_supported;
> }
> @@ -1632,6 +1643,127 @@ int tap_flow_implicit_destroy(struct pmd_internals *pmd,
> return 0;
> }
>
> +#define BPF_PROGRAM "tap_bpf_program.o"
> +
> +/**
> + * Enable RSS on tap: create leading TC rules for queuing.
> + */
> +static int rss_enable(struct pmd_internals *pmd)
> +{
> + struct rte_flow *rss_flow = NULL;
> + char section[64];
> + struct nlmsg *msg = NULL;
> + /* 4096 is the maximum number of instructions for a BPF program */
> + char annotation[256];
> + int bpf_fd;
> + int i;
> +
> + /*
> + * Add a rule per queue to match reclassified packets and direct them to
> + * the correct queue.
> + */
> + for (i = 0; i < pmd->dev->data->nb_rx_queues; i++) {
> + struct action_data adata = {
> + .id = "skbedit",
> + .skbedit = {
> + .skbedit = {
> + .action = TC_ACT_PIPE,
> + },
> + .queue = i,
> + },
> + };
> +
> + bpf_fd = 0;
> +
> + rss_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
> + if (!rss_flow) {
> + RTE_LOG(ERR, PMD,
> + "Cannot allocate memory for rte_flow");
> + return -1;
> + }
> + msg = &rss_flow->msg;
> + tc_init_msg(msg, pmd->if_index, RTM_NEWTFILTER, NLM_F_REQUEST |
> + NLM_F_ACK | NLM_F_EXCL | NLM_F_CREATE);
> + msg->t.tcm_info = TC_H_MAKE((i + PRIORITY_OFFSET) << 16,
> + htons(ETH_P_ALL));
> + msg->t.tcm_parent = TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
> + tap_flow_set_handle(rss_flow);
> + nlattr_add(&msg->nh, TCA_KIND, sizeof("bpf"), "bpf");
> + if (nlattr_nested_start(msg, TCA_OPTIONS) < 0)
> + return -1;
> + nlattr_add32(&msg->nh, TCA_BPF_FD, bpf_fd);
> + snprintf(annotation, sizeof(annotation), "%s:[%s]",
> + BPF_PROGRAM, section);
> + nlattr_add(&msg->nh, TCA_BPF_NAME, strlen(annotation),
> + annotation);
> +
> + if (add_actions(rss_flow, 1, &adata, TCA_BPF_ACT) < 0)
> + return -1;
> + nlattr_nested_finish(msg); /* nested TCA_ACT_OPTIONS */
> + /* Netlink message is now ready to be sent */
> + if (nl_send(pmd->nlsk_fd, &msg->nh) < 0)
> + return -1;
> + if (nl_recv_ack(pmd->nlsk_fd) < 0)
> + return -1;
> + LIST_INSERT_HEAD(&pmd->rss_flows, rss_flow, next);
> + }
> +
> + snprintf(annotation, sizeof(annotation), "%s:[%s]", BPF_PROGRAM,
> + section);
> + rss_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
> + if (!rss_flow) {
> + RTE_LOG(ERR, PMD,
> + "Cannot allocate memory for rte_flow");
> + return -1;
> + }
> + msg = &rss_flow->msg;
> + tc_init_msg(msg, pmd->if_index, RTM_NEWTFILTER,
> + NLM_F_REQUEST | NLM_F_ACK | NLM_F_EXCL | NLM_F_CREATE);
> + msg->t.tcm_info =
> + TC_H_MAKE((RTE_PMD_TAP_MAX_QUEUES + PRIORITY_OFFSET) << 16,
> + htons(ETH_P_ALL));
> + msg->t.tcm_parent = TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
> + tap_flow_set_handle(rss_flow);
> + nlattr_add(&msg->nh, TCA_KIND, sizeof("flower"), "flower");
> + if (nlattr_nested_start(msg, TCA_OPTIONS) < 0)
> + return -1;
> +
> + /* no fields for matching: all packets must match */
> + {
> + /* Actions */
> + struct action_data data[2] = {
> + [0] = {
> + .id = "bpf",
> + .bpf = {
> + .bpf_fd = bpf_fd,
> + .annotation = annotation,
> + },
> + },
> + [1] = {
> + .id = "gact",
> + .gact = {
> + /* continue */
> + .action = TC_ACT_UNSPEC,
> + },
> + },
> + };
> +
> + if (add_actions(rss_flow, 2, data, TCA_FLOWER_ACT) < 0)
> + return -1;
> + }
> + nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
> + nlattr_nested_finish(msg); /* nested TCA_OPTIONS */
> + /* Netlink message is now ready to be sent */
> + if (nl_send(pmd->nlsk_fd, &msg->nh) < 0)
> + return -1;
> + if (nl_recv_ack(pmd->nlsk_fd) < 0)
> + return -1;
> + LIST_INSERT_HEAD(&pmd->rss_flows, rss_flow, next);
> +
> + pmd->rss_enabled = 1;
> + return 0;
> +}
> +
> /**
> * Manage filter operations.
> *
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
2017-11-30 17:39 ` Thomas Monjalon
@ 2017-12-05 7:59 ` Pascal Mazon
2017-12-13 9:58 ` Ophir Munk
0 siblings, 1 reply; 11+ messages in thread
From: Pascal Mazon @ 2017-12-05 7:59 UTC (permalink / raw)
To: Thomas Monjalon, Stephen Hemminger; +Cc: dev, Ophir Munk, Olga Shern
Indeed, the spirit of the initial work was to publish source code,
compiled BPF bytecode, and Makefile for re-generating the latter.
I have no clue regarding licensing, I'll trust you guys on that.
On 30/11/2017 18:39, Thomas Monjalon wrote:
> 30/11/2017 18:20, Stephen Hemminger:
>> On Thu, 30 Nov 2017 18:05:22 +0100
>> Thomas Monjalon <thomas@monjalon.net> wrote:
>>
>>> 30/11/2017 17:54, Stephen Hemminger:
>>>> Loading BPF is a could solution to doing dynamic flow matching.
>>>> It needs to be done differently to be accepted.
>>>>
>>>> Putting raw machine instructions in source code is as bad as binary
>>>> blobs. You need to provide original source of program and then have
>>>> build instructions to create any needed code.
>>> The source program is provided in this patch: tap_bpf_program.c
>>> It is pre-compiled to avoid requiring too many dependencies when building DPDK.
>> But the "freedom to modify" comes into play here. If a *evil* vendor builds
>> an application based on DPDK and does not provide source. Then user still deserves
>> the right to modify the eBPF program that it loads as GPL. The best solution
>> is to make the TAP PMD loader routine load the program from a file.
>> Although I am certainly not a FSF legal scholar, putting GPL'd object code in
>> TAP PMD risks accusations of being a derived or combined work.
> Good point.
> The compiled BPF may be provided as a plugin file.
> So we would be free to not package this GPL file.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
2017-12-05 7:59 ` Pascal Mazon
@ 2017-12-13 9:58 ` Ophir Munk
0 siblings, 0 replies; 11+ messages in thread
From: Ophir Munk @ 2017-12-13 9:58 UTC (permalink / raw)
To: Pascal Mazon, Thomas Monjalon, Stephen Hemminger; +Cc: dev, Olga Shern
Any eBPF program must be GPL compatible to use GPL-ed functions.
Please see kernel code snippet http://elixir.free-electrons.com/linux/latest/source/kernel/bpf/syscall.c
/* eBPF programs must be GPL compatible to use GPL-ed functions */
is_gpl = license_is_gpl_compatible(license);
where you can find in http://elixir.free-electrons.com/linux/latest/source/include/linux/license.h#L4 the implementation of licensing checking:
static inline int license_is_gpl_compatible(const char *license)
{
return (strcmp(license, "GPL") == 0
|| strcmp(license, "GPL v2") == 0
|| strcmp(license, "GPL and additional rights") == 0
|| strcmp(license, "Dual BSD/GPL") == 0
|| strcmp(license, "Dual MIT/GPL") == 0
|| strcmp(license, "Dual MPL/GPL") == 0);
}
Calling BPF system call to download an eBPF program will require using any one of the GPL strings listed above.
Is "Dual BSD/GPL" acceptable?
Please advise.
> -----Original Message-----
> From: Pascal Mazon [mailto:pascal.mazon@6wind.com]
> Sent: Tuesday, December 05, 2017 9:59 AM
> To: Thomas Monjalon <thomas@monjalon.net>; Stephen Hemminger
> <stephen@networkplumber.org>
> Cc: dev@dpdk.org; Ophir Munk <ophirmu@mellanox.com>; Olga Shern
> <olgas@mellanox.com>
> Subject: Re: [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions
>
> Indeed, the spirit of the initial work was to publish source code, compiled
> BPF bytecode, and Makefile for re-generating the latter.
> I have no clue regarding licensing, I'll trust you guys on that.
>
> On 30/11/2017 18:39, Thomas Monjalon wrote:
> > 30/11/2017 18:20, Stephen Hemminger:
> >> On Thu, 30 Nov 2017 18:05:22 +0100
> >> Thomas Monjalon <thomas@monjalon.net> wrote:
> >>
> >>> 30/11/2017 17:54, Stephen Hemminger:
> >>>> Loading BPF is a could solution to doing dynamic flow matching.
> >>>> It needs to be done differently to be accepted.
> >>>>
> >>>> Putting raw machine instructions in source code is as bad as binary
> >>>> blobs. You need to provide original source of program and then have
> >>>> build instructions to create any needed code.
> >>> The source program is provided in this patch: tap_bpf_program.c It
> >>> is pre-compiled to avoid requiring too many dependencies when building
> DPDK.
> >> But the "freedom to modify" comes into play here. If a *evil* vendor
> >> builds an application based on DPDK and does not provide source. Then
> >> user still deserves the right to modify the eBPF program that it
> >> loads as GPL. The best solution is to make the TAP PMD loader routine
> load the program from a file.
> >> Although I am certainly not a FSF legal scholar, putting GPL'd object
> >> code in TAP PMD risks accusations of being a derived or combined work.
> > Good point.
> > The compiled BPF may be provided as a plugin file.
> > So we would be free to not package this GPL file.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-12-13 9:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 8:01 [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Ophir Munk
2017-11-30 8:01 ` [dpdk-dev] [RFC 2/2] net/tap: add eBPF instructions Ophir Munk
2017-11-30 16:54 ` Stephen Hemminger
2017-11-30 17:05 ` Thomas Monjalon
2017-11-30 17:20 ` Stephen Hemminger
2017-11-30 17:39 ` Thomas Monjalon
2017-12-05 7:59 ` Pascal Mazon
2017-12-13 9:58 ` Ophir Munk
2017-11-30 16:47 ` [dpdk-dev] [RFC 1/2] net/tap: add eBPF to TAP device Stephen Hemminger
2017-11-30 16:54 ` Thomas Monjalon
2017-12-05 7:53 ` Pascal Mazon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).