Date: Fri, 21 Feb 2020 04:18:15 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358194 - head/sys/netgraph Message-ID: <202002210418.01L4IFMs056536@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Feb 21 04:18:15 2020 New Revision: 358194 URL: https://svnweb.freebsd.org/changeset/base/358194 Log: Rework second part of r357558. Unroll the macro and allocate memory in sleepable manner before entering the epoch for the send. Modified: head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/ng_socket.c ============================================================================== --- head/sys/netgraph/ng_socket.c Fri Feb 21 04:10:41 2020 (r358193) +++ head/sys/netgraph/ng_socket.c Fri Feb 21 04:18:15 2020 (r358194) @@ -410,6 +410,7 @@ ngd_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr_ng *const sap = (struct sockaddr_ng *) addr; int len, error; hook_p hook = NULL; + item_p item; char hookname[NG_HOOKSIZ]; if ((pcbp == NULL) || (control != NULL)) { @@ -462,8 +463,10 @@ ngd_send(struct socket *so, int flags, struct mbuf *m, } /* Send data. */ + item = ng_package_data(m, NG_WAITOK); + m = NULL; NET_EPOCH_ENTER(et); - NG_SEND_DATA_FLAGS(error, hook, m, NG_WAITOK); + NG_FWD_ITEM_HOOK(error, item, hook); NET_EPOCH_EXIT(et); release:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002210418.01L4IFMs056536>