Tom Chen wrote:
> Andrew,
>
> Thanks!
>
> Probably there is a bug in my GLDv3 driver and are not handling chained mblks
> correctly. I think FTP uses TCP protocol, doesn't it?
Yes, and no. TCP is used for the control connection, but the data
connection is handled via UDP. FTP is *weird*, and one of the more
annoying protocols for implementers to deal with. Use SCP or HTTP if
you want to test TCP.
-- Garrett
> When I use "FTP" from the Linux machine to get a big file from Solaris and I
> use Wireshark on Linux machine to check incoming packets, I didn't see any
> bad packet.
>
> Is there any problem in my TX code? I use similar routines that have been
> generally used by quite a lot of OpenSolaris drivers, like bge_m_tx( ),
> bge_send_copy( ); rge_m_tx() and rge_send_copy( ).
>
> static mblk_t * qla_m_tx(void *arg, mblk_t *mp)
> {
> ..........
> mp_head = mp;
>
> /*we must try to send all*/
> while(mp != NULL)
> {
> next = mp->b_next;
> mp->b_next=NULL;
> rval = qla_send_common(ha, mp,0);
>
> if(rval != DDI_SUCCESS)
> {
> mp->b_next=next;
> break;
> }
> mp = next;
> }
> exit:
> return mp;
> }
>
> static int qla_send_common(adapter_state_t *ha, mblk_t *mp,uint32_t vtag)
> {
> ................
> tx_cb = &ha->tx_buf[ha->req_producer_index] ;//get a available TX buffer
> bp = tx_cb->dma_mem_area.virt_addr;//pointer to the TX buffer
>
> /*Copy up to max_pkt of the tx data from mp to tx buffer*/
> for (tp = mp; tp != NULL; tp = tp->b_cont)
> {
> nbyte = tp->b_wptr - tp->b_rptr;
> if((off+nbyte)<max_pkt)
> {
> bcopy(tp->b_rptr, &bp[off], nbyte);
> off += nbyte;
> nMsg++;
> }
> }
> //Trigger hardware to send packet in TX buffer
> ........
> }
> I am very new to GLDv3 driver. I am especially not confident in the
> qla_send_common( ) function which copies only up to TX buffer size data from
> mp to TX buffer and send it. What if the incoming data is more than TX buffer
> size? like this one 0x112c (4396 bytes)packet which is bigger than mtu (1514
> bytes)? Why other OpenSolaris drivers do not care about this? Is this a
> concern only in drivers supporting LSO?
>
>
> Tom
>
>
> This message posted from opensolaris.org
> _______________________________________________
> networking-discuss mailing list
> [email protected]
>
_______________________________________________
networking-discuss mailing list
[email protected]