Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add 3rd argument to pktq_create to pass sc
details: https://anonhg.NetBSD.org/src/rev/67f8642f95cf
branches: trunk
changeset: 329970:67f8642f95cf
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Jun 16 00:33:39 2014 +0000
description:
Add 3rd argument to pktq_create to pass sc
It will be used to pass bridge sc for bridge_forward softint.
ok rmind@
diffstat:
sys/net/pktqueue.c | 8 ++++----
sys/net/pktqueue.h | 4 ++--
sys/netinet/ip_input.c | 6 +++---
sys/netinet6/ip6_input.c | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)
diffs (108 lines):
diff -r 05c689d2942d -r 67f8642f95cf sys/net/pktqueue.c
--- a/sys/net/pktqueue.c Sun Jun 15 23:07:36 2014 +0000
+++ b/sys/net/pktqueue.c Mon Jun 16 00:33:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pktqueue.c,v 1.4 2014/06/09 14:44:48 rmind Exp $ */
+/* $NetBSD: pktqueue.c,v 1.5 2014/06/16 00:33:39 ozaki-r Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.4 2014/06/09 14:44:48 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.5 2014/06/16 00:33:39 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -96,7 +96,7 @@
roundup2(offsetof(pktqueue_t, pq_queue[ncpu]), coherency_unit)
pktqueue_t *
-pktq_create(size_t maxlen, void (*intrh)(void *))
+pktq_create(size_t maxlen, void (*intrh)(void *), void *sc)
{
const u_int sflags = SOFTINT_NET | SOFTINT_MPSAFE | SOFTINT_RCPU;
const size_t len = PKTQUEUE_STRUCT_LEN(ncpu);
@@ -107,7 +107,7 @@
if ((pc = percpu_alloc(sizeof(pktq_counters_t))) == NULL) {
return NULL;
}
- if ((sih = softint_establish(sflags, intrh, NULL)) == NULL) {
+ if ((sih = softint_establish(sflags, intrh, sc)) == NULL) {
percpu_free(pc, sizeof(pktq_counters_t));
return NULL;
}
diff -r 05c689d2942d -r 67f8642f95cf sys/net/pktqueue.h
--- a/sys/net/pktqueue.h Sun Jun 15 23:07:36 2014 +0000
+++ b/sys/net/pktqueue.h Mon Jun 16 00:33:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pktqueue.h,v 1.2 2014/06/09 12:57:04 rmind Exp $ */
+/* $NetBSD: pktqueue.h,v 1.3 2014/06/16 00:33:39 ozaki-r Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
typedef enum { PKTQ_MAXLEN, PKTQ_NITEMS, PKTQ_DROPS } pktq_count_t;
-pktqueue_t * pktq_create(size_t, void (*)(void *));
+pktqueue_t * pktq_create(size_t, void (*)(void *), void *);
void pktq_destroy(pktqueue_t *);
bool pktq_enqueue(pktqueue_t *, struct mbuf *, const u_int);
diff -r 05c689d2942d -r 67f8642f95cf sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c Sun Jun 15 23:07:36 2014 +0000
+++ b/sys/netinet/ip_input.c Mon Jun 16 00:33:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_input.c,v 1.318 2014/06/05 23:48:16 rmind Exp $ */
+/* $NetBSD: ip_input.c,v 1.319 2014/06/16 00:33:39 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.318 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.319 2014/06/16 00:33:39 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_compat_netbsd.h"
@@ -304,7 +304,7 @@
pr = pffindproto(PF_INET, IPPROTO_RAW, SOCK_RAW);
KASSERT(pr != NULL);
- ip_pktq = pktq_create(IFQ_MAXLEN, ipintr);
+ ip_pktq = pktq_create(IFQ_MAXLEN, ipintr, NULL);
KASSERT(ip_pktq != NULL);
for (u_int i = 0; i < IPPROTO_MAX; i++) {
diff -r 05c689d2942d -r 67f8642f95cf sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c Sun Jun 15 23:07:36 2014 +0000
+++ b/sys/netinet6/ip6_input.c Mon Jun 16 00:33:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_input.c,v 1.148 2014/06/05 23:48:16 rmind Exp $ */
+/* $NetBSD: ip6_input.c,v 1.149 2014/06/16 00:33:39 ozaki-r Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.148 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.149 2014/06/16 00:33:39 ozaki-r Exp $");
#include "opt_gateway.h"
#include "opt_inet.h"
@@ -180,7 +180,7 @@
pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
ip6_protox[pr->pr_protocol] = pr - inet6sw;
- ip6_pktq = pktq_create(IFQ_MAXLEN, ip6intr);
+ ip6_pktq = pktq_create(IFQ_MAXLEN, ip6intr, NULL);
KASSERT(ip6_pktq != NULL);
scope6_init();
Home |
Main Index |
Thread Index |
Old Index