From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by dpdk.org (Postfix) with ESMTP id AAFC74CE4 for ; Tue, 25 Sep 2018 09:05:22 +0200 (CEST) Received: by mail-lj1-f171.google.com with SMTP id r83-v6so2612323ljr.7 for ; Tue, 25 Sep 2018 00:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gtP5mRcSyeEthVynAK7KjKlotlJi+43kXiOBWPWXBaE=; b=DwErOcI5mZB8H8FwYce2VfvIQHcdNiokD0CPhzcCLJ71mvUNLtHSBm4gl7tjPwjgNZ dMY43YMoDFsGLJ8wnMXpmP+M+UaFcR+C3zke7ia0UU3d+gowIcvbr2DpUskSi9c04HjC anGO2tQyU9aCZ5hFQR2zELqsb1eJap4dMPq7PSS97QFtVcpO6+gBvFPxnV/706oeV/ls XBcYHc/ucnxNRZj/AX/M54A6GPQF/5rr0k44//XsOTe39WykRwRHiZm2CZjK6U/FScxZ wTSuU6ROCQooYwmhH7mYrVc4OBic44HDLe25QMRFGX703AcJ2mZ6i7p5Uf2wI24m8u+R y7TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gtP5mRcSyeEthVynAK7KjKlotlJi+43kXiOBWPWXBaE=; b=WTM9pnuD0sl7hMdM4rzePaoqsX5RQUJyudusH2+2Fa/2hEZbypEVKDkSkkhtqVKE5/ /Iqwk9UVEath6TCQgYQDS9nW+WiGIw7zhlD7wLQSycsKHhJ4UDyHdc16uDDgkc4iPoz8 hM5GRgHE9HZHLnWku88nXC2i9EpvLeF4gU/iB2HPI0N0wGZbCThEyCmLNubU0c28PYrI yJvU0eRjGugahcnIokQBRtxFmzTL1uwiR45cgBdVXX7ga5kjvLMSJtZI7+hsODZRTmD+ HLrJ8qd/XxFG85Psqn9ynbFKzJosTZZCPOaUjvs7osevJuen9RSXWYeEA3aA6wrHWvde Lz5w== X-Gm-Message-State: ABuFfojlT1PAiJSwkMB8EMA34ja8ji/SWr5GmfgUImQ8T3pOHre5MrXS /uqjDsrmhX0+epcXYMf/CQ+/Q59VgcVrYA== X-Google-Smtp-Source: ACcGV63GF+IGkqLEm3FrJmKSWoBn4brVeyLm8Ingn3IsVkW7se6l8ggOXhp9ngcnQ400rWRhQfaePw== X-Received: by 2002:a2e:91d3:: with SMTP id u19-v6mr1403581ljg.64.1537859122062; Tue, 25 Sep 2018 00:05:22 -0700 (PDT) Received: from amok.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.googlemail.com with ESMTPSA id 24-v6sm238306ljb.76.2018.09.25.00.05.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Sep 2018 00:05:21 -0700 (PDT) From: Andrzej Ostruszka To: dev@dpdk.org Cc: mw@semihalf.com, nadavh@marvell.com, Tomasz Duszynski , Natalie Samsonov , Yuval Caduri Date: Tue, 25 Sep 2018 09:05:05 +0200 Message-Id: <1537859109-25659-10-git-send-email-amo@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537859109-25659-1-git-send-email-amo@semihalf.com> References: <1536068953-9352-1-git-send-email-tdu@semihalf.com> <1537859109-25659-1-git-send-email-amo@semihalf.com> Subject: [dpdk-dev] [PATCH v3 09/13] net/mvpp2: align with MUSDK 18.09 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 07:05:23 -0000 From: Tomasz Duszynski This patch introduces necessary changes required by MUSDK 18.09 library. * As of MUSDK 18.09, pp2_cookie_t is no longer available. Now RX descriptor cookie is defined as plain u64 so existing cast is no longer valid. * MUSDK 18.09 increased number of available bpools (buffer hw pools) by introducing dma regions support. Update mvpp2 driver accordingly. * replace MV_NET_IP4_F_TOS with MV_NET_IP4_F_DSCP Before this patch, API allowed to configure a classification rule according to IPv4 TOS, which was not supported in classifier. This patch fixes this by using proper field. * use 48 bit address mask We cannot get pointers exceeding 48 bits thus using 48 bit mask for extracting higher IOVA address bits is enough. Signed-off-by: Natalie Samsonov Signed-off-by: Yuval Caduri Signed-off-by: Tomasz Duszynski Reviewed-by: Shlomi Gridish Reviewed-by: Alan Winkowski Reviewed-by: Liron Himi --- drivers/net/mvpp2/mrvl_ethdev.c | 10 ++++------ drivers/net/mvpp2/mrvl_flow.c | 3 ++- drivers/net/mvpp2/mrvl_qos.c | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 24bd0a5..26497ef 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -54,9 +54,7 @@ #define MRVL_ARP_LENGTH 28 #define MRVL_COOKIE_ADDR_INVALID ~0ULL - -#define MRVL_COOKIE_HIGH_ADDR_SHIFT (sizeof(pp2_cookie_t) * 8) -#define MRVL_COOKIE_HIGH_ADDR_MASK (~0ULL << MRVL_COOKIE_HIGH_ADDR_SHIFT) +#define MRVL_COOKIE_HIGH_ADDR_MASK 0xffffff0000000000 /** Port Rx offload capabilities */ #define MRVL_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_FILTER | \ @@ -1534,7 +1532,7 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num) entries[i].buff.addr = rte_mbuf_data_iova_default(mbufs[i]); - entries[i].buff.cookie = (pp2_cookie_t)(uint64_t)mbufs[i]; + entries[i].buff.cookie = (uint64_t)mbufs[i]; entries[i].bpool = bpool; } @@ -2170,7 +2168,7 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) if (unlikely(status != PP2_DESC_ERR_OK)) { struct pp2_buff_inf binf = { .addr = rte_mbuf_data_iova_default(mbuf), - .cookie = (pp2_cookie_t)(uint64_t)mbuf, + .cookie = (uint64_t)mbuf, }; pp2_bpool_put_buff(hif, bpool, &binf); @@ -2431,7 +2429,7 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) rte_mbuf_prefetch_part2(pref_pkt_hdr); } - sq->ent[sq->head].buff.cookie = (pp2_cookie_t)(uint64_t)mbuf; + sq->ent[sq->head].buff.cookie = (uint64_t)mbuf; sq->ent[sq->head].buff.addr = rte_mbuf_data_iova_default(mbuf); sq->ent[sq->head].bpool = diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c index 065b1aa..ffd1dab 100644 --- a/drivers/net/mvpp2/mrvl_flow.c +++ b/drivers/net/mvpp2/mrvl_flow.c @@ -2437,7 +2437,8 @@ mrvl_create_cls_table(struct rte_eth_dev *dev, struct rte_flow *first_flow) if (first_flow->pattern & F_IP4_TOS) { key->proto_field[key->num_fields].proto = MV_NET_PROTO_IP4; - key->proto_field[key->num_fields].field.ipv4 = MV_NET_IP4_F_TOS; + key->proto_field[key->num_fields].field.ipv4 = + MV_NET_IP4_F_DSCP; key->key_size += 1; key->num_fields += 1; } diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c index 5d80c3e..7fd9703 100644 --- a/drivers/net/mvpp2/mrvl_qos.c +++ b/drivers/net/mvpp2/mrvl_qos.c @@ -654,7 +654,7 @@ setup_tc(struct pp2_ppio_tc_params *param, uint8_t inqs, struct pp2_ppio_inq_params *inq_params; param->pkt_offset = MRVL_PKT_OFFS; - param->pools[0] = bpool; + param->pools[0][0] = bpool; param->default_color = color; inq_params = rte_zmalloc_socket("inq_params", -- 2.7.4