From owner-freebsd-hackers@freebsd.org Sun Aug 16 09:17:59 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E09733B6525; Sun, 16 Aug 2020 09:17:59 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BTs5y6CHmz45x4; Sun, 16 Aug 2020 09:17:58 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x341.google.com with SMTP id t14so11466424wmi.3; Sun, 16 Aug 2020 02:17:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Tvor/pJI0NFiTATQB+TzIhr9DMnWd54hn7dpbR1vUBQ=; b=thECqJ1t9S9c9YZdkzI9X7fW2Ayvf4LtvfJcN0tZQ8BdDpNeh4Lyp8ile5V1v6gxiX PFLB+H76qpblpNm/T01VMdUjRcV4wnofD/hfRLKJ/JEJRBs8b9H7hN10BA12huBSdQrT sXCRuFDJG75CjoG+S1SmtMInF459vgbZzBdHIcb/I/VNtPUZQB4Sl/QmfXIuBjUrWUF/ QylLxjHWpd0gcDc24A+uxAw5WkBw6FwGkPPfEU81Ea6OkvOBzNmx5PPxpT0nGDr5HqDB x5W/89jpB7gj8EeYOY5YV8T+Vsi3Rbr7o0M9pdfPwl9s9uwEB4ybMwm1FGNC4WYgPHb8 sRrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Tvor/pJI0NFiTATQB+TzIhr9DMnWd54hn7dpbR1vUBQ=; b=iGNSDleBDtr74P+/B6ZFAfhrpVTy8a8IfXRBrlC1BcdME88roAlZGdzI1889RNe3Lv vRhYxGfB/Qt+v1hYFDqllzXx0ErErUg+4s4VKr2qnBmdaFreOvwzI4bAEPBAZKgUyJze Vfm7rAihCk2ienWFTP5x1NsnANg9lamT12PJMRFhKQv6HBFyzw2NmUnljM9W+x75XMft net7BLARyixwxyLL3mowMdf/ijG5YYvrthALVya5oFgf1PqttVVBh3opl4WiNVv/tDei VITr/B2NVyKr2vV7ErdmAl5klJAOpOOeCs3dzqGNdgHU0cF4s4XQaM3vhSrj4oiVNOoP jaUQ== X-Gm-Message-State: AOAM531+BeoE5j2GVgLb+RxmGsn1W4T+d7EzJnaTzVsDgIPdCTnh8mh/ oM+Iw4HZXeCmp5ZiGFGRtS5pN5h2zhfgsAbSzAKmgY66 X-Google-Smtp-Source: ABdhPJyB9m2KxTPwhHjgK5SjV4LPca0PmJpgraGDsGgp3iZOAOTdh61ASCp/PeO/2bWCDPy/85/SezIM9sBOMZg+QcE= X-Received: by 2002:a1c:790b:: with SMTP id l11mr10313957wme.127.1597569476808; Sun, 16 Aug 2020 02:17:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:614c:0:0:0:0:0 with HTTP; Sun, 16 Aug 2020 02:17:55 -0700 (PDT) In-Reply-To: <1634721597568903@mail.yandex.ru> References: <1634721597568903@mail.yandex.ru> From: Mateusz Guzik Date: Sun, 16 Aug 2020 11:17:55 +0200 Message-ID: Subject: Re: ip(8) in base To: "Alexander V. Chernikov" Cc: net , freebsd-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1597569479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Tvor/pJI0NFiTATQB+TzIhr9DMnWd54hn7dpbR1vUBQ=; b=vO2Gj18iTvYnYxkwgN70p9xtdLh1P9xPoo5TSEwv9ufDw66qrsp4JlrQ/NBY4Pb+BDoEgc OMCe8SkWdl22YvlbJ654uFz/c2JH6jqqLcN3fcVr+UhFxJB71KikWVNpDNsXzgcZhaPwir sLLQIgdpY2cDPStObQmj1uQwvRa7j/T1Qqn7DgLht38pRuRGzGmYdlDkGdt1wzxnXafDTX AsV0bXjXE5k3xzouxheHCRHsu2R+7kiWV81wVd+zZx653x8qYwShkNNW3lP7mER5w0EpPQ 7uDMEoH34C6QgHwpm2COv/oM/m9C5GpJ27vDIKR7wDwBONxsJeX1cTZlZmE6eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1597569479; a=rsa-sha256; cv=none; b=AwFsKelL95/0+TvLh+WFoTiZg46S2aYQylCvA3nIRAhC8bukFohKRWzA1X1wbvU0OPj/fX fHGUE5onnYV77Y2j9HmCA3PYkQcC35tXRypA550Fs3loSkNdBzlVFyfmSTS/J7XZ4w7Zlu 07eSMfm5IHBduFuv06rl9aRarVPPN1oJe7xTEVPUeLEN7tXGzBN5N4qDmNJnlnDPWx4FJJ B3J1UPqwvu1HWdkK3xf0OBmOKu8S9IzfSLpQGHEZWXddfKkuVU/QcDtyOMHsrHVTFszbbW enTAhaLWxD2wF2CHd2msaof4GTNhpwfAOkqUgvgNYg6OwHx03hXF4BJtJjCwNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=thECqJ1t; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::341 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Rspamd-Queue-Id: 4BTs5y6CHmz45x4 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=thECqJ1t; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::341 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.48 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.07)[-1.069]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; ARC_SIGNED(0.00)[i=1]; NEURAL_HAM_LONG(-1.02)[-1.024]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::341:from]; NEURAL_HAM_SHORT(-0.39)[-0.389]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2020 09:17:59 -0000 If you are not going to be compatible, use a different name. I don't have good ideas, but something in the lines of "netctl" or similar should do the trick. On 8/16/20, Alexander V. Chernikov wrote: > I want to introduce ip(8) or something similar in base. > Basically, I need some userland tool to explicitly operates on nexthops, > nexthop groups and fib lookup algorithms. > > The existing tools are not well suited for the job: route(8) may be a > candidate, but (a) it would either add another bunch of options or > drastically change the tool by introducing [route nhop add], [route nhgro= up > add] and (b) listing is traditionally done by netstat(8). > > I feel like there is a need of some cli tool that provides the ability to > easily extend it by having separate namespaces for each sub-command (hell= o, > ifconfig). > > Naming is hard. I can, for example, use "rt" as a name to address my use > cases. > However, given the kernel interfaces for managing nexthops/nexhop groups = are > the same as with routes/arp/ndp, why not spending some additional time an= d > support operating on routes and neighbors and name it ip? > > Though, that arises multiple questions. > Are we comfortable with ip(8) as a name in general? > If we are, what=E2=80=99s our take on having the compatible interface wit= h Linux > ip(8)? > > Any comments/feedback is welcome :-) > > > Appendix > List of commands I need implemented > > cmd [-46m] nhop create [gw XX] [iface YYY] [mtu YYY] [reject] [proxyfib Y= ] > [fib X][ipv4] [ipv6] > cmd [-46m] nhop delete nhop_id > cmd -46m nhop list > cmd -j nhop list # json > > cmd -46m nhgroup create nhops 1,2,3,4,5,6 [fib X] > cmd -46 nhgroup create nhops 1=3D100,2=3D100,3=3D200,4=3D100 [proxyfib Y]= [fib X] > cmd -46 nhroup list > cmd -46 nhgroup delete nhgroup_id > > cmd -46 fib algo list > cmd -46 fib algo set algo dpdk_lpm6 fib 0 > cmd -46 fib algo set algo auto fib 0 > > > /Alexander > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > --=20 Mateusz Guzik