From owner-freebsd-mips@FreeBSD.ORG Mon Apr 20 06:27:31 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF8CE8A9 for ; Mon, 20 Apr 2015 06:27:31 +0000 (UTC) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AF2DD61 for ; Mon, 20 Apr 2015 06:27:31 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so60308376igb.0 for ; Sun, 19 Apr 2015 23:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=0hrRyArs2Al+jm9nIIwFfvEVhRvghB9iAfYQxjMHgVs=; b=lpoxui/Pn248Ju9qRH+4bqHSfsOi+pUGmokp72o1SIkauqdcVk+QRTdXa1OUfkf4Hz dleN0RG2GOfjCn9PM7HuBwgy7XneBJavElbudd5nPu0lRC6F3afgHDDL3PrSe6aolOVN DjJ/bsFRAlRvWnZBK9NkxAaozF0Yb7uYZnLdMJ+VOOQw0Mos0fMCeI4iU7xRsU/Ziy7G fBYViC6QfgtghGlyih/UefFnWhccQbAB9yLIlavVbHOONKhq33zJqla7b0T5gR1tg0oD XQ/YQiOfVcQgy7wrtva45vWSFHo3PfVUg5rBAlVhFrmXXIz7NGdxal+jjwkWE5IAuLY9 YsiQ== MIME-Version: 1.0 X-Received: by 10.42.20.197 with SMTP id h5mr16805354icb.22.1429511250790; Sun, 19 Apr 2015 23:27:30 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 19 Apr 2015 23:27:30 -0700 (PDT) In-Reply-To: References: Date: Sun, 19 Apr 2015 23:27:30 -0700 X-Google-Sender-Auth: xY7QQ4AKL6VK8GtzQ95bXrdlWl8 Message-ID: Subject: Re: Address error trap in ng_netflow on MIPS From: Adrian Chadd To: Nathan Ward Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 06:27:31 -0000 Hi! The problem is that the frame is unaligned and MIPS doesn't do unaligned accesses for you. So yes, you either replace them with a memcpy of the header into aligned memory first, or you modify everything to use macros/inlines that treat the data as a char array (1 byte aligned) and do char accesses to get to it. -adrian