1.\" 2.\" This file and its contents are supplied under the terms of the 3.\" Common Development and Distribution License ("CDDL"), version 1.0. 4.\" You may only use this file in accordance with the terms of version 5.\" 1.0 of the CDDL. 6.\" 7.\" A full copy of the text of the CDDL should have accompanied this 8.\" source. A copy of the CDDL is also available via the Internet at 9.\" http://www.illumos.org/license/CDDL. 10.\" 11.\" 12.\" Copyright 2016 Joyent, Inc. 13.\" 14.Dd June 02, 2016 15.Dt MAC_RX 9F 16.Os 17.Sh NAME 18.Nm mac_rx 19.Nd deliver frames from a driver to the system 20.Sh SYNOPSIS 21.In sys/mac_provider.h 22.Ft void 23.Fo mac_rx 24.Fa "mac_handle_t mh" 25.Fa "mac_resource_handle_t mrh" 26.Fa "mblk_t *mp_chain" 27.Fc 28.Sh INTERFACE LEVEL 29illumos DDI specific 30.Sh PARAMETERS 31.Bl -tag -width Fa 32.It Fa mh 33The MAC handle obtained from a call to 34.Xr mac_register 9F . 35.It Fa mrh 36A reserved parameter that should be passed as 37.Dv NULL . 38.It Fa mp_chain 39A series of one or more 40.Xr mblk 9S 41structures chained together by their 42.Sy b_next 43member. 44.El 45.Sh DESCRIPTION 46The 47.Fn mac_rx 48function is used by device drivers to deliver frames that a device 49driver has received to the rest of the operating system. This will 50generally be called at the end of a device driver's interrupt handler 51after it is has converted all of the incoming data into a chain of 52.Xr mblk 9S 53structures. For a full description of the process that the device driver 54should take as part of receiving data, see the 55.Sx Receiving Data 56section of 57.Xr mac 9E . 58.Pp 59Device drivers should ensure that they are not holding any of their own 60locks when they call the 61.Fn mac_rx 62function. 63.Pp 64Device drivers should not call the 65.Fn mac_rx 66function after each individual mblk_t is assembled. Rather, the device 67driver should batch up as many frames as it is willing to process in a 68given interrupt or otherwise. 69.Sh CONTEXT 70The 71.Fn mac_rx 72function can be called from 73.Sy user , 74.Sy kernel , 75or 76.Sy interrupt 77context. 78.Sh SEE ALSO 79.Xr mac 9E , 80.Xr mac_register 9F , 81.Xr mblk 9S 82