]> git.proxmox.com Git - mirror_iproute2.git/commit
link dump filter
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Wed, 16 Jul 2014 14:13:25 +0000 (07:13 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 4 Aug 2014 16:32:13 +0000 (09:32 -0700)
commit50b9950dd90114609e10298c0fa32a9371250687
tree8630a52d4e23dd151bfe9372e5f442db05ea41e4
parente4c356827acc661e33b6a6bdffc5ededf7beb659
link dump filter

This patch avoids a full link wildump request when the user has specified
a single link. Uses RTM_GETLINK without the NLM_F_DUMP flag.

This helps on a system with large number of interfaces.

This patch currently only uses the link ifindex in the filter.
Hoping to provide a subsequent kernel patch to do link dump filtering on
other attributes in the kernel.

In iplink_get, to be safe, this patch currently sets the answer buffer
size to the max size that libnetlink rtnl_talk can copy. The current api
does not seem to provide a way to indicate the answer buf size.

changelog from RFC to v1:
    - incorporated comments from stephen (fixed comment and fixed if/else block)

changelog from v1 to v2:
    - fix whitespaces error

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
ip/ip_common.h
ip/ipaddress.c
ip/iplink.c