]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_attr.c
bgpd: efficient NLRI packing for AFs != ipv4-unicast
authorPradosh Mohapatra <pmohapat@cumulusnetworks.com>
Wed, 15 Jan 2014 06:57:57 +0000 (06:57 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 3 Jun 2014 13:08:32 +0000 (15:08 +0200)
commit8c71e481dae11b7ae3f1ef561a989624b2ae84b6
tree4c13b76e1b9aedc45ad9b086be972ba4999ada03
parent2c13299a05e5544a5e79c2a970256a21f488a3fa
bgpd: efficient NLRI packing for AFs != ipv4-unicast

ISSUE:

  Currently, for non-ipv4-unicast address families where prefixes are
  encoded in MP_REACH/MP_UNREACH attributes, BGP ends up sending one
  prefix per UPDATE message. This is quite inefficient. The patch
  addresses the issue.

PATCH:

  We introduce a scratch buffer in the peer structure that stores the
  MP_REACH/MP_UNREACH attributes for non-ipv4-unicast families. This
  enables us to encode multiple prefixes. In the end, the two buffers
  are merged to create the UPDATE packet.

Signed-off-by: Pradosh Mohapatra <pmohapat@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
[DL: removed no longer existing bgp_packet_withdraw prototype]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_packet.c
bgpd/bgpd.c
bgpd/bgpd.h
lib/stream.c
lib/stream.h