get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/38948/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 38948,
    "url": "http://patches.dpdk.org/api/patches/38948/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180425155646.3627-3-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20180425155646.3627-3-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180425155646.3627-3-stephen@networkplumber.org",
    "date": "2018-04-25T15:56:38",
    "name": "[dpdk-dev,next,02/10] net/af_packet: convert to dynamic log level",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f40911504ca8f097554261c0b3d9580ec90071a9",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180425155646.3627-3-stephen@networkplumber.org/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/38948/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/38948/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CBB9F8E73;\n\tWed, 25 Apr 2018 17:56:59 +0200 (CEST)",
            "from mail-pg0-f67.google.com (mail-pg0-f67.google.com\n\t[74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 42C8B8D8D\n\tfor <dev@dpdk.org>; Wed, 25 Apr 2018 17:56:53 +0200 (CEST)",
            "by mail-pg0-f67.google.com with SMTP id 82so3793244pge.11\n\tfor <dev@dpdk.org>; Wed, 25 Apr 2018 08:56:53 -0700 (PDT)",
            "from xeon-e3.lan (204-195-71-95.wavecable.com. [204.195.71.95])\n\tby smtp.gmail.com with ESMTPSA id\n\ty3sm25713924pgc.81.2018.04.25.08.56.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 25 Apr 2018 08:56:51 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=9ySCgz20vw6amHurYuwQDA03KowF4KJ1IE5P/AEtdA8=;\n\tb=dUxYAGiytCtzh3iWjJPoXPEEJ7vIpdrgcbbj4VzKTXbDIAnVSs4JFJom/iY7HL5CDu\n\tjRJpD/4coPactr0Ezi60FgsWo8D2vvVfJC7zFkGHTT015i8khkbbcgEXoJFl/PypZAW/\n\tgHzmUS8f5UgFlBMPno4bCRGQhAmIFRL5tPC9hYrg+5A87q2vtWAD1B77YZBprYDtFl1m\n\tz+CYQ2bkAa1nc/KK2UZJG/ujYkiz2FUbpVHreAciQsyQFcpXKZ3/nQfcQF3kLmlayzXp\n\tNAU/AbEyKzKtcSVz2LBJgcq6VvTvd3i+clyxrtIq4nSbVRC5oZZXRLCZrhU+EWkubxew\n\tTE8A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=9ySCgz20vw6amHurYuwQDA03KowF4KJ1IE5P/AEtdA8=;\n\tb=edxF75/CrafFt4P+SZ13rrKHWaYFVyh1RslYtSfCk/ZITOZTGSaREx65llzFI/fkVj\n\tZi4l10zNKCa2ZDU8SUC5WvMmR0//wXFjhYPPlbpmLozc5NzNWX1jAsgMDcHoRWN+s4xV\n\tMhgZ2Q7YB/Z0Q+7w2b08//A0l9RkWV2304WffAGXQ7QoYja8iGkJNWRvg5D0rjvJ5eNU\n\tnGvhIKp/FjEG0S77ErrHcbLfhij7QW6yjzIPxX3a8vovNcmMHYaBy2pNIU9TgyD/WvgU\n\tFwiF6DmKDuuBbJDsNKxhaltEzlEOfLxCtOqrlRpjRrUqciJFWMxB7Zb427yGEEfkEPHD\n\t0F5g==",
        "X-Gm-Message-State": "ALQs6tC+UnM2a/oM0SIVNab8uzp0FDx0A2bB0TRWqCUgKeHEIgJ7IJMz\n\tUQptZToNbCZuycGwfRuMKy4L3zER5nY=",
        "X-Google-Smtp-Source": "AB8JxZoJP41NYm+rtc+ze2IG8BHA3WF9wqB5xfTIpz/bluqDCKCTHsJPuQHAI/5FH81o3h4Yt7UAdw==",
        "X-Received": "by 10.98.215.81 with SMTP id v17mr6974832pfl.39.1524671811796;\n\tWed, 25 Apr 2018 08:56:51 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Wed, 25 Apr 2018 08:56:38 -0700",
        "Message-Id": "<20180425155646.3627-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.17.0",
        "In-Reply-To": "<20180425155646.3627-1-stephen@networkplumber.org>",
        "References": "<20180425155646.3627-1-stephen@networkplumber.org>",
        "Subject": "[dpdk-dev] [PATCH next 02/10] net/af_packet: convert to dynamic log\n\tlevel",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Convert this driver to use dynamic log level support.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/net/af_packet/rte_eth_af_packet.c | 132 ++++++++++++----------\n 1 file changed, 73 insertions(+), 59 deletions(-)",
    "diff": "diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c\nindex b394d3cb2926..247a2af5a0ff 100644\n--- a/drivers/net/af_packet/rte_eth_af_packet.c\n+++ b/drivers/net/af_packet/rte_eth_af_packet.c\n@@ -97,6 +97,12 @@ static struct rte_eth_link pmd_link = {\n \t.link_autoneg = ETH_LINK_AUTONEG\n };\n \n+static int af_packet_logtype;\n+\n+#define PMD_LOG(level, fmt, args...) \\\n+\trte_log(RTE_LOG_ ## level, af_packet_logtype, \\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n static uint16_t\n eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n {\n@@ -393,8 +399,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,\n \tdata_size -= TPACKET2_HDRLEN - sizeof(struct sockaddr_ll);\n \n \tif (data_size > buf_size) {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"%s: %d bytes will not fit in mbuf (%d bytes)\\n\",\n+\t\tPMD_LOG(ERR,\n+\t\t\t\"%s: %d bytes will not fit in mbuf (%d bytes)\",\n \t\t\tdev->device->name, data_size, buf_size);\n \t\treturn -ENOMEM;\n \t}\n@@ -515,7 +521,7 @@ open_packet_iface(const char *key __rte_unused,\n \t/* Open an AF_PACKET socket... */\n \t*sockfd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));\n \tif (*sockfd == -1) {\n-\t\tRTE_LOG(ERR, PMD, \"Could not open AF_PACKET socket\\n\");\n+\t\tPMD_LOG(ERR, \"Could not open AF_PACKET socket\");\n \t\treturn -1;\n \t}\n \n@@ -561,14 +567,14 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\t\tbreak;\n \t}\n \tif (pair == NULL) {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"%s: no interface specified for AF_PACKET ethdev\\n\",\n+\t\tPMD_LOG(ERR,\n+\t\t\t\"%s: no interface specified for AF_PACKET ethdev\",\n \t\t        name);\n \t\treturn -1;\n \t}\n \n-\tRTE_LOG(INFO, PMD,\n-\t\t\"%s: creating AF_PACKET-backed ethdev on numa socket %u\\n\",\n+\tPMD_LOG(INFO,\n+\t\t\"%s: creating AF_PACKET-backed ethdev on numa socket %u\",\n \t\tname, numa_node);\n \n \t*internals = rte_zmalloc_socket(name, sizeof(**internals),\n@@ -593,14 +599,14 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\tmemcpy(ifr.ifr_name, pair->value, ifnamelen);\n \t\tifr.ifr_name[ifnamelen] = '\\0';\n \t} else {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"%s: I/F name too long (%s)\\n\",\n+\t\tPMD_LOG(ERR,\n+\t\t\t\"%s: I/F name too long (%s)\",\n \t\t\tname, pair->value);\n \t\treturn -1;\n \t}\n \tif (ioctl(sockfd, SIOCGIFINDEX, &ifr) == -1) {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"%s: ioctl failed (SIOCGIFINDEX)\\n\",\n+\t\tPMD_LOG(ERR,\n+\t\t\t\"%s: ioctl failed (SIOCGIFINDEX)\",\n \t\t        name);\n \t\treturn -1;\n \t}\n@@ -610,8 +616,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t(*internals)->if_index = ifr.ifr_ifindex;\n \n \tif (ioctl(sockfd, SIOCGIFHWADDR, &ifr) == -1) {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"%s: ioctl failed (SIOCGIFHWADDR)\\n\",\n+\t\tPMD_LOG(ERR,\n+\t\t\t\"%s: ioctl failed (SIOCGIFHWADDR)\",\n \t\t        name);\n \t\treturn -1;\n \t}\n@@ -634,8 +640,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\t/* Open an AF_PACKET socket for this queue... */\n \t\tqsockfd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));\n \t\tif (qsockfd == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t        \"%s: could not open AF_PACKET socket\\n\",\n+\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\"%s: could not open AF_PACKET socket\",\n \t\t\t        name);\n \t\t\treturn -1;\n \t\t}\n@@ -644,9 +650,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\trc = setsockopt(qsockfd, SOL_PACKET, PACKET_VERSION,\n \t\t\t\t&tpver, sizeof(tpver));\n \t\tif (rc == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\"%s: could not set PACKET_VERSION on AF_PACKET \"\n-\t\t\t\t\"socket for %s\\n\", name, pair->value);\n+\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\"%s: could not set PACKET_VERSION on AF_PACKET socket for %s\",\n+\t\t\t\tname, pair->value);\n \t\t\tgoto error;\n \t\t}\n \n@@ -654,9 +660,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\trc = setsockopt(qsockfd, SOL_PACKET, PACKET_LOSS,\n \t\t\t\t&discard, sizeof(discard));\n \t\tif (rc == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\"%s: could not set PACKET_LOSS on \"\n-\t\t\t        \"AF_PACKET socket for %s\\n\", name, pair->value);\n+\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\"%s: could not set PACKET_LOSS on AF_PACKET socket for %s\",\n+\t\t\t\tname, pair->value);\n \t\t\tgoto error;\n \t\t}\n \n@@ -664,10 +670,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\trc = setsockopt(qsockfd, SOL_PACKET, PACKET_QDISC_BYPASS,\n \t\t\t\t&qdisc_bypass, sizeof(qdisc_bypass));\n \t\tif (rc == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\"%s: could not set PACKET_QDISC_BYPASS \"\n-\t\t\t        \"on AF_PACKET socket for %s\\n\", name,\n-\t\t\t        pair->value);\n+\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\"%s: could not set PACKET_QDISC_BYPASS on AF_PACKET socket for %s\",\n+\t\t\t\tname, pair->value);\n \t\t\tgoto error;\n \t\t}\n #else\n@@ -676,17 +681,17 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \n \t\trc = setsockopt(qsockfd, SOL_PACKET, PACKET_RX_RING, req, sizeof(*req));\n \t\tif (rc == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\"%s: could not set PACKET_RX_RING on AF_PACKET \"\n-\t\t\t\t\"socket for %s\\n\", name, pair->value);\n+\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\"%s: could not set PACKET_RX_RING on AF_PACKET socket for %s\",\n+\t\t\t\tname, pair->value);\n \t\t\tgoto error;\n \t\t}\n \n \t\trc = setsockopt(qsockfd, SOL_PACKET, PACKET_TX_RING, req, sizeof(*req));\n \t\tif (rc == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n+\t\t\tPMD_LOG(ERR,\n \t\t\t\t\"%s: could not set PACKET_TX_RING on AF_PACKET \"\n-\t\t\t\t\"socket for %s\\n\", name, pair->value);\n+\t\t\t\t\"socket for %s\", name, pair->value);\n \t\t\tgoto error;\n \t\t}\n \n@@ -697,8 +702,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\t\t\t    PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED,\n \t\t\t\t    qsockfd, 0);\n \t\tif (rx_queue->map == MAP_FAILED) {\n-\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\"%s: call to mmap failed on AF_PACKET socket for %s\\n\",\n+\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\"%s: call to mmap failed on AF_PACKET socket for %s\",\n \t\t\t\tname, pair->value);\n \t\t\tgoto error;\n \t\t}\n@@ -734,8 +739,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \n \t\trc = bind(qsockfd, (const struct sockaddr*)&sockaddr, sizeof(sockaddr));\n \t\tif (rc == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\"%s: could not bind AF_PACKET socket to %s\\n\",\n+\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\"%s: could not bind AF_PACKET socket to %s\",\n \t\t\t        name, pair->value);\n \t\t\tgoto error;\n \t\t}\n@@ -744,9 +749,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,\n \t\trc = setsockopt(qsockfd, SOL_PACKET, PACKET_FANOUT,\n \t\t\t\t&fanout_arg, sizeof(fanout_arg));\n \t\tif (rc == -1) {\n-\t\t\tRTE_LOG(ERR, PMD,\n+\t\t\tPMD_LOG(ERR,\n \t\t\t\t\"%s: could not set PACKET_FANOUT on AF_PACKET socket \"\n-\t\t\t\t\"for %s\\n\", name, pair->value);\n+\t\t\t\t\"for %s\", name, pair->value);\n \t\t\tgoto error;\n \t\t}\n #endif\n@@ -826,8 +831,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,\n \t\t\tqpairs = atoi(pair->value);\n \t\t\tif (qpairs < 1 ||\n \t\t\t    qpairs > RTE_PMD_AF_PACKET_MAX_RINGS) {\n-\t\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\t\"%s: invalid qpairs value\\n\",\n+\t\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\t\"%s: invalid qpairs value\",\n \t\t\t\t        name);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -836,8 +841,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,\n \t\tif (strstr(pair->key, ETH_AF_PACKET_BLOCKSIZE_ARG) != NULL) {\n \t\t\tblocksize = atoi(pair->value);\n \t\t\tif (!blocksize) {\n-\t\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\t\"%s: invalid blocksize value\\n\",\n+\t\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\t\"%s: invalid blocksize value\",\n \t\t\t\t        name);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -846,8 +851,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,\n \t\tif (strstr(pair->key, ETH_AF_PACKET_FRAMESIZE_ARG) != NULL) {\n \t\t\tframesize = atoi(pair->value);\n \t\t\tif (!framesize) {\n-\t\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\t\"%s: invalid framesize value\\n\",\n+\t\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\t\"%s: invalid framesize value\",\n \t\t\t\t        name);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -856,8 +861,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,\n \t\tif (strstr(pair->key, ETH_AF_PACKET_FRAMECOUNT_ARG) != NULL) {\n \t\t\tframecount = atoi(pair->value);\n \t\t\tif (!framecount) {\n-\t\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\t\"%s: invalid framecount value\\n\",\n+\t\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\t\"%s: invalid framecount value\",\n \t\t\t\t        name);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -866,8 +871,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,\n \t\tif (strstr(pair->key, ETH_AF_PACKET_QDISC_BYPASS_ARG) != NULL) {\n \t\t\tqdisc_bypass = atoi(pair->value);\n \t\t\tif (qdisc_bypass > 1) {\n-\t\t\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\t\t\"%s: invalid bypass value\\n\",\n+\t\t\t\tPMD_LOG(ERR,\n+\t\t\t\t\t\"%s: invalid bypass value\",\n \t\t\t\t\tname);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -876,24 +881,24 @@ rte_eth_from_packet(struct rte_vdev_device *dev,\n \t}\n \n \tif (framesize > blocksize) {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"%s: AF_PACKET MMAP frame size exceeds block size!\\n\",\n+\t\tPMD_LOG(ERR,\n+\t\t\t\"%s: AF_PACKET MMAP frame size exceeds block size!\",\n \t\t        name);\n \t\treturn -1;\n \t}\n \n \tblockcount = framecount / (blocksize / framesize);\n \tif (!blockcount) {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"%s: invalid AF_PACKET MMAP parameters\\n\", name);\n+\t\tPMD_LOG(ERR,\n+\t\t\t\"%s: invalid AF_PACKET MMAP parameters\", name);\n \t\treturn -1;\n \t}\n \n-\tRTE_LOG(INFO, PMD, \"%s: AF_PACKET MMAP parameters:\\n\", name);\n-\tRTE_LOG(INFO, PMD, \"%s:\\tblock size %d\\n\", name, blocksize);\n-\tRTE_LOG(INFO, PMD, \"%s:\\tblock count %d\\n\", name, blockcount);\n-\tRTE_LOG(INFO, PMD, \"%s:\\tframe size %d\\n\", name, framesize);\n-\tRTE_LOG(INFO, PMD, \"%s:\\tframe count %d\\n\", name, framecount);\n+\tPMD_LOG(INFO, \"%s: AF_PACKET MMAP parameters:\", name);\n+\tPMD_LOG(INFO, \"%s:\\tblock size %d\", name, blocksize);\n+\tPMD_LOG(INFO, \"%s:\\tblock count %d\", name, blockcount);\n+\tPMD_LOG(INFO, \"%s:\\tframe size %d\", name, framesize);\n+\tPMD_LOG(INFO, \"%s:\\tframe count %d\", name, framecount);\n \n \tif (rte_pmd_init_internals(dev, *sockfd, qpairs,\n \t\t\t\t   blocksize, blockcount,\n@@ -918,13 +923,13 @@ rte_pmd_af_packet_probe(struct rte_vdev_device *dev)\n \tstruct rte_eth_dev *eth_dev;\n \tconst char *name = rte_vdev_device_name(dev);\n \n-\tRTE_LOG(INFO, PMD, \"Initializing pmd_af_packet for %s\\n\", name);\n+\tPMD_LOG(INFO, \"Initializing pmd_af_packet for %s\", name);\n \n \tif (rte_eal_process_type() == RTE_PROC_SECONDARY &&\n \t    strlen(rte_vdev_device_args(dev)) == 0) {\n \t\teth_dev = rte_eth_dev_attach_secondary(name);\n \t\tif (!eth_dev) {\n-\t\t\tRTE_LOG(ERR, PMD, \"Failed to probe %s\\n\", name);\n+\t\t\tPMD_LOG(ERR, \"Failed to probe %s\", name);\n \t\t\treturn -1;\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n@@ -968,8 +973,8 @@ rte_pmd_af_packet_remove(struct rte_vdev_device *dev)\n \tstruct pmd_internals *internals;\n \tunsigned q;\n \n-\tRTE_LOG(INFO, PMD, \"Closing AF_PACKET ethdev on numa socket %u\\n\",\n-\t\t\trte_socket_id());\n+\tPMD_LOG(INFO, \"Closing AF_PACKET ethdev on numa socket %u\",\n+\t\trte_socket_id());\n \n \tif (dev == NULL)\n \t\treturn -1;\n@@ -1007,3 +1012,12 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_packet,\n \t\"framesz=<int> \"\n \t\"framecnt=<int> \"\n \t\"qdisc_bypass=<0|1>\");\n+\n+RTE_INIT(af_packet_init_log);\n+static void\n+af_packet_init_log(void)\n+{\n+\taf_packet_logtype = rte_log_register(\"pmd.net.packet\");\n+\tif (af_packet_logtype >= 0)\n+\t\trte_log_set_level(af_packet_logtype, RTE_LOG_NOTICE);\n+}\n",
    "prefixes": [
        "dpdk-dev",
        "next",
        "02/10"
    ]
}