From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2 0/3] Forbid "type" for peer, update ifname and make it array in ll_cache Date: Wed, 20 Dec 2017 09:37:28 +0200 Message-ID: <1513755451-9800-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f68.google.com ([209.85.215.68]:44040 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932267AbdLTHiF (ORCPT ); Wed, 20 Dec 2017 02:38:05 -0500 Received: by mail-lf0-f68.google.com with SMTP id g63so858747lfl.11 for ; Tue, 19 Dec 2017 23:38:04 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id a9sm3722880lfg.12.2017.12.19.23.38.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Dec 2017 23:38:02 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: In this series I present following improvements and fixes: 1) Forbid "type" parameter when parsing command line for peer in iplink_vxcan.c and link_veth.c using iplink_parse(): we already known it. 2) In ll_remember_index() update ifname, not only rehash it. It might be changed for same ifindex since last run (i.e. in cache "eth0" during the dump "ppp0"). 3) Make ifname fixed size array of chars in @struct ll_cache: names are never exceed IFNAMSIZ (16 bytes). Replace strcmp()/strcpy() with memcmp()/memcpy() to possibly benefit from compiler call inlining. See individual patch description message for details. Thanks, Serhii Serhey Popovych (3): vxcan,veth: Forbid "type" for peer device utils: ll_map: Update name and type for existing entry utils: ll_map: Make network device name fixed size array of char ip/iplink_vxcan.c | 3 +++ ip/link_veth.c | 3 +++ lib/ll_map.c | 47 +++++++++++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 20 deletions(-) -- 1.7.10.4