From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 454ACC47C for ; Tue, 30 Jun 2015 11:28:42 +0200 (CEST) Received: by wgck11 with SMTP id k11so4292946wgc.0 for ; Tue, 30 Jun 2015 02:28:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k2zfUiVzNUprjLuAzG8NzXO2hao2HidURx1NSPXfCew=; b=f5gRu+Ie85JW1IKkGs4A4Zdz9k8Spi2nVFyjPel/O6WwS9QzIqyKfNFUvkRUHRO9Lb QIBUYXwi0SqVPQXP+4/AECw+uuizY/SjF9V3MmOs/jB8Z59/wOkQa5d64W9dHne4dB/S O61xYwk9Ir8F/jyVF9Km02rE6WJAJb1oUyjRJbEXV+F97ek0/4prPU+7Fv2xLn65uaKy rmxA0PR9cJaL17FHPi9L1uMfAUaWWkxyJ2/X3Qk9/pl8wGdDPEDGuK19ByUMlc/2pCWm 3E4wI/7N2XJUWFgsoE8uk3vO/3xI2Tu11Go9ec1idxkE45SO6E+it92KbOjNnZ+4QU9d OTPQ== X-Gm-Message-State: ALoCoQmqNNSfUrRWZu5MIuWxDC8/pt/fT0/IwldlZne9CE5xdJSi+3W8yf26QEILmdYUraVPDyi1 X-Received: by 10.180.85.8 with SMTP id d8mr30976842wiz.11.1435656522164; Tue, 30 Jun 2015 02:28:42 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by mx.google.com with ESMTPSA id 12sm67930126wjw.17.2015.06.30.02.28.40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Jun 2015 02:28:41 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Tue, 30 Jun 2015 11:27:54 +0200 Message-Id: <1435656489-27986-9-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1435656489-27986-1-git-send-email-adrien.mazarguil@6wind.com> References: <1433546120-2254-1-git-send-email-adrien.mazarguil@6wind.com> <1435656489-27986-1-git-send-email-adrien.mazarguil@6wind.com> Cc: Alex Rosenbaum Subject: [dpdk-dev] [PATCH v2 08/23] mlx4: use MOFED 3.0 extended flow steering API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2015 09:28:43 -0000 From: Alex Rosenbaum This commit drops "exp" from related function and type names to stop using the experimental API. Signed-off-by: Olga Shern Signed-off-by: Alex Rosenbaum Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 54 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 02dd894..028e455 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -195,9 +195,9 @@ struct rxq { * may contain several specifications, one per configured VLAN ID. */ BITFIELD_DECLARE(mac_configured, uint32_t, MLX4_MAX_MAC_ADDRESSES); - struct ibv_exp_flow *mac_flow[MLX4_MAX_MAC_ADDRESSES]; - struct ibv_exp_flow *promisc_flow; /* Promiscuous flow. */ - struct ibv_exp_flow *allmulti_flow; /* Multicast flow. */ + struct ibv_flow *mac_flow[MLX4_MAX_MAC_ADDRESSES]; + struct ibv_flow *promisc_flow; /* Promiscuous flow. */ + struct ibv_flow *allmulti_flow; /* Multicast flow. */ unsigned int port_id; /* Port ID for incoming packets. */ unsigned int elts_n; /* (*elts)[] length. */ unsigned int elts_head; /* Current index in (*elts)[]. */ @@ -1872,7 +1872,7 @@ rxq_mac_addr_del(struct rxq *rxq, unsigned int mac_index) (*mac)[0], (*mac)[1], (*mac)[2], (*mac)[3], (*mac)[4], (*mac)[5], mac_index); assert(rxq->mac_flow[mac_index] != NULL); - claim_zero(ibv_exp_destroy_flow(rxq->mac_flow[mac_index])); + claim_zero(ibv_destroy_flow(rxq->mac_flow[mac_index])); rxq->mac_flow[mac_index] = NULL; BITFIELD_RESET(rxq->mac_configured, mac_index); } @@ -1917,7 +1917,7 @@ rxq_mac_addr_add(struct rxq *rxq, unsigned int mac_index) unsigned int vlans = 0; unsigned int specs = 0; unsigned int i, j; - struct ibv_exp_flow *flow; + struct ibv_flow *flow; assert(mac_index < elemof(priv->mac)); if (BITFIELD_ISSET(rxq->mac_configured, mac_index)) @@ -1929,28 +1929,28 @@ rxq_mac_addr_add(struct rxq *rxq, unsigned int mac_index) specs = (vlans ? vlans : 1); /* Allocate flow specification on the stack. */ - struct ibv_exp_flow_attr data + struct ibv_flow_attr data [1 + - (sizeof(struct ibv_exp_flow_spec_eth[specs]) / - sizeof(struct ibv_exp_flow_attr)) + - !!(sizeof(struct ibv_exp_flow_spec_eth[specs]) % - sizeof(struct ibv_exp_flow_attr))]; - struct ibv_exp_flow_attr *attr = (void *)&data[0]; - struct ibv_exp_flow_spec_eth *spec = (void *)&data[1]; + (sizeof(struct ibv_flow_spec_eth[specs]) / + sizeof(struct ibv_flow_attr)) + + !!(sizeof(struct ibv_flow_spec_eth[specs]) % + sizeof(struct ibv_flow_attr))]; + struct ibv_flow_attr *attr = (void *)&data[0]; + struct ibv_flow_spec_eth *spec = (void *)&data[1]; /* * No padding must be inserted by the compiler between attr and spec. * This layout is expected by libibverbs. */ assert(((uint8_t *)attr + sizeof(*attr)) == (uint8_t *)spec); - *attr = (struct ibv_exp_flow_attr){ - .type = IBV_EXP_FLOW_ATTR_NORMAL, + *attr = (struct ibv_flow_attr){ + .type = IBV_FLOW_ATTR_NORMAL, .num_of_specs = specs, .port = priv->port, .flags = 0 }; - *spec = (struct ibv_exp_flow_spec_eth){ - .type = IBV_EXP_FLOW_SPEC_ETH, + *spec = (struct ibv_flow_spec_eth){ + .type = IBV_FLOW_SPEC_ETH, .size = sizeof(*spec), .val = { .dst_mac = { @@ -1981,7 +1981,7 @@ rxq_mac_addr_add(struct rxq *rxq, unsigned int mac_index) vlans); /* Create related flow. */ errno = 0; - flow = ibv_exp_create_flow(rxq->qp, attr); + flow = ibv_create_flow(rxq->qp, attr); if (flow == NULL) { int err = errno; @@ -2168,9 +2168,9 @@ end: static int rxq_allmulticast_enable(struct rxq *rxq) { - struct ibv_exp_flow *flow; - struct ibv_exp_flow_attr attr = { - .type = IBV_EXP_FLOW_ATTR_MC_DEFAULT, + struct ibv_flow *flow; + struct ibv_flow_attr attr = { + .type = IBV_FLOW_ATTR_MC_DEFAULT, .num_of_specs = 0, .port = rxq->priv->port, .flags = 0 @@ -2180,7 +2180,7 @@ rxq_allmulticast_enable(struct rxq *rxq) if (rxq->allmulti_flow != NULL) return EBUSY; errno = 0; - flow = ibv_exp_create_flow(rxq->qp, &attr); + flow = ibv_create_flow(rxq->qp, &attr); if (flow == NULL) { /* It's not clear whether errno is always set in this case. */ ERROR("%p: flow configuration failed, errno=%d: %s", @@ -2207,7 +2207,7 @@ rxq_allmulticast_disable(struct rxq *rxq) DEBUG("%p: disabling allmulticast mode", (void *)rxq); if (rxq->allmulti_flow == NULL) return; - claim_zero(ibv_exp_destroy_flow(rxq->allmulti_flow)); + claim_zero(ibv_destroy_flow(rxq->allmulti_flow)); rxq->allmulti_flow = NULL; DEBUG("%p: allmulticast mode disabled", (void *)rxq); } @@ -2224,9 +2224,9 @@ rxq_allmulticast_disable(struct rxq *rxq) static int rxq_promiscuous_enable(struct rxq *rxq) { - struct ibv_exp_flow *flow; - struct ibv_exp_flow_attr attr = { - .type = IBV_EXP_FLOW_ATTR_ALL_DEFAULT, + struct ibv_flow *flow; + struct ibv_flow_attr attr = { + .type = IBV_FLOW_ATTR_ALL_DEFAULT, .num_of_specs = 0, .port = rxq->priv->port, .flags = 0 @@ -2238,7 +2238,7 @@ rxq_promiscuous_enable(struct rxq *rxq) if (rxq->promisc_flow != NULL) return EBUSY; errno = 0; - flow = ibv_exp_create_flow(rxq->qp, &attr); + flow = ibv_create_flow(rxq->qp, &attr); if (flow == NULL) { /* It's not clear whether errno is always set in this case. */ ERROR("%p: flow configuration failed, errno=%d: %s", @@ -2267,7 +2267,7 @@ rxq_promiscuous_disable(struct rxq *rxq) DEBUG("%p: disabling promiscuous mode", (void *)rxq); if (rxq->promisc_flow == NULL) return; - claim_zero(ibv_exp_destroy_flow(rxq->promisc_flow)); + claim_zero(ibv_destroy_flow(rxq->promisc_flow)); rxq->promisc_flow = NULL; DEBUG("%p: promiscuous mode disabled", (void *)rxq); } -- 2.1.0