From owner-svn-src-all@freebsd.org Fri Aug 19 08:48:54 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB653BBE733; Fri, 19 Aug 2016 08:48:54 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-ua0-x232.google.com (mail-ua0-x232.google.com [IPv6:2607:f8b0:400c:c08::232]) (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 77A0C1871; Fri, 19 Aug 2016 08:48:54 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-ua0-x232.google.com with SMTP id 74so69335284uau.0; Fri, 19 Aug 2016 01:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XgJJBoLT8Eilx3lX4NSIJ2hCmPe08Eoi3Gcb4LrUeMo=; b=QwqFQ/4cIdyq6h9C14Jrt0QB3knr+g/2Yrx9RTx2KF3TRUkHWpfh2ZQ6hFvOgmxO3t Z+AuULDmilgYvVrFVkpp1iG4fQfwnzbhlEM/Tw+nuU6aS/eLGfe+OvTDqUMZufp9V6HT 7DeLLWWedJ5JLdPn5Sp0vIsAqkipJnBDYK4xqesfWvAtf02zDgIjOfpEsqmce8DDuJUV E5TcCDfdTjGyye/v5P7AhfJ1Wfed7080UqyZITcvwHe4rx0t5NFl+ynx7eHMkEL48t20 htHcHHUn9G42zmhqaPiSGBqjAKn3AP8z5hNh20Dsn51Rp8GkYGExRIcyYP8k00ZxRP3q XtRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XgJJBoLT8Eilx3lX4NSIJ2hCmPe08Eoi3Gcb4LrUeMo=; b=gV02Kkog5HeoRkK0RjKBJN2vD0pfRrUYnHFJRJMueVSvcXZQ/QVUoccLR0lSCTPIUB 6oyliP7ZMCm4PvpdgHKA6TDPyNunPSccy00gtE4j/GMolrqiXsgvLE1axn8Lbm1p06eC hFShfkoRZhw9dthyOZcDP4kNi1kPzOatc/BbrGJfl3VEOSlJxGe+Wlp+bGLd2Py0+QLU Hb7fjQxZv7iasZzch0ctg8DgHtGPtjHjfae0RS0K5eYqMjA9kSxBDXdNSmBYOoBhTymX LedUG8LIYjiKQO1cMCST3GbcqU4kHLbntI3Gjusdmt29aeGkg9qxophYmHqnuQWVxfox eopw== X-Gm-Message-State: AEkoouu3iHkwN/z00M3I0u7stXnlLdnKvO49TcxWn/7VSFHB7BDF0pmG6qO26HvOJOkKwjYhEKzTJN2WtqRR5g== X-Received: by 10.176.0.115 with SMTP id 106mr3554940uai.43.1471596533535; Fri, 19 Aug 2016 01:48:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.54 with HTTP; Fri, 19 Aug 2016 01:48:53 -0700 (PDT) In-Reply-To: <464a63e6-e96c-a2d5-099d-ae9059fa0877@selasky.org> References: <201608190050.u7J0oWkW043171@repo.freebsd.org> <464a63e6-e96c-a2d5-099d-ae9059fa0877@selasky.org> From: Sepherosa Ziehau Date: Fri, 19 Aug 2016 16:48:53 +0800 Message-ID: Subject: Re: svn commit: r304439 - head/sys/dev/usb/net To: Hans Petter Selasky Cc: Pyun YongHyeon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2016 08:48:54 -0000 On Fri, Aug 19, 2016 at 4:50 PM, Hans Petter Selasky wrote: > On 08/19/16 02:50, Pyun YongHyeon wrote: >> >> Modified: head/sys/dev/usb/net/if_axgereg.h >> >> ============================================================================== >> --- head/sys/dev/usb/net/if_axgereg.h Fri Aug 19 00:03:41 2016 >> (r304438) >> +++ head/sys/dev/usb/net/if_axgereg.h Fri Aug 19 00:50:32 2016 >> (r304439) >> @@ -156,19 +156,20 @@ enum { >> struct axge_frame_txhdr { >> #if BYTE_ORDER == LITTLE_ENDIAN >> uint32_t len; >> -#define AXGE_TXLEN_MASK 0x0001FFFF >> -#define AXGE_VLAN_INSERT 0x20000000 >> -#define AXGE_CSUM_DISABLE 0x80000000 >> uint32_t mss; >> -#define AXGE_MSS_MASK 0x00003FFF >> -#define AXGE_PADDING 0x80008000 >> -#define AXGE_VLAN_TAG_MASK 0xFFFF0000 >> #else >> uint32_t mss; >> uint32_t len; >> #endif >> } __packed; >> > > Hi, > > Is it correct to switch the order of mss and len variables for bit/little > endian? Looks buggy to me. It probably is a 64bits field. IMHO, using a 64bits field and mask/shift-op probably will be better here. Thanks, sephe -- Tomorrow Will Never Die