From a55da7924adda3e82f6e5be40e01084c65e93ac0 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Mon, 10 Oct 2016 14:55:15 +0200 Subject: HONEYCOMB-233: add support for mixing L2/L3 rules In case of L2 interfaces, acls are translated into a chain of classify tables and assigned as L2 table. In case of L3 interfaces, acls are translated into ip4 and ip6 chains (eth only rules go to both chains, rest - depending on ip-version). Limitations: - it is not possible to define L3 rule without specifying ip-version (common header fields for IP4/IP6 have different offsets), - eth rules on L3 interfaces are applied only to IP traffic (vpp classfier limitation). Change-Id: I7ca2648cabad8c6e936cf71a51e06596a42891e8 Signed-off-by: Marek Gradzki --- .../main/java/io/fd/honeycomb/translate/vpp/util/Ipv4Translator.java | 2 ++ .../src/main/java/io/fd/honeycomb/translate/vpp/util/MacTranslator.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'vpp-common/vpp-translate-utils/src/main/java/io/fd') diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/Ipv4Translator.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/Ipv4Translator.java index 84b0a2e68..56aa4f149 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/Ipv4Translator.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/Ipv4Translator.java @@ -30,6 +30,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types. */ public interface Ipv4Translator extends ByteDataTranslator { + Ipv4Translator INSTANCE = new Ipv4Translator() {}; + /** * Creates address array from address part of {@link Ipv4Prefix} */ diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/MacTranslator.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/MacTranslator.java index a947f95c6..14cc28909 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/MacTranslator.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/vpp/util/MacTranslator.java @@ -28,7 +28,7 @@ import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.Hex; /** - * Trait providing logic for translation of ipv4-related data + * Trait providing logic for translation of MAC address data */ public interface MacTranslator { -- cgit 1.2.3-korg