4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #pragma ident "%Z%%M% %I% %E% SMI"
28 #include <sys/types.h>
30 #include <sys/softmac_impl.h>
32 typedef struct softmac_capab_ops
{
33 int (*sc_hcksum_ack
)(void *, t_uscalar_t
);
34 int (*sc_zcopy_ack
)(void *, t_uscalar_t
);
35 int (*sc_mdt_ack
)(void *, dl_capab_mdt_t
*);
36 } softmac_capab_ops_t
;
38 static int dl_capab(ldi_handle_t
, mblk_t
**);
39 static int softmac_fill_hcksum_ack(void *, t_uscalar_t
);
40 static int softmac_fill_zcopy_ack(void *, t_uscalar_t
);
41 static int softmac_fill_mdt_ack(void *, dl_capab_mdt_t
*);
42 static int softmac_adv_hcksum_ack(void *, t_uscalar_t
);
43 static int softmac_adv_zcopy_ack(void *, t_uscalar_t
);
44 static int softmac_adv_mdt_ack(void *, dl_capab_mdt_t
*);
45 static int softmac_enable_hcksum_ack(void *, t_uscalar_t
);
46 static int softmac_enable_mdt_ack(void *, dl_capab_mdt_t
*);
47 static int softmac_capab_send(softmac_lower_t
*, boolean_t
);
48 static int i_capab_ack(mblk_t
*, queue_t
*, softmac_capab_ops_t
*, void *);
49 static int i_capab_id_ack(mblk_t
*, dl_capability_sub_t
*, queue_t
*,
50 softmac_capab_ops_t
*, void *);
51 static int i_capab_sub_ack(mblk_t
*, dl_capability_sub_t
*, queue_t
*,
52 softmac_capab_ops_t
*, void *);
53 static int i_capab_hcksum_ack(dl_capab_hcksum_t
*, queue_t
*,
54 softmac_capab_ops_t
*, void *);
55 static int i_capab_zcopy_ack(dl_capab_zerocopy_t
*, queue_t
*,
56 softmac_capab_ops_t
*, void *);
57 static int i_capab_mdt_ack(dl_capab_mdt_t
*, queue_t
*,
58 softmac_capab_ops_t
*, void *);
59 static int i_capab_hcksum_verify(dl_capab_hcksum_t
*, queue_t
*);
60 static int i_capab_zcopy_verify(dl_capab_zerocopy_t
*, queue_t
*);
61 static int i_capab_mdt_verify(dl_capab_mdt_t
*, queue_t
*);
63 static softmac_capab_ops_t softmac_fill_capab_ops
=
65 softmac_fill_hcksum_ack
,
66 softmac_fill_zcopy_ack
,
70 static softmac_capab_ops_t softmac_adv_capab_ops
=
72 softmac_adv_hcksum_ack
,
73 softmac_adv_zcopy_ack
,
77 static softmac_capab_ops_t softmac_enable_capab_ops
=
79 softmac_enable_hcksum_ack
,
81 softmac_enable_mdt_ack
85 softmac_fill_capab(ldi_handle_t lh
, softmac_t
*softmac
)
88 union DL_primitives
*prim
;
91 if ((err
= dl_capab(lh
, &mp
)) != 0)
94 prim
= (union DL_primitives
*)mp
->b_rptr
;
95 if (prim
->dl_primitive
== DL_ERROR_ACK
) {
100 err
= i_capab_ack(mp
, NULL
, &softmac_fill_capab_ops
, softmac
);
108 dl_capab(ldi_handle_t lh
, mblk_t
**mpp
)
110 dl_capability_req_t
*capb
;
111 union DL_primitives
*dl_prim
;
115 if ((mp
= allocb(sizeof (dl_capability_req_t
), BPRI_MED
)) == NULL
)
117 mp
->b_datap
->db_type
= M_PROTO
;
119 capb
= (dl_capability_req_t
*)mp
->b_wptr
;
120 mp
->b_wptr
+= sizeof (dl_capability_req_t
);
121 bzero(mp
->b_rptr
, sizeof (dl_capability_req_t
));
122 capb
->dl_primitive
= DL_CAPABILITY_REQ
;
124 (void) ldi_putmsg(lh
, mp
);
125 if ((err
= ldi_getmsg(lh
, &mp
, (timestruc_t
*)NULL
)) != 0)
128 dl_prim
= (union DL_primitives
*)mp
->b_rptr
;
129 switch (dl_prim
->dl_primitive
) {
130 case DL_CAPABILITY_ACK
:
131 if (MBLKL(mp
) < DL_CAPABILITY_ACK_SIZE
) {
132 printf("dl_capability: DL_CAPABILITY_ACK "
140 if (MBLKL(mp
) < DL_ERROR_ACK_SIZE
) {
141 printf("dl_capability: DL_ERROR_ACK protocol err\n");
144 if (((dl_error_ack_t
*)dl_prim
)->dl_error_primitive
!=
146 printf("dl_capability: DL_ERROR_ACK rtnd prim %u\n",
147 ((dl_error_ack_t
*)dl_prim
)->dl_error_primitive
);
155 printf("dl_capability: bad ACK header %u\n",
156 dl_prim
->dl_primitive
);
165 softmac_fill_hcksum_ack(void *arg
, t_uscalar_t flags
)
167 softmac_t
*softmac
= (softmac_t
*)arg
;
170 * There are two types of acks we process here:
171 * 1. acks in reply to a (first form) generic capability req
172 * (no ENABLE flag set)
173 * 2. acks in reply to a ENABLE capability req.
175 * Only the first type should be expected here.
178 if (flags
& HCKSUM_ENABLE
) {
179 cmn_err(CE_WARN
, "softmac_fill_hcksum_ack: unexpected "
180 "HCKSUM_ENABLE flag in hardware checksum capability");
181 } else if (flags
& (HCKSUM_INET_PARTIAL
| HCKSUM_INET_FULL_V4
|
182 HCKSUM_INET_FULL_V6
| HCKSUM_IPHDRCKSUM
)) {
183 softmac
->smac_capab_flags
|= MAC_CAPAB_HCKSUM
;
184 softmac
->smac_hcksum_txflags
= flags
;
190 softmac_fill_zcopy_ack(void *arg
, t_uscalar_t flags
)
192 softmac_t
*softmac
= (softmac_t
*)arg
;
194 ASSERT(flags
== DL_CAPAB_VMSAFE_MEM
);
195 softmac
->smac_capab_flags
&= (~MAC_CAPAB_NO_ZCOPY
);
200 softmac_fill_mdt_ack(void *arg
, dl_capab_mdt_t
*mdt
)
202 softmac_t
*softmac
= (softmac_t
*)arg
;
205 * There are two types of acks we process here:
206 * 1. acks in reply to a (first form) generic capability req
207 * (ENABLE flag might be set by some drivers)
208 * 2. acks in reply to a ENABLE capability req.
212 ASSERT(mdt
->mdt_version
== MDT_VERSION_2
);
213 softmac
->smac_mdt
= B_TRUE
;
214 softmac
->smac_mdt_capab
.mdt_hdr_head
= mdt
->mdt_hdr_head
;
215 softmac
->smac_mdt_capab
.mdt_hdr_tail
= mdt
->mdt_hdr_tail
;
216 softmac
->smac_mdt_capab
.mdt_max_pld
= mdt
->mdt_max_pld
;
217 softmac
->smac_mdt_capab
.mdt_span_limit
= mdt
->mdt_span_limit
;
222 softmac_capab_enable(softmac_lower_t
*slp
)
224 softmac_t
*softmac
= slp
->sl_softmac
;
227 if (softmac
->smac_no_capability_req
)
231 * Send DL_CAPABILITY_REQ to get capability advertisement.
233 if ((err
= softmac_capab_send(slp
, B_FALSE
)) != 0)
237 * Send DL_CAPABILITY_REQ to enable specific capabilities.
239 if ((err
= softmac_capab_send(slp
, B_TRUE
)) != 0)
246 softmac_capab_send(softmac_lower_t
*slp
, boolean_t enable
)
249 dl_capability_req_t
*capb
;
250 dl_capability_sub_t
*subcapb
;
251 mblk_t
*reqmp
, *ackmp
;
255 softmac
= slp
->sl_softmac
;
258 /* No need to enable DL_CAPAB_ZEROCOPY */
259 if (softmac
->smac_capab_flags
& MAC_CAPAB_HCKSUM
)
260 size
+= sizeof (dl_capability_sub_t
) +
261 sizeof (dl_capab_hcksum_t
);
263 if (softmac
->smac_mdt
) {
264 if (!(softmac
->smac_mdt_capab
.mdt_flags
&
265 DL_CAPAB_MDT_ENABLE
)) {
267 * The MDT capability was not enabled for the
268 * first time, enable it now.
270 size
+= sizeof (dl_capability_sub_t
) +
271 sizeof (dl_capab_mdt_t
);
280 * Create DL_CAPABILITY_REQ message and send it down
282 reqmp
= allocb(sizeof (dl_capability_req_t
) + size
, BPRI_MED
);
286 bzero(reqmp
->b_rptr
, sizeof (dl_capability_req_t
) + size
);
288 DB_TYPE(reqmp
) = M_PROTO
;
289 reqmp
->b_wptr
= reqmp
->b_rptr
+ sizeof (dl_capability_req_t
) + size
;
291 capb
= (dl_capability_req_t
*)reqmp
->b_rptr
;
292 capb
->dl_primitive
= DL_CAPABILITY_REQ
;
297 capb
->dl_sub_offset
= sizeof (dl_capability_req_t
);
299 if (softmac
->smac_capab_flags
& MAC_CAPAB_HCKSUM
) {
300 dl_capab_hcksum_t
*hck_subcapp
;
302 size
= sizeof (dl_capability_sub_t
) +
303 sizeof (dl_capab_hcksum_t
);
304 capb
->dl_sub_length
+= size
;
306 subcapb
= (dl_capability_sub_t
*)(capb
+ 1);
307 subcapb
->dl_cap
= DL_CAPAB_HCKSUM
;
308 subcapb
->dl_length
= sizeof (dl_capab_hcksum_t
);
309 hck_subcapp
= (dl_capab_hcksum_t
*)(subcapb
+ 1);
310 hck_subcapp
->hcksum_version
= HCKSUM_VERSION_1
;
311 hck_subcapp
->hcksum_txflags
=
312 softmac
->smac_hcksum_txflags
| HCKSUM_ENABLE
;
315 if (softmac
->smac_mdt
) {
316 if (!(softmac
->smac_mdt_capab
.mdt_flags
&
317 DL_CAPAB_MDT_ENABLE
)) {
318 dl_capab_mdt_t
*mdt_subcapp
;
320 size
= sizeof (dl_capability_sub_t
) +
321 sizeof (dl_capab_mdt_t
);
322 capb
->dl_sub_length
+= size
;
324 subcapb
= (dl_capability_sub_t
*)
325 ((uint8_t *)(subcapb
+ 1) + subcapb
->dl_length
);
327 subcapb
->dl_cap
= DL_CAPAB_MDT
;
328 subcapb
->dl_length
= sizeof (dl_capab_mdt_t
);
329 mdt_subcapp
= (dl_capab_mdt_t
*)(subcapb
+ 1);
330 mdt_subcapp
->mdt_version
= MDT_VERSION_2
;
331 mdt_subcapp
->mdt_flags
=
332 (softmac
->smac_mdt_capab
.mdt_flags
|
333 DL_CAPAB_MDT_ENABLE
);
334 mdt_subcapp
->mdt_hdr_head
=
335 softmac
->smac_mdt_capab
.mdt_hdr_head
;
336 mdt_subcapp
->mdt_hdr_tail
=
337 softmac
->smac_mdt_capab
.mdt_hdr_tail
;
338 mdt_subcapp
->mdt_max_pld
=
339 softmac
->smac_mdt_capab
.mdt_max_pld
;
340 mdt_subcapp
->mdt_span_limit
=
341 softmac
->smac_mdt_capab
.mdt_span_limit
;
346 err
= softmac_proto_tx(slp
, reqmp
, &ackmp
);
349 err
= i_capab_ack(ackmp
, NULL
,
350 &softmac_enable_capab_ops
, softmac
);
352 err
= i_capab_ack(ackmp
, NULL
,
353 &softmac_adv_capab_ops
, softmac
);
362 softmac_adv_hcksum_ack(void *arg
, t_uscalar_t flags
)
364 softmac_t
*softmac
= (softmac_t
*)arg
;
367 * There are two types of acks we process here:
368 * 1. acks in reply to a (first form) generic capability req
369 * (no ENABLE flag set)
370 * 2. acks in reply to a ENABLE capability req.
372 * Only the first type should be expected here.
375 if (flags
& HCKSUM_ENABLE
) {
376 cmn_err(CE_WARN
, "softmac_adv_hcksum_ack: unexpected "
377 "HCKSUM_ENABLE flag in hardware checksum capability");
379 } else if (flags
& (HCKSUM_INET_PARTIAL
| HCKSUM_INET_FULL_V4
|
380 HCKSUM_INET_FULL_V6
| HCKSUM_IPHDRCKSUM
)) {
382 * The acknowledgement should be the same as we got when
383 * the softmac is created.
385 if (!(softmac
->smac_capab_flags
& MAC_CAPAB_HCKSUM
)) {
389 if (softmac
->smac_hcksum_txflags
!= flags
) {
399 softmac_adv_zcopy_ack(void *arg
, t_uscalar_t flags
)
401 softmac_t
*softmac
= (softmac_t
*)arg
;
404 * The acknowledgement should be the same as we got when
405 * the softmac is created.
407 ASSERT(flags
== DL_CAPAB_VMSAFE_MEM
);
408 if (softmac
->smac_capab_flags
& MAC_CAPAB_NO_ZCOPY
) {
417 softmac_adv_mdt_ack(void *arg
, dl_capab_mdt_t
*mdt
)
419 softmac_t
*softmac
= (softmac_t
*)arg
;
422 * The acknowledgement should be the same as we got when
423 * the softmac is created.
425 if (!softmac
->smac_mdt
) {
430 if ((softmac
->smac_mdt_capab
.mdt_hdr_head
!= mdt
->mdt_hdr_head
) ||
431 (softmac
->smac_mdt_capab
.mdt_hdr_tail
!= mdt
->mdt_hdr_tail
) ||
432 (softmac
->smac_mdt_capab
.mdt_max_pld
!= mdt
->mdt_max_pld
) ||
433 (softmac
->smac_mdt_capab
.mdt_span_limit
!= mdt
->mdt_span_limit
)) {
438 * We need the mdt_flags field to know whether an additional
439 * DL_CAPAB_MDT_ENABLE is necessary.
441 softmac
->smac_mdt_capab
.mdt_flags
= mdt
->mdt_flags
;
446 softmac_enable_hcksum_ack(void *arg
, t_uscalar_t flags
)
448 softmac_t
*softmac
= (softmac_t
*)arg
;
451 * There are two types of acks we process here:
452 * 1. acks in reply to a (first form) generic capability req
453 * (no ENABLE flag set)
454 * 2. acks in reply to a ENABLE capability req.
456 * Only the second type should be expected here.
459 if (flags
& HCKSUM_ENABLE
) {
460 if ((flags
& ~HCKSUM_ENABLE
) != softmac
->smac_hcksum_txflags
) {
461 cmn_err(CE_WARN
, "softmac_enable_hcksum_ack: unexpected"
462 " hardware capability flag value 0x%x", flags
);
466 cmn_err(CE_WARN
, "softmac_enable_hcksum_ack: "
467 "hardware checksum flag HCKSUM_ENABLE is not set");
475 softmac_enable_mdt_ack(void *arg
, dl_capab_mdt_t
*mdt
)
477 softmac_t
*softmac
= (softmac_t
*)arg
;
480 * There are two types of acks we process here:
481 * 1. acks in reply to a (first form) generic capability req
482 * (no ENABLE flag set)
483 * 2. acks in reply to a ENABLE capability req.
485 * Only the second type should be expected here.
488 if (mdt
->mdt_flags
& DL_CAPAB_MDT_ENABLE
) {
489 if ((softmac
->smac_mdt_capab
.mdt_hdr_head
!=
490 mdt
->mdt_hdr_head
) ||
491 (softmac
->smac_mdt_capab
.mdt_hdr_tail
!=
492 mdt
->mdt_hdr_tail
) ||
493 (softmac
->smac_mdt_capab
.mdt_max_pld
!=
495 (softmac
->smac_mdt_capab
.mdt_span_limit
!=
496 mdt
->mdt_span_limit
)) {
497 cmn_err(CE_WARN
, "softmac_enable_mdt_ack: "
498 "unexpected MDT capability value");
501 softmac
->smac_mdt_capab
.mdt_flags
= mdt
->mdt_flags
;
503 cmn_err(CE_WARN
, "softmac_enable_mdt_ack: "
504 "MDT flag DL_CAPAB_MDT_ENABLE is not set");
512 i_capab_ack(mblk_t
*mp
, queue_t
*q
, softmac_capab_ops_t
*op
, void *arg
)
514 union DL_primitives
*prim
;
515 dl_capability_ack_t
*cap
;
516 dl_capability_sub_t
*sub
, *end
;
519 prim
= (union DL_primitives
*)mp
->b_rptr
;
520 ASSERT(prim
->dl_primitive
== DL_CAPABILITY_ACK
);
522 cap
= (dl_capability_ack_t
*)prim
;
523 if (cap
->dl_sub_length
== 0)
526 /* Is dl_sub_length correct? */
527 if ((sizeof (*cap
) + cap
->dl_sub_length
) > MBLKL(mp
)) {
532 sub
= (dl_capability_sub_t
*)((caddr_t
)cap
+ cap
->dl_sub_offset
);
533 end
= (dl_capability_sub_t
*)((caddr_t
)cap
+ cap
->dl_sub_length
535 for (; (sub
<= end
) && (err
== 0); ) {
536 switch (sub
->dl_cap
) {
537 case DL_CAPAB_ID_WRAPPER
:
538 err
= i_capab_id_ack(mp
, sub
, q
, op
, arg
);
541 err
= i_capab_sub_ack(mp
, sub
, q
, op
, arg
);
544 sub
= (dl_capability_sub_t
*)((caddr_t
)sub
+ sizeof (*sub
)
553 i_capab_id_ack(mblk_t
*mp
, dl_capability_sub_t
*outers
,
554 queue_t
*q
, softmac_capab_ops_t
*op
, void *arg
)
556 dl_capab_id_t
*capab_id
;
557 dl_capability_sub_t
*inners
;
561 ASSERT(outers
->dl_cap
== DL_CAPAB_ID_WRAPPER
);
563 capend
= (caddr_t
)(outers
+ 1) + outers
->dl_length
;
564 if (capend
> (caddr_t
)mp
->b_wptr
) {
565 cmn_err(CE_WARN
, "i_capab_id_ack: malformed "
566 "sub-capability too long");
570 capab_id
= (dl_capab_id_t
*)(outers
+ 1);
572 if (outers
->dl_length
< sizeof (*capab_id
) ||
573 (inners
= &capab_id
->id_subcap
,
574 inners
->dl_length
> (outers
->dl_length
- sizeof (*inners
)))) {
575 cmn_err(CE_WARN
, "i_capab_id_ack: malformed "
576 "encapsulated capab type %d too long",
581 if ((q
!= NULL
) && (!dlcapabcheckqid(&capab_id
->id_mid
, q
))) {
582 cmn_err(CE_WARN
, "i_capab_id_ack: pass-thru module(s) "
583 "detected, discarding capab type %d", inners
->dl_cap
);
587 /* Process the encapsulated sub-capability */
588 return (i_capab_sub_ack(mp
, inners
, q
, op
, arg
));
592 i_capab_sub_ack(mblk_t
*mp
, dl_capability_sub_t
*sub
, queue_t
*q
,
593 softmac_capab_ops_t
*op
, void *arg
)
596 dl_capab_hcksum_t
*hcksum
;
597 dl_capab_zerocopy_t
*zcopy
;
601 capend
= (caddr_t
)(sub
+ 1) + sub
->dl_length
;
602 if (capend
> (caddr_t
)mp
->b_wptr
) {
603 cmn_err(CE_WARN
, "i_capab_sub_ack: "
604 "malformed sub-capability too long");
608 switch (sub
->dl_cap
) {
609 case DL_CAPAB_HCKSUM
:
610 hcksum
= (dl_capab_hcksum_t
*)(sub
+ 1);
611 err
= i_capab_hcksum_ack(hcksum
, q
, op
, arg
);
614 case DL_CAPAB_ZEROCOPY
:
615 zcopy
= (dl_capab_zerocopy_t
*)(sub
+ 1);
616 err
= i_capab_zcopy_ack(zcopy
, q
, op
, arg
);
620 mdt
= (dl_capab_mdt_t
*)(sub
+ 1);
621 err
= i_capab_mdt_ack(mdt
, q
, op
, arg
);
625 cmn_err(CE_WARN
, "i_capab_sub_ack: unknown capab type %d",
634 i_capab_hcksum_ack(dl_capab_hcksum_t
*hcksum
, queue_t
*q
,
635 softmac_capab_ops_t
*op
, void *arg
)
640 if ((err
= i_capab_hcksum_verify(hcksum
, q
)) != 0)
643 flags
= hcksum
->hcksum_txflags
;
645 if (!(flags
& (HCKSUM_INET_PARTIAL
| HCKSUM_INET_FULL_V4
|
646 HCKSUM_INET_FULL_V6
| HCKSUM_IPHDRCKSUM
| HCKSUM_ENABLE
))) {
647 cmn_err(CE_WARN
, "i_capab_hcksum_ack: invalid "
648 "hardware checksum capability flags 0x%x", flags
);
652 if (op
->sc_hcksum_ack
)
653 return (op
->sc_hcksum_ack(arg
, flags
));
655 cmn_err(CE_WARN
, "i_capab_hcksum_ack: unexpected hardware "
656 "checksum acknowledgement");
662 i_capab_zcopy_ack(dl_capab_zerocopy_t
*zcopy
, queue_t
*q
,
663 softmac_capab_ops_t
*op
, void *arg
)
668 if ((err
= i_capab_zcopy_verify(zcopy
, q
)) != 0)
671 flags
= zcopy
->zerocopy_flags
;
672 if (!(flags
& DL_CAPAB_VMSAFE_MEM
)) {
673 cmn_err(CE_WARN
, "i_capab_zcopy_ack: invalid zcopy capability "
674 "flags 0x%x", flags
);
677 if (op
->sc_zcopy_ack
)
678 return (op
->sc_zcopy_ack(arg
, flags
));
680 cmn_err(CE_WARN
, "i_capab_zcopy_ack: unexpected zcopy "
687 i_capab_mdt_ack(dl_capab_mdt_t
*mdt
, queue_t
*q
,
688 softmac_capab_ops_t
*op
, void *arg
)
692 if ((err
= i_capab_mdt_verify(mdt
, q
)) != 0)
696 return (op
->sc_mdt_ack(arg
, mdt
));
698 cmn_err(CE_WARN
, "i_capab_mdt_ack: unexpected MDT "
705 i_capab_hcksum_verify(dl_capab_hcksum_t
*hcksum
, queue_t
*q
)
707 if (hcksum
->hcksum_version
!= HCKSUM_VERSION_1
) {
708 cmn_err(CE_WARN
, "i_capab_hcksum_verify: "
709 "unsupported hardware checksum capability (version %d, "
710 "expected %d)", hcksum
->hcksum_version
, HCKSUM_VERSION_1
);
714 if ((q
!= NULL
) && !dlcapabcheckqid(&hcksum
->hcksum_mid
, q
)) {
715 cmn_err(CE_WARN
, "i_capab_hcksum_verify: unexpected pass-thru "
716 "module detected; hardware checksum capability discarded");
723 i_capab_zcopy_verify(dl_capab_zerocopy_t
*zcopy
, queue_t
*q
)
725 if (zcopy
->zerocopy_version
!= ZEROCOPY_VERSION_1
) {
726 cmn_err(CE_WARN
, "i_capab_zcopy_verify: unsupported zcopy "
727 "capability (version %d, expected %d)",
728 zcopy
->zerocopy_version
, ZEROCOPY_VERSION_1
);
732 if ((q
!= NULL
) && !dlcapabcheckqid(&zcopy
->zerocopy_mid
, q
)) {
733 cmn_err(CE_WARN
, "i_capab_zcopy_verify: unexpected pass-thru "
734 "module detected; zcopy checksum capability discarded");
741 i_capab_mdt_verify(dl_capab_mdt_t
*mdt
, queue_t
*q
)
743 if (mdt
->mdt_version
!= MDT_VERSION_2
) {
744 cmn_err(CE_WARN
, "i_capab_mdt_verify: unsupported MDT "
745 "capability (version %d, expected %d)",
746 mdt
->mdt_version
, MDT_VERSION_2
);
750 if ((q
!= NULL
) && !dlcapabcheckqid(&mdt
->mdt_mid
, q
)) {
751 cmn_err(CE_WARN
, "i_capab_mdt_verify: unexpected pass-thru "
752 "module detected; MDT capability discarded");