From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Yushchenko Subject: DSA vs envelope frames Date: Wed, 30 Nov 2016 17:58:31 +0300 Message-ID: References: <1480444528-30054-1-git-send-email-nikita.yoush@cogentembedded.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Chris Healy , Fabio Estevam , "linux-kernel@vger.kernel.org" , Vivien Didelot , lorian Fainelli To: Toshiaki Makita , Andy Duan , "David S. Miller" , Troy Kisky , Andrew Lunn , Eric Nelson , Philippe Reynes , Johannes Berg , "netdev@vger.kernel.org" Return-path: Received: from mail-lf0-f48.google.com ([209.85.215.48]:33597 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932242AbcK3O6f (ORCPT ); Wed, 30 Nov 2016 09:58:35 -0500 Received: by mail-lf0-f48.google.com with SMTP id c13so148438339lfg.0 for ; Wed, 30 Nov 2016 06:58:34 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: >> (1) When DSA is in use, frames processed by FEC chip contain DSA tag and >> thus can be larger than hardcoded limit of 1522. This issue is not >> FEC-specific, any driver that hardcodes maximum frame size to 1522 (many >> do) will have this issue if used with DSA. > > BTW I'm trying to introduce envelope frames to solve this kind of problems. > http://marc.info/?t=147496691500005&r=1&w=2 > http://marc.info/?t=147496691500003&r=1&w=2 > http://marc.info/?t=147496691500002&r=1&w=2 > http://marc.info/?t=147496691500004&r=1&w=2 > http://marc.info/?t=147496691500001&r=1&w=2 > > It needs jumbo frame support of NICs though. Thanks for pointing to this. Indeed frame with DSA tag conceptually is an envelope frame. ndev->env_hdr_len introduced by your patches, actually is explicitly handled difference between (MTU + 18) and frame that HW should allow. If this is known, hardware can be configured to work with DSA. At least FEC hardware that can send and receive "slightly larger" frames after simple register configuration. Furthermore, since DSA configuration is known statically (it comes from device tree), ndo_set_env_hdr_len method could be automatically called at init, making setup working by default if driver supports that. And if not, perhaps can automatically lower MTU. Looks like a solution :) What's current status of this work? What is not really clear - what if several tagging protocols are used together. AFAIU, things may be more complex that simple appending of tags, e.g. EDSA tag can carry VLAN id inside. Nikita