From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D470C4332F for ; Tue, 22 Nov 2022 00:41:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231313AbiKVAlB (ORCPT ); Mon, 21 Nov 2022 19:41:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230242AbiKVAk7 (ORCPT ); Mon, 21 Nov 2022 19:40:59 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F1481583F for ; Mon, 21 Nov 2022 16:40:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=LH3FIjU4ugtDO+a5e5fvSmHur//3OvRXxjCVQjiWCt8=; b=1n564vQrAbj/E/1DTd6oak4qjJ eF9mmqnTn7Z7AQ1m1bjBgXAc+HkDzHzZKmya4QMUHlUO73WHkxzQG0WOw9H8ND7qTpcbHibQcJhb+ Scx64pmqVphoBQn69PpHBWnRByXcAUPUGIN3yofwnCkxfeuCOimRL/1Ppv4e4kzHwgao=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oxHLK-0034EE-4q; Tue, 22 Nov 2022 01:40:54 +0100 Date: Tue, 22 Nov 2022 01:40:54 +0100 From: Andrew Lunn To: Steve Williams Cc: netdev@vger.kernel.org Subject: Re: [PATCH net-next] net/hanic: Add the hanic network interface for high availability links Message-ID: References: <20221118232639.13743-1-steve.williams@getcruise.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221118232639.13743-1-steve.williams@getcruise.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > +Output R-TAG filter > +=================== > + > +In a realistic system, some destinations do not support 802.1cb, > +or don't need it. The hanic driver has a means to call out these > +destinations by vlan or by mac and vlan together. For example, if > +all the destinations on vlan=11 (0x000b) should not receive r-TAG'ed > +packets, then that can be arranged like so:: > + > + $ echo 000b: prime > /sys/class/net/\/hanic/filters_vlan Please use netlink for all configuration, not sysfs. > +Creating interfaces > +=================== > + > +The way to create interfaces is with a command like this:: > + > + $ echo +hanic0 > /sys/class/net/hanic_interfaces ip link add hanic0 type hanic > + > +It is also possible to destroy interfaces thusly:: > + > + $ echo -hanic0 > /sys/class/net/hanic_interfaces ip link del handic0 > +The standard IP commands can be used to do the enlistment, like so:: > + > + $ ip link set sandlan0a master hanic0 > + $ ip link set sandlan0b master hanic0 It is not clear if sandland is going to get merged, so you probably should just use eth0 and eth1 in the examples. > +* /sys/class/net/\/hanic/test_drop_packet_in > + > +Inject faults by dropping input packets from some port. Write to this > +file the port number and the number of packets to drop. For example, > +to tell port 1 to drop the next 5 input packets:: The normal way to do this is TC. Please don't reinvent what the kernel already has. Probably nobody will look at the code in too much detail until your get your uAPI accepted. uAPI is nearly impossible to change once it is merged, so it is important to get correct. So please throw away all your sysfs code and replace it with netlink. Andrew