Module Name: src Committed By: yamaguchi Date: Thu Mar 23 02:33:34 UTC 2023
Modified Files: src/sys/dev/pci: if_vioif.c Log Message: vioif(4): added __predct_false to error check To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/if_vioif.c 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_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.96 src/sys/dev/pci/if_vioif.c:1.97 --- src/sys/dev/pci/if_vioif.c:1.96 Thu Mar 23 02:30:14 2023 +++ src/sys/dev/pci/if_vioif.c Thu Mar 23 02:33:34 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.96 2023/03/23 02:30:14 yamaguchi Exp $ */ +/* $NetBSD: if_vioif.c,v 1.97 2023/03/23 02:33:34 yamaguchi Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.96 2023/03/23 02:30:14 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.97 2023/03/23 02:33:34 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1532,7 +1532,7 @@ vioif_populate_rx_mbufs_locked(struct vi r = virtio_enqueue_prep(vsc, vq, &slot); if (r == EAGAIN) break; - if (r != 0) + if (__predict_false(r != 0)) panic("enqueue_prep for rx buffers"); map = &rxq->rxq_maps[slot];