On 09/27, Loftus, Ciara wrote:
>[snip]
>
>> >+
>> >+static void
>> >+configure_irqs(struct pmd_internals *internals, uint16_t rx_queue_id)
>> >+{
>> >+   int coreid = internals->queue_irqs[rx_queue_id];
>> >+   char driver[NAME_MAX];
>> >+   uint16_t netdev_qid = rx_queue_id + internals->start_queue_idx;
>> >+   regex_t r;
>> >+   int interrupt;
>> >+
>> >+   if (coreid < 0)
>> >+           return;
>> >+
>> >+   if (coreid > (get_nprocs() - 1)) {
>> >+           AF_XDP_LOG(ERR, "Affinitisation failed - invalid coreid %i\n",
>> >+                                   coreid);
>> >+           return;
>> >+   }
>> 
>> I think we can combine above 2 sanity checks together.
>> 
>
>Hi Xiaolong,
>
>Thanks for your review. I agree with all of your feedback except this one.
>
>configure_irqs() is called for every queue. The queues with no affinity have a 
>coreid initialized to -1. So coreid < 0 is a valid value and we should return 
>with no error. However for the case where coreid > nprocs, this is an actual 
>error and we should report that with a log.
>What do you think?

It makes sense, thanks for the explanation.

Thanks,
Xiaolong
>
>Thanks,
>Ciara
>
>[snip]
>
>> >@@ -697,6 +996,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
>> >            goto err;
>> >    }
>> >
>> >+   configure_irqs(internals, rx_queue_id);
>> >+
>> >    rxq->fds[0].fd = xsk_socket__fd(rxq->xsk);
>> >    rxq->fds[0].events = POLLIN;
>> >
>> >@@ -834,6 +1135,39 @@ parse_name_arg(const char *key __rte_unused,
>> >    return 0;
>> > }
>> >
>

Reply via email to