summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableProviderImpl.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java1
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java1
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java1
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java1
5 files changed, 5 insertions, 1 deletions
diff --git a/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableProviderImpl.java b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableProviderImpl.java
index 80ebdccd2..8a737d216 100644
--- a/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableProviderImpl.java
+++ b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableProviderImpl.java
@@ -17,7 +17,6 @@
package io.fd.hc2vpp.it.jvpp.benchmark.classify;
import io.fd.vpp.jvpp.core.dto.ClassifyAddDelTable;
-import java.io.Serializable;
import java.util.Random;
import javax.annotation.concurrent.NotThreadSafe;
@@ -66,6 +65,7 @@ class ClassifyTableProviderImpl implements ClassifyTableProvider {
addDelTable.skipNVectors = 0;
addDelTable.matchNVectors = 1;
addDelTable.mask = new byte[16];
+ addDelTable.maskLen = 16;
rnd.nextBytes(addDelTable.mask);
return addDelTable;
}
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
index 0e69b33b6..11a48ef14 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
@@ -166,6 +166,7 @@ public class ClassifySessionWriter extends VppNodeWriter
request.advance = classifySession.getAdvance();
request.match = DatatypeConverter.parseHexBinary(classifySession.getMatch().getValue().replace(":", ""));
+ request.matchLen = request.match.length;
return request;
}
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java
index 34e689e5a..8e72df46a 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriter.java
@@ -145,6 +145,7 @@ public class ClassifyTableWriter extends VppNodeWriter
request.nextTableIndex = ~0; // value not specified
}
request.mask = DatatypeConverter.parseHexBinary(table.getMask().getValue().replace(":", ""));
+ request.maskLen = request.mask.length;
checkArgument(request.mask.length % 16 == 0, "Number of mask bytes must be multiple of 16.");
request.matchNVectors = request.mask.length / 16;
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java
index 0716cde19..b59acdb4e 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java
@@ -87,6 +87,7 @@ public class ClassifySessionWriterTest extends WriterCustomizerTest {
request.match =
new byte[]{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04,
(byte) 0x05, (byte) 0x06, 0x00, 0x00, 0x00, 0x00};
+ request.matchLen = request.match.length;
return request;
}
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
index 389337c76..bd627d5b8 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
@@ -88,6 +88,7 @@ public class ClassifyTableWriterTest extends WriterCustomizerTest {
request.mask =
new byte[]{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04,
(byte) 0x05, (byte) 0x06, 0x00, 0x00, 0x00, 0x00};
+ request.maskLen = request.mask.length;
return request;
}