On Thu, 2011-06-23 at 20:03 -0700, raghu wrote:
> Hello,
>
> 1) Is it true that even after specifying mac_link_update(adapter->mach,
> LINK_STATE_UNKNOWN), ethernet driver xmit routine can still get packets from
> stack. Application I am using is netperf.
Yes. mac_link_state is orthogonal to anything else.
> 2) Will it not create any problem for OS like creating backpressure in its
> Queues because I keep getting mbufs even after indicating LINK_STATE_UNKOWN
> and I return those mbufs from xmit. All these packets may end up in OS
> Queues.
You have two choices here.
1) freemsg() the packet (for ethernet this is a reasonable choice)
2) return the message back to the upstream (where it will cause
backpressure to build until you call mac_tx_update().)
> 3) Is there any thing more to stop getting packets apart from doing
> LINK_STATE_UNKNOWN/DOWN.
If you return a packet upstream from your tx routine, then generally the
stack will not continue to send you packets. This may not be
guaranteed, but the idea is that this causes backpressure to apply to
upper queues.
Generally, if you don't have link, I think freemsg() and bumping the
nocarrier statistic is the best choice.
- Garrett
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss