> > @@ -1795,11 +1795,24 @@ netdev_dpdk_vhost_rxq_recv(struct
> > netdev_rxq *rxq,
> >      batch->count = nb_rx;
> >      dp_packet_batch_init_packet_fields(batch);
> >
> > +    if (qfill) {
> > +        if (nb_rx == NETDEV_MAX_BURST) {
> > +            /* The DPDK API returns a uint32_t which often has invalid 
> > bits in
> > +             * the upper 16-bits. Need to restrict the value to uint16_t. 
> > */
> > +            *qfill += rte_vhost_rx_queue_count(netdev_dpdk_get_vid(dev),
> > +                                               qid * VIRTIO_QNUM + 
> > VIRTIO_TXQ)
> > +                                & UINT16_MAX;
> [[BO'M]] Why the += operator?

Oops: This a leftover from an intermediate version where I returned the total 
qlen including the received packets. Forgot this when I changed the semantics 
of the output parameter.

> > +        } else {
> > +            *qfill = 0;
> > +        }
> > +    }
> > +
> >      return 0;
> >  }
> >
> >  static int
> > -netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct dp_packet_batch
> > *batch)
> > +netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct dp_packet_batch
> > *batch,
> > +                     int *qfill)
> >  {
> >      struct netdev_rxq_dpdk *rx = netdev_rxq_dpdk_cast(rxq);
> >      struct netdev_dpdk *dev = netdev_dpdk_cast(rxq->netdev); @@ -1836,6
> > +1849,14 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct
> > dp_packet_batch *batch)
> >      batch->count = nb_rx;
> >      dp_packet_batch_init_packet_fields(batch);
> >
> > +    if (qfill) {
> > +        if (nb_rx == NETDEV_MAX_BURST) {
> > +            *qfill += rte_eth_rx_queue_count(rx->port_id, rxq->queue_id);
> [[BO'M]] Why the += operator?

Same as above.

BR, Jan

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to