Skip to content

Commit

Permalink
zebra: Use more appropriately sized stream packets for evpn
Browse files Browse the repository at this point in the history
When sending EVPN data, let's use more appropriately sized
packets for the sending of data.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Apr 8, 2024
1 parent 7d51fc2 commit 67ff4f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions zebra/zebra_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static int ip_prefix_send_to_client(vrf_id_t vrf_id, struct prefix *p,
if (!client)
return 0;

s = stream_new(ZEBRA_MAX_PACKET_SIZ);
s = stream_new(ZEBRA_SMALL_PACKET_SIZE);

zclient_create_header(s, cmd, vrf_id);
stream_put(s, p, sizeof(struct prefix));
Expand Down Expand Up @@ -1140,7 +1140,7 @@ int zebra_evpn_send_add_to_client(struct zebra_evpn *zevpn)

svi_index = zevpn->svi_if ? zevpn->svi_if->ifindex : 0;

s = stream_new(ZEBRA_MAX_PACKET_SIZ);
s = stream_new(ZEBRA_SMALL_PACKET_SIZE);

zclient_create_header(s, ZEBRA_VNI_ADD, zebra_vrf_get_evpn_id());
stream_putl(s, zevpn->vni);
Expand Down Expand Up @@ -1192,7 +1192,7 @@ int zebra_evpn_send_del_to_client(struct zebra_evpn *zevpn)
zebra_evpn_update_all_es(zevpn);
}

s = stream_new(ZEBRA_MAX_PACKET_SIZ);
s = stream_new(ZEBRA_SMALL_PACKET_SIZE);
stream_reset(s);

zclient_create_header(s, ZEBRA_VNI_DEL, zebra_vrf_get_evpn_id());
Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_evpn_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ int zebra_evpn_macip_send_msg_to_client(vni_t vni,
if (!client)
return 0;

s = stream_new(ZEBRA_MAX_PACKET_SIZ);
s = stream_new(ZEBRA_SMALL_PACKET_SIZE);

zclient_create_header(s, cmd, zebra_vrf_get_evpn_id());
stream_putl(s, vni);
Expand Down
6 changes: 3 additions & 3 deletions zebra/zebra_evpn_mh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@ static int zebra_evpn_es_send_add_to_client(struct zebra_evpn_es *es)
if (!client)
return 0;

s = stream_new(ZEBRA_MAX_PACKET_SIZ);
s = stream_new(ZEBRA_SMALL_PACKET_SIZE);

zclient_create_header(s, ZEBRA_LOCAL_ES_ADD, zebra_vrf_get_evpn_id());
stream_put(s, &es->esi, sizeof(esi_t));
Expand Down Expand Up @@ -1971,7 +1971,7 @@ static int zebra_evpn_es_send_del_to_client(struct zebra_evpn_es *es)
if (!client)
return 0;

s = stream_new(ZEBRA_MAX_PACKET_SIZ);
s = stream_new(ZEBRA_SMALL_PACKET_SIZE);
stream_reset(s);

zclient_create_header(s, ZEBRA_LOCAL_ES_DEL, zebra_vrf_get_evpn_id());
Expand Down Expand Up @@ -2639,7 +2639,7 @@ static int zebra_evpn_es_evi_send_to_client(struct zebra_evpn_es *es,
if (!client)
return 0;

s = stream_new(ZEBRA_MAX_PACKET_SIZ);
s = stream_new(ZEBRA_SMALL_PACKET_SIZE);

zclient_create_header(s,
add ? ZEBRA_LOCAL_ES_EVI_ADD : ZEBRA_LOCAL_ES_EVI_DEL,
Expand Down

0 comments on commit 67ff4f7

Please sign in to comment.