OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Dec 02, 2021 6:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Extra bytes in my packets!!
PostPosted: Tue May 11, 2021 10:27 am 
Offline
Member
Member

Joined: Sun Feb 04, 2018 8:04 pm
Posts: 35
Anyone been through the pain of developing a network driver on Bochs?


I have extra bytes in my received packets, from ... I don't know where!

Attachment:
ne2k-buffer-comparison.png
ne2k-buffer-comparison.png [ 59.7 KiB | Viewed 997 times ]


If you look at the green "wut?" label you can see four extra bytes at the START of my ARP response. I know the sender isn't generating them - the number of bytes sent and buffer contents tally. It seems as though Bochs is adding them, or the ne2k module. There is nothing in the logs, except two entries that don't say much:

Code:
00519512000d[NE2K  ] eth_socket: got packet: 64 bytes, dst=b0:c5:aa:bb:cc:2, src=de:de:de:1:2:3
00519512000d[NE2K  ] rx_frame with length 64


This might be TMI, but my NIC configuration looks like this:

Code:
ne2k = {
  CR = {
    stop = false
    start = true
    tx_packet = false
    rdma_cmd = 4
    pgsel = 0
  }
  ISR = {
    pkt_rx = true
    pkt_tx = true
    rx_err = false
    tx_err = false
    overwrite = false
    cnt_oflow = false
    rdma_done = true
    reset = false
  }
  IMR = {
    rx_inte = false
    tx_inte = false
    rxerr_inte = false
    txerr_inte = false
    overw_inte = false
    cofl_inte = false
    rdma_inte = false
  }
  DCR = {
    wdsize = true
    endian = false
    longaddr = false
    loop = false
    auto_rx = false
    fifo_size = 0
  }
  TCR = {
    crc_disable = false
    loop_cntl = 0
    ext_stoptx = false
    coll_prio = false
  }
  TSR = {
    tx_ok = true
    collided = false
    aborted = false
    no_carrier = false
    fifo_ur = false
    cd_hbeat = false
    ow_coll = false
  }
  RCR = {
    errors_ok = false
    runts_ok = false
    broadcast = true
    multicast = false
    promisc = false
    monitor = false
  }
  RSR = {
    rx_ok = true
    bad_crc = false
    bad_falign = false
    fifo_or = false
    rx_missed = false
    rx_mbit = false
    rx_disabled = false
    deferred = false
  }
  local_dma = 0x0000
  page_start = 0x46
  page_stop = 0x80
  bound_ptr = 0x46
  tx_page_start = 0x40
  num_coll = 0x00
  tx_bytes = 0x0040
  fifo = 0x00
  remote_dma = 0x4040
  remote_start = 0x4000
  remote_bytes = 0x0000
  tallycnt_0 = 0x00
  tallycnt_1 = 0x00
  tallycnt_2 = 0x00
  physaddr = [
    0xb0, 0xc5, 0xaa, 0xbb, 0xcc, 0x02
  ]
  curr_page = 0x47
  mchash = [
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  ]
  rempkt_ptr = 0x00
  localpkt_ptr = 0x00
  address_cnt = 0x0000
  mem = ne2k.mem
  tx_timer_active = false
  pci_conf = [
[I deleted this for brevity]
  ]
}


After spending about 2 weeks on this, I am completely flummoxed. I can't find anything about a 4 byte header, preamble, etc.

If you have any ideas, even wacky ones, I am open to them.

Thanks!

_________________
Code or code not. There is no try.


Top
 Profile  
 
 Post subject: Re: Extra bytes in my packets!!
PostPosted: Tue May 11, 2021 11:25 am 
Offline
Member
Member

Joined: Sat Nov 21, 2009 5:11 pm
Posts: 759
It's on page 11 in the DP8390 datasheet.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group