Hi Bill,

I opened ‘https://bugs.linaro.org/show_bug.cgi?id=3289’ for this issue.

I think there is another issue related to this topic in case PKTIO was 
configure in schedule mode.
The ‘start’ function assumes ‘num_in_queue’ is bigger than ‘0’ but in the 
classifier_enable case it is ‘0’ so pktio is register with no real indexes, 
actually in ‘index’ array there is garbage. (see code below)

If I want to have a local fix, what do you think should be the number of 
queues? ‘max_input_queues’ in capabilities ?

Regards,
Liron


int odp_pktio_start(odp_pktio_t hdl)
{
…
                mode = entry->s.param.in_mode;

                if (mode == ODP_PKTIN_MODE_SCHED) {
                                unsigned i;
                                unsigned num = entry->s.num_in_queue;
                                int index[num];

                                for (i = 0; i < num; i++) {
                                                index[i] = i;

                                                if (entry->s.in_queue[i].queue 
== ODP_QUEUE_INVALID) {
                                                                ODP_ERR("No 
input queue\n");
                                                                return -1;
                                                }
                                }

                                sched_fn->pktio_start(pktio_to_id(hdl), num, 
index);
                }

                return res;
}
From: Bill Fischofer [mailto:bill.fischo...@linaro.org]
Sent: Monday, October 02, 2017 14:52
To: Liron Himi <lir...@marvell.com>
Cc: lng-odp@lists.linaro.org
Subject: [EXT] Re: [lng-odp] odp_pktin_queue_param_t - classifier_enable & 
num_queues

External Email
________________________________
Thanks Liron. This appears to be a bug in the implementation. It's only an 
error for num_queues to be zero if hash_enabled is set.

On Mon, Oct 2, 2017 at 6:02 AM, Liron Himi 
<lir...@marvell.com<mailto:lir...@marvell.com>> wrote:
Hi,

According to the API if 'classifier_enable' is enabled than 'num_queues' and 
'queue_param' should be ignored.
But looking at linux-generic implementation those parameters are always being 
checked regardless of 'classifier_enable' value.
'classifier_enable' is actually ignore at linux-generic implementation.
The main problem is if 'num_queues' is '0' than 'odp_pktin_queue_config' return 
an error although it can be '0' if 'classifier_enable' is enabled.

Regards,
Liron

Reply via email to