int odp_pktio_inq_remdef(odp_pktio_t id)
{
        return odp_pktio_inq_setdef(id, ODP_QUEUE_INVALID);
}

then:

int odp_pktio_inq_setdef(odp_pktio_t id, odp_queue_t queue)
{
        pktio_entry_t *pktio_entry = get_pktio_entry(id);
        queue_entry_t *qentry;

        if (pktio_entry == NULL || queue == ODP_QUEUE_INVALID) {
                return -1;
        }

You have check:
       res = odp_pktio_inq_remdef(pktio);
       CU_ASSERT(res == 0);

So that it looks like your case found bug. And if queue == ODP_QUEUE_INVALID then odp_pktio_inq_setdef should
pass down to the code and set pktio_entry->s.inq_default = queue; Agree?

Maxim.


On 12/17/2014 04:37 PM, Stuart Haslam wrote:
On Wed, Dec 17, 2014 at 01:27:35PM +0000, Maxim Uvarov wrote:
On 12/17/2014 04:18 PM, Stuart Haslam wrote:
On Wed, Dec 17, 2014 at 01:04:33PM +0000, Maxim Uvarov wrote:
1.

RAW sockets  are fail due to unable call SIOCGIFINDEX on my machine for
pktio-p0 :

           err = ioctl(sockfd, SIOCGIFINDEX, &ethreq);
           if (err != 0) {
                   perror("setup_pkt_sock() - ioctl(SIOCGIFINDEX)");
                   goto error;
           }
           if_idx = ethreq.ifr_ifindex;

I use 3.8.0-31-generic

Does it pass on your kernel?
Yes, are you running as root? How does it fail?
Hm, what is "nothere" ?

That's an interface name that doesn't exist. It's a negative test.

odp_packet_io.c:212:odp_pktio_open():ODP_PKTIO_USE_FANOUT: 1
ioctl index for nothere
setup_pkt_sock() - ioctl(SIOCGIFINDEX): No such device
Open fails, as expected.

odp_packet_io.c:246:odp_pktio_open():Unable to init any I/O type.
passed
Test passed.

    Test: pktio close ...passed
    Test: pktio inq
...odp_packet_io.c:212:odp_pktio_open():ODP_PKTIO_USE_FANOUT: 1
ioctl index for pktio-p0
odp_packet_io.c:238:odp_pktio_open():IO type: ODP_PKTIO_TYPE_SOCKET_BASIC
FAILED
This is the expected failure due to odp_pktio_inq_remdef() as I
mentioned in the initial mail.

2.

Tests needs export ODP_PLATFORM=linux-generic.
This is done in test/validation/Makefile.am when you run "make check".
If you want to run the test/validaton/odp_pktio_run script directly and
have it setup the test interfaces then yes you need to export
ODP_PLATFORM=linux-generic

If we are going to use pktio-p0/pktio-p1 for look devices
for linux-generic then we need to pass that value from configure.
As above the platform name is passed to odp_pktio_run and that script
defines the interface names.
we need that working from make check.

I does work for me, see this in test/validation/Makefile.am -

AM_TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}

Please be specific, what doesn't work for you?



_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to