9902 mac: mac_soft_ring_poll should use size_t

Review Request #1242 — Created Oct. 16, 2018 and submitted

tsoome
illumos-gate
9902
1243
6bd35a6...
general
gcc 8 build issue:

../../common/inet/ip/ip_squeue.c: In function 'ip_squeue_add_ring':
../../common/inet/ip/ip_squeue.c:511:19: error: cast between incompatible function types from 'mac_receive_t' {aka 'struct msgb * (*)(void *, int)'} to 'mblk_t * (*)(void *, size_t)' {aka 'struct msgb * (*)(void *, long unsigned int)'} [-Werror=cast-function-type]
  rx_ring->rr_rx = (ip_mac_rx_t)mrfp->mrf_receive;
                   ^


yuripv
  1. Ship It!
  2. 
      
citrus
  1. Ship It!
  2. 
      
danmcd
  1. I'd be very curious to see if the output of "dis -F mac_soft_ring_poll" changes AT ALL before and after your fix. Even if it does, it's not a showstopper. (But I'll bet a small beverage it doesn't.)

    1. It actually does differ because we have type change of argument and the compiler does take this account. This is already happening at prologue, the current version does:

          mac_soft_ring_poll+0xd:   41 89 f6           movl   %esi,%r14d
      

      and that should be our int.

  2. 
      
rzezeski
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...