From owner-freebsd-mips@FreeBSD.ORG Mon Apr 20 08:36:22 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 1A94D9F5 for ; Mon, 20 Apr 2015 08:36:22 +0000 (UTC) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) (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 E4A93CF1 for ; Mon, 20 Apr 2015 08:36:21 +0000 (UTC) Received: by paboj16 with SMTP id oj16so200131407pab.0 for ; Mon, 20 Apr 2015 01:36:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version:content-type :content-transfer-encoding:content-disposition; bh=qeMC40tz/xxttO7toX43tNs9S5boa8ouyZG68nroBE4=; b=EYE/jPYTb8d138aU+beD4DptZIdSluceG7CNmoH5RS6hbwlo1XybzTMmYOEG4begBP oU7VOTFaiGQYojbdvMeGpbqWJAOjg7HTIwginrz0UJwLxGSkHTq/p6CW0zc8pd+43Nd+ cHZW7ycVyF4g3sH3ahktZha5Tih4+nQpLxnWkq/IRlX9fZCAhpGmgv11tBDioeziCQye BflJv79CeXcAfYjdht9uCwFYk073adF9ib765kHy4h0J1UwbwS/PZPTwd2r08qoJlLMR q9YYb05Gn7hSt79eYvKDIoLlfFm2fOdKsPsfmmPx/j4ZzttFV9DnrfwCGToouKFpXDsy BSyg== X-Gm-Message-State: ALoCoQl9xB+hU6NeCIFGFrw2ywN4mlFMq9QZD4YbG82E8rF+qFmxz1wYnxjJcpQpU1IS/+kX3R/G X-Received: by 10.66.221.193 with SMTP id qg1mr25726409pac.134.1429518975073; Mon, 20 Apr 2015 01:36:15 -0700 (PDT) Received: from brooklyn.local ([203.86.202.251]) by mx.google.com with ESMTPSA id l8sm6221258pdj.80.2015.04.20.01.36.13 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Apr 2015 01:36:14 -0700 (PDT) Date: Mon, 20 Apr 2015 20:36:10 +1200 From: Nathan Ward To: Adrian Chadd Cc: "=?utf-8?Q?freebsd-mips=40freebsd.org?=" Message-ID: In-Reply-To: References: Subject: Re: Address error trap in ng_netflow on MIPS X-Mailer: Airmail (286) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 08:36:22 -0000 On 20 April 2015 at 18:27:31, Adrian Chadd (adrian=40freebsd.org(mailto:a= drian=40freebsd.org)) wrote: > Hi=21 Hey :-) > The problem is that the frame is unaligned and MIPS doesn't do > unaligned accesses for you. > =20 > 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. OK, I=E2=80=99ll look in to this, memory alignment isn=E2=80=99t somethin= g I know intuitively, so, reading time. Any insight in to why this only happens when trying to transmit a DHCP re= ply packet=3F This is quite odd to me, given other packets I=E2=80=99ve t= ried work fine, and a DHCP reply is unicast, so is nothing special. -- =20 Nathan Ward