Module Name:    src
Committed By:   msaitoh
Date:           Tue Jul 23 09:37:09 UTC 2019

Modified Files:
        src/sys/dev/pci: if_wmreg.h

Log Message:
 Define RETA_ENTRY_MASK_Q(used in RSS redirection table) correctly.
Found by UBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pci/if_wmreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_wmreg.h
diff -u src/sys/dev/pci/if_wmreg.h:1.114 src/sys/dev/pci/if_wmreg.h:1.115
--- src/sys/dev/pci/if_wmreg.h:1.114	Fri Jun  7 04:39:15 2019
+++ src/sys/dev/pci/if_wmreg.h	Tue Jul 23 09:37:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmreg.h,v 1.114 2019/06/07 04:39:15 msaitoh Exp $	*/
+/*	$NetBSD: if_wmreg.h,v 1.115 2019/07/23 09:37:08 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -1270,7 +1270,7 @@ struct livengood_tcpip_ctxdesc {
 
 #define WMREG_RETA_Q(x)		(0x5c00 + ((x) >> 2) * 4) /* Redirection Table */
 #define RETA_NUM_ENTRIES	128
-#define RETA_ENTRY_MASK_Q(x)	(0x000000ff << (((x) % 4) * 8)) /* Redirection Table */
+#define RETA_ENTRY_MASK_Q(x)	(0x000000ffUL << (((x) % 4) * 8)) /* Redirection Table */
 #define RETA_ENT_QINDEX_MASK		__BITS(3,0) /*queue index for 82580 and newer */
 #define RETA_ENT_QINDEX0_MASK_82575	__BITS(3,2) /*queue index for pool0 */
 #define RETA_ENT_QINDEX1_MASK_82575	__BITS(7,6) /*queue index for pool1 and regular RSS */

Reply via email to