Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/30518/?format=api
http://patches.dpdk.org/api/patches/30518/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1508327708-15090-1-git-send-email-radu.nicolau@intel.com/", "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": "<1508327708-15090-1-git-send-email-radu.nicolau@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1508327708-15090-1-git-send-email-radu.nicolau@intel.com", "date": "2017-10-18T11:55:08", "name": "[dpdk-dev] ipsec_secgw: added cmdline option for jumbo frames and switched to the new offload API.", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b9408d6c73f7e939e133fb8728ce31e934f111fe", "submitter": { "id": 743, "url": "http://patches.dpdk.org/api/people/743/?format=api", "name": "Radu Nicolau", "email": "radu.nicolau@intel.com" }, "delegate": { "id": 22, "url": "http://patches.dpdk.org/api/users/22/?format=api", "username": "pdelarag", "first_name": "Pablo", "last_name": "de Lara Guarch", "email": "pablo.de.lara.guarch@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1508327708-15090-1-git-send-email-radu.nicolau@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/30518/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/30518/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 3313E2BC7;\n\tWed, 18 Oct 2017 13:59:53 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 292942BB0\n\tfor <dev@dpdk.org>; Wed, 18 Oct 2017 13:59:50 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Oct 2017 04:59:49 -0700", "from silpixa00383879.ir.intel.com (HELO\n\tsilpixa00383879.ger.corp.intel.com) ([10.237.223.127])\n\tby orsmga005.jf.intel.com with ESMTP; 18 Oct 2017 04:59:48 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.43,396,1503385200\"; d=\"scan'208\";a=\"161856761\"", "From": "Radu Nicolau <radu.nicolau@intel.com>", "To": "dev@dpdk.org", "Cc": "sergio.gonzalez.monroy@intel.com, Radu Nicolau <radu.nicolau@intel.com>", "Date": "Wed, 18 Oct 2017 12:55:08 +0100", "Message-Id": "<1508327708-15090-1-git-send-email-radu.nicolau@intel.com>", "X-Mailer": "git-send-email 2.7.5", "Subject": "[dpdk-dev] [PATCH] ipsec_secgw: added cmdline option for jumbo\n\tframes and switched to the new offload API.", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://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": "<http://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": "Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>\n---\n doc/guides/sample_app_ug/ipsec_secgw.rst | 6 +++++-\n examples/ipsec-secgw/ipsec-secgw.c | 32 +++++++++++++++++++++++++-------\n 2 files changed, 30 insertions(+), 8 deletions(-)", "diff": "diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst\nindex b675cba..dd9bad2 100644\n--- a/doc/guides/sample_app_ug/ipsec_secgw.rst\n+++ b/doc/guides/sample_app_ug/ipsec_secgw.rst\n@@ -119,7 +119,7 @@ The application has a number of command line options::\n \n \n ./build/ipsec-secgw [EAL options] --\n- -p PORTMASK -P -u PORTMASK\n+ -p PORTMASK -P -u PORTMASK -j FRAMESIZE\n --config (port,queue,lcore)[,(port,queue,lcore]\n --single-sa SAIDX\n -f CONFIG_FILE_PATH\n@@ -135,6 +135,10 @@ Where:\n \n * ``-u PORTMASK``: hexadecimal bitmask of unprotected ports\n \n+* ``-j FRAMESIZE``: *optional*. Enables jumbo frames with the maximum size\n+ specified as FRAMESIZE. If FRAMESIZE is missing or invalid a default value\n+ of 9000 is used.\n+\n * ``--config (port,queue,lcore)[,(port,queue,lcore)]``: determines which queues\n from which ports are mapped to which cores.\n \ndiff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c\nindex d451b3d..a7e4bd1 100644\n--- a/examples/ipsec-secgw/ipsec-secgw.c\n+++ b/examples/ipsec-secgw/ipsec-secgw.c\n@@ -161,6 +161,7 @@ static int32_t numa_on = 1; /**< NUMA is enabled by default. */\n static uint32_t nb_lcores;\n static uint32_t single_sa;\n static uint32_t single_sa_idx;\n+static uint32_t frame_size;\n \n struct lcore_rx_queue {\n \tuint16_t port_id;\n@@ -204,11 +205,9 @@ static struct rte_eth_conf port_conf = {\n \t\t.mq_mode\t= ETH_MQ_RX_RSS,\n \t\t.max_rx_pkt_len = ETHER_MAX_LEN,\n \t\t.split_hdr_size = 0,\n-\t\t.header_split = 0, /**< Header Split disabled */\n-\t\t.hw_ip_checksum = 1, /**< IP checksum offload enabled */\n-\t\t.hw_vlan_filter = 0, /**< VLAN filtering disabled */\n-\t\t.jumbo_frame = 0, /**< Jumbo Frame Support disabled */\n-\t\t.hw_strip_crc = 1, /**< CRC stripped by hardware */\n+\t\t.offloads = DEV_RX_OFFLOAD_CHECKSUM |\n+\t\t\t DEV_RX_OFFLOAD_CRC_STRIP,\n+\t\t.ignore_offload_bitfield = 1,\n \t},\n \t.rx_adv_conf = {\n \t\t.rss_conf = {\n@@ -983,7 +982,7 @@ parse_args(int32_t argc, char **argv)\n \n \targvopt = argv;\n \n-\twhile ((opt = getopt_long(argc, argvopt, \"p:Pu:f:\",\n+\twhile ((opt = getopt_long(argc, argvopt, \"p:Pu:f:j:\",\n \t\t\t\tlgopts, &option_index)) != EOF) {\n \n \t\tswitch (opt) {\n@@ -1022,6 +1021,17 @@ parse_args(int32_t argc, char **argv)\n \t\t\t}\n \t\t\tf_present = 1;\n \t\t\tbreak;\n+\t\tcase 'j':\n+\t\t\t{\n+\t\t\tint32_t size = parse_decimal(optarg);\n+\t\t\t\tif (size <= 0) {\n+\t\t\t\t\tprintf(\"Invalid jumbo frame size\\n\");\n+\t\t\t\t\tframe_size = 9000;\n+\t\t\t\t} else {\n+\t\t\t\t\tframe_size = size;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tprintf(\"Enabled jumbo frames size %d\\n\", frame_size);\n \t\tcase 0:\n \t\t\tif (parse_args_long_options(lgopts, option_index)) {\n \t\t\t\tprint_usage(prgname);\n@@ -1359,6 +1369,11 @@ port_init(uint16_t portid)\n \tprintf(\"Creating queues: nb_rx_queue=%d nb_tx_queue=%u...\\n\",\n \t\t\tnb_rx_queue, nb_tx_queue);\n \n+\tif (frame_size) {\n+\t\tport_conf.rxmode.max_rx_pkt_len = frame_size;\n+\t\tport_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;\n+\t}\n+\n \tret = rte_eth_dev_configure(portid, nb_rx_queue, nb_tx_queue,\n \t\t\t&port_conf);\n \tif (ret < 0)\n@@ -1423,11 +1438,14 @@ static void\n pool_init(struct socket_ctx *ctx, int32_t socket_id, uint32_t nb_mbuf)\n {\n \tchar s[64];\n+\tuint32_t buff_size = frame_size ? (frame_size + RTE_PKTMBUF_HEADROOM) :\n+\t\t\tRTE_MBUF_DEFAULT_BUF_SIZE;\n+\n \n \tsnprintf(s, sizeof(s), \"mbuf_pool_%d\", socket_id);\n \tctx->mbuf_pool = rte_pktmbuf_pool_create(s, nb_mbuf,\n \t\t\tMEMPOOL_CACHE_SIZE, ipsec_metadata_size(),\n-\t\t\tRTE_MBUF_DEFAULT_BUF_SIZE,\n+\t\t\tbuff_size,\n \t\t\tsocket_id);\n \tif (ctx->mbuf_pool == NULL)\n \t\trte_exit(EXIT_FAILURE, \"Cannot init mbuf pool on socket %d\\n\",\n", "prefixes": [ "dpdk-dev" ] }{ "id": 30518, "url": "