From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2C7A4A05D3 for ; Mon, 25 Mar 2019 16:59:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C9683576; Mon, 25 Mar 2019 16:59:11 +0100 (CET) Received: from mail-it1-f169.google.com (mail-it1-f169.google.com [209.85.166.169]) by dpdk.org (Postfix) with ESMTP id D09EC2BF4 for ; Mon, 25 Mar 2019 16:59:09 +0100 (CET) Received: by mail-it1-f169.google.com with SMTP id m137so14747844ita.0 for ; Mon, 25 Mar 2019 08:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=OL9Wm4pjT/umuu+cS8WjNxyagnvd1j5ffbW/FUF39H8=; b=covBxPtvmoATjCCj0Na3tFKmea2saqs0lhUIdtYpJRgn6RXW/BJcwmlt1plMS2Fqdj N4xY3Gdi8TSV/wyKNnpmf1C2c/r54nFAgg0CFJ83evA5un9DxzyfIYD75yhy/x4vIIRe j9VA8eLjR2d8qaBzYiHalxNkw4Cclj7I4wvRCu0i/R+noDuIZ7Kxr7D8WOjicfK0RmWU wZOTkYd71RmJcBrThra59/EfS7JTlyNy4lzObdQQydS+5IqaB33UjmgZL24ZjMXHCp95 OaSN7I4tZBRUTCjarBsElj6SGo8EY6lkKMkCb6DAhf7i7huifRzRg6rIMbc0yff2G5+L GkDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OL9Wm4pjT/umuu+cS8WjNxyagnvd1j5ffbW/FUF39H8=; b=ZvQCmWcbwBxox28pBUZ7hCDw/TA5Q9biEdVtQN19UBIN74F9DMSpgPdOZbGm2u/PPX WatW1JMkHiTikqRoQdp0ocUgZKm/iGZt+8ptst+fDFYWQAcdlYJpE6wVry8X/n3SvgZv Yzd52xjpstxj0Ox+kAi7QG2Y7GLGfCZ7+mm/hEYQLuf3TFGjIelFO20y+B7e6O18k/eE BzvPgMADGeFuAPjV0IHcnqzV9XpNPiXSo5v6c52PM4jrwEWqrxwMLXr1zi7FesldgXax /5A+3O8B3/lYmu72ZW9aGfXE4gcanYLSMDLibWfsaCLDQEFzdz/+QsiZQNhEZ4Ma4MKG oQqA== X-Gm-Message-State: APjAAAVyo3e07LnOyQXBTugYWRg4+00IU5CkkVT2nyi8xd6AFWVR6XJ8 z2uZZaW54SQAn0XqNd+uMHIOczxapkMvDuH5HL/++NpM X-Google-Smtp-Source: APXvYqy3QYyb//rLfuzZwQRCuqv/DBy7spEdegN2CqWMHx3s6N1vQ/BOIfVoSNwILNsMbMrqlmLlVTXYXAMzcw78eWM= X-Received: by 2002:a24:1749:: with SMTP id 70mr8393667ith.50.1553529549102; Mon, 25 Mar 2019 08:59:09 -0700 (PDT) MIME-Version: 1.0 From: ikuzar RABE Date: Mon, 25 Mar 2019 16:58:58 +0100 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] how to migrate from pthread to L-thread X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hello all, I work on Linux (Debian 8), DPDK v18.05.1 I work on legacy code which reads packets from NIC's ports using several readers (using libpcap and threads from pthread API). The aim is to remove libpcap and migrate to DPDK using L-thread ( https://doc.dpdk.org/guides-16.04/sample_app_ug/performance_thread.html) Is it possible to directly call L-thread functions (lthread_create, lthread_mutex_lock, etc.) instead of using pthread shim ? ( https://github.com/Juniper/contrail-dpdk/blob/master/examples/performance-thread/pthread_shim/pthread_shim.h ) What are the advantages/drawbacks of using pthread shim / lthread API? With pthread shim, I do not know where to call pthread_override_set(1) and pthread_override_set(0), that's why I 'd like to directly call L-thread functions. In the following example (see link below), it is simple because there is no interraction between threads running on different lcores. https://doc.dpdk.org/api/examples_2performance-thread_2pthread_shim_2main_8c-example.html Regards, ikuzar