summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vpp-api-test/vat/api_format.c1
-rw-r--r--vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java4
-rw-r--r--vpp-japi/japi/vppjni.c5
-rw-r--r--vpp-japi/japi/vppjni.h1
-rw-r--r--vpp/api/api.c1
-rw-r--r--vpp/api/vpe.api4
6 files changed, 13 insertions, 3 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index a1a023be28b..0c0a65e0dd3 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -587,6 +587,7 @@ static void vl_api_sw_interface_details_t_handler_json
vat_json_object_add_uint(node, "link_up_down", mp->link_up_down);
vat_json_object_add_uint(node, "link_duplex", mp->link_duplex);
vat_json_object_add_uint(node, "link_speed", mp->link_speed);
+ vat_json_object_add_uint(node, "mtu", ntohs(mp->link_mtu));
vat_json_object_add_uint(node, "sub_id", ntohl(mp->sub_id));
vat_json_object_add_uint(node, "sub_dot1ad", mp->sub_dot1ad);
vat_json_object_add_uint(node, "sub_number_of_tags", mp->sub_number_of_tags);
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java
index b2edae043f7..742dd25ad1c 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceDetails.java
@@ -38,11 +38,12 @@ public final class vppInterfaceDetails {
public final int vtrPushDot1q;
public final int vtrTag1;
public final int vtrTag2;
+ public final int linkMtu;
public vppInterfaceDetails(int ifIndex, String interfaceName, int supIfIndex, byte[] physAddr, byte adminUp,
byte linkUp, byte linkDuplex, byte linkSpeed, int subId, byte subDot1ad, byte subNumberOfTags,
int subOuterVlanId, int subInnerVlanId, byte subExactMatch, byte subDefault, byte subOuterVlanIdAny,
- byte subInnerVlanIdAny, int vtrOp, int vtrPushDot1q, int vtrTag1, int vtrTag2)
+ byte subInnerVlanIdAny, int vtrOp, int vtrPushDot1q, int vtrTag1, int vtrTag2, int linkMtu)
{
this.ifIndex = ifIndex;
this.interfaceName = interfaceName;
@@ -65,5 +66,6 @@ public final class vppInterfaceDetails {
this.vtrPushDot1q = vtrPushDot1q;
this.vtrTag1 = vtrTag1;
this.vtrTag2 = vtrTag2;
+ this.linkMtu = linkMtu;
}
}
diff --git a/vpp-japi/japi/vppjni.c b/vpp-japi/japi/vppjni.c
index f7c297fc99b..54846bcbd2d 100644
--- a/vpp-japi/japi/vppjni.c
+++ b/vpp-japi/japi/vppjni.c
@@ -76,7 +76,7 @@ BIND_JAPI_BYTE_FIELD(vppBridgeDomainInterfaceDetails, splitHorizonGroup);
BIND_JAPI_STRING_FIELD(vppBridgeDomainInterfaceDetails, interfaceName);
BIND_JAPI_CLASS(vppInterfaceCounters, "(JJJJJJJJJJJJJJJJJJJJJJ)V");
-BIND_JAPI_CLASS(vppInterfaceDetails, "(ILjava/lang/String;I[BBBBBIBBIIBBBBIIII)V");
+BIND_JAPI_CLASS(vppInterfaceDetails, "(ILjava/lang/String;I[BBBBBIBBIIBBBBIIIII)V");
BIND_JAPI_CLASS(vppIPv4Address, "(IB)V");
BIND_JAPI_CLASS(vppIPv6Address, "([BB)V");
BIND_JAPI_CLASS(vppL2Fib, "([BZLjava/lang/String;ZZ)V");
@@ -694,6 +694,7 @@ static jobjectArray sw_if_dump_get_interfaces (JNIEnv * env)
jint vtrPushDot1q = sw_if_details->vtr_push_dot1q;
jint vtrTag1 = sw_if_details->vtr_tag1;
jint vtrTag2 = sw_if_details->vtr_tag2;
+ jint linkMtu = sw_if_details->link_mtu;
jbyte adminUpDown = sw_if_details->admin_up_down;
jbyte linkUpDown = sw_if_details->link_up_down;
@@ -712,7 +713,7 @@ static jobjectArray sw_if_dump_get_interfaces (JNIEnv * env)
linkDuplex, linkSpeed, subId, subDot1ad,
subNumberOfTags, subOuterVlanId, subInnerVlanId,
subExactMatch, subDefault, subOuterVlanIdAny,
- subInnerVlanIdAny, vtrOp, vtrPushDot1q, vtrTag1, vtrTag2);
+ subInnerVlanIdAny, vtrOp, vtrPushDot1q, vtrTag1, vtrTag2, linkMtu);
(*env)->SetObjectArrayElement(env, ifArray, i, ifObj);
}
diff --git a/vpp-japi/japi/vppjni.h b/vpp-japi/japi/vppjni.h
index 847bbe9242e..bd0683ae2c5 100644
--- a/vpp-japi/japi/vppjni.h
+++ b/vpp-japi/japi/vppjni.h
@@ -40,6 +40,7 @@ typedef struct {
u8 link_up_down;
u8 link_duplex;
u8 link_speed;
+ u16 link_mtu;
u32 sub_id;
u8 sub_dot1ad;
u8 sub_number_of_tags;
diff --git a/vpp/api/api.c b/vpp/api/api.c
index e30240c4fd3..f51fa0a3310 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -2374,6 +2374,7 @@ static void send_sw_interface_details (vpe_api_main_t * am,
VNET_HW_INTERFACE_FLAG_DUPLEX_SHIFT);
mp->link_speed = ((hi->flags & VNET_HW_INTERFACE_FLAG_SPEED_MASK) >>
VNET_HW_INTERFACE_FLAG_SPEED_SHIFT);
+ mp->link_mtu = ntohs(hi->max_packet_bytes);
strncpy ((char *) mp->interface_name,
(char *) interface_name, ARRAY_LEN(mp->interface_name)-1);
diff --git a/vpp/api/vpe.api b/vpp/api/vpe.api
index 05ba5567f50..2af4f503e8f 100644
--- a/vpp/api/vpe.api
+++ b/vpp/api/vpe.api
@@ -51,6 +51,7 @@ define want_interface_events_reply {
@param interface_name - name of the interface
@param link_duplex - 1 if half duplex, 2 if full duplex
@param link_speed - 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G
+ @param link_MTU - max. transmittion unit
@param sub_if_id - A number 0-N to uniquely identify this subif on super if
@param sub_dot1ad - 0 = dot1q, 1=dot1ad
@param sub_number_of_tags - Number of tags (0 - 2)
@@ -88,6 +89,9 @@ manual_java define sw_interface_details {
/* 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G */
u8 link_speed;
+
+ /* MTU */
+ u16 link_mtu;
/* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface*/
u32 sub_id;