[ovs-dev] [Q]what is 'may_steal' for in netdev API?

Joo Kim itsolution at gmail.com
Fri Dec 30 11:00:01 UTC 2016


Hello,

I got following gdb backtrace for ovs2.6.   And netdev_dpdk_send__()
definition is shown at bottom.
I try to understand what  'may_steal' is for but not clear yet.  Can
anybody explain what it is?

#0  netdev_dpdk_eth_send (netdev=0x7f235285ed40, qid=0,
batch=0x7f2541ff7130, may_steal=true, concurrent_txq=false)
      at lib/netdev-dpdk.c:1717
  #1  0x0000000000600392 in netdev_send (netdev=<optimized out>,
qid=qid at entry=0, batch=batch at entry=0x7f2541ff7130,
      may_steal=may_steal at entry=true,
concurrent_txq=concurrent_txq at entry=false)
at lib/netdev.c:718
  #2  0x00000000005e22e7 in dp_execute_cb (aux_=aux_ at entry=0x7f2541ff7090,
packets_=packets_ at entry=0x7f2541ff7130,
      a=a at entry=0x7f2541ff7248, may_steal=<optimized out>) at
lib/dpif-netdev.c:4433
  #3  0x000000000060745e in odp_execute_actions (dp=dp at entry=0x7f2541ff7090,
batch=batch at entry=0x7f2541ff7130,
      steal=steal at entry=true, actions=<optimized out>,
actions_len=<optimized out>,
      dp_execute_action=dp_execute_action at entry=0x5e20d0 <dp_execute_cb>)
at lib/odp-execute.c:538
  #4  0x000000000040d28b in dp_netdev_execute_actions (now=3504637714,
actions_len=<optimized out>,
      actions=<optimized out>, flow=0x7f2541ff7640, may_steal=true,
packets=0x7f2541ff7130, pmd=0x2e3fe10)
      at lib/dpif-netdev.c:4634
  #5  handle_packet_upcall (now=3504637714, lost_cnt=<synthetic pointer>,
put_actions=0x7f2541ff70f0,
      actions=0x7f2541ff70b0, key=0x7f2541ff8448, packet=0x7f235473a440,
pmd=0x2e3fe10) at lib/dpif-netdev.c:4071






(netdev-dpdk.c)

static inline void
netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
                   struct dp_packet_batch *batch, bool may_steal,
                   bool concurrent_txq)
{
    if (OVS_UNLIKELY(concurrent_txq)) {
        qid = qid % dev->up.n_txq;
        rte_spinlock_lock(&dev->tx_q[qid].tx_lock);
    }
    if (OVS_UNLIKELY(!may_steal ||
                     batch->packets[0]->source != DPBUF_DPDK)) {
        struct netdev *netdev = &dev->up;
        dpdk_do_tx_copy(netdev, qid, batch);
        dp_packet_delete_batch(batch, may_steal);
    } else {


More information about the dev mailing list