Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648AbcLHFIS (ORCPT ); Thu, 8 Dec 2016 00:08:18 -0500 Received: from che.mayfirst.org ([162.247.75.118]:57856 "EHLO che.mayfirst.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbcLHFIR (ORCPT ); Thu, 8 Dec 2016 00:08:17 -0500 X-Greylist: delayed 463 seconds by postgrey-1.27 at vger.kernel.org; Thu, 08 Dec 2016 00:08:16 EST From: Daniel Kahn Gillmor To: Hannes Frederic Sowa , "Jason A. Donenfeld" , Netdev , linux-mips@linux-mips.org Cc: LKML , WireGuard mailing list Subject: Re: Misalignment, MIPS, and ip_hdr(skb)->version In-Reply-To: <095cac5b-b757-6f4a-e699-8eedf9ed7221@stressinduktion.org> References: <095cac5b-b757-6f4a-e699-8eedf9ed7221@stressinduktion.org> Date: Wed, 07 Dec 2016 23:34:21 -0500 Message-ID: <87vauvhwdu.fsf@alice.fifthhorseman.net> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 750 Lines: 16 On Wed 2016-12-07 19:30:34 -0500, Hannes Frederic Sowa wrote: > Your custom protocol should be designed in a way you get an aligned ip > header. Most protocols of the IETF follow this mantra and it is always > possible to e.g. pad options so you end up on aligned boundaries for the > next header. fwiw, i'm not convinced that "most protocols of the IETF follow this mantra". we've had multiple discussions in different protocol groups about shaving or bloating by a few bytes here or there in different protocols, and i don't think anyone has brought up memory alignment as an argument in any of the discussions i've followed. that said, it sure does sound like it would make things simpler to construct the protocol that way :) --dkg