From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f169.google.com (mail-qc0-f169.google.com [209.85.216.169]) by dpdk.org (Postfix) with ESMTP id 89356C312 for ; Fri, 12 Jun 2015 07:18:36 +0200 (CEST) Received: by qcjq9 with SMTP id q9so2891171qcj.2 for ; Thu, 11 Jun 2015 22:18:36 -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=buTUKETQjVZpsGn0NwaHeQWIVs8wACCvTD6VyFsC6Es=; b=Xsc2ryD7SMl1jQHsY9hkzTu5t6peg7OHHdL4zESOoTIOHQm4I0vUSc9suHYhDEDIah AMWZIIEDvidcuitU9VbqwBFlpow/1KTLufR7WIYoGkuOcWl9u5n3Q2sPxBY2fk2Gu0Gh Wdth1wkGykO14/5pOhsDbSvUcHYpjcpxmEWU3XQs++/hK13mHibC8KiKlW1glJ8YsA+N acCRQwYiuJ0KRJAvOtWKVHxxjSaEOjuTJS7elEwHoQ8Pe4A0dYRl5H+iSCo9MKkanLsa Y3991nQDdh7rYrHeJdzLpny4/3vOauh8pkdh+QMWrFJrZr7Pn/y6K39KTRGejqypa34O 0yyg== X-Gm-Message-State: ALoCoQnQHgR2w7OOTts3khACLh0xWRZSPt0yQBru4ov9YnVteFAB38EZupE0FW/vMOETHErtLXCJ X-Received: by 10.55.22.143 with SMTP id 15mr26754641qkw.85.1434086316121; Thu, 11 Jun 2015 22:18:36 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id i197sm1253256qhc.36.2015.06.11.22.18.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jun 2015 22:18:35 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Thu, 11 Jun 2015 22:18:33 -0700 Message-Id: <1434086314-14371-3-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434086314-14371-1-git-send-email-stephen@networkplumber.org> References: <1434086314-14371-1-git-send-email-stephen@networkplumber.org> Cc: Stephen Hemminger Subject: [dpdk-dev] [PATCH 2/3] kni: remove deprecated functions 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: Fri, 12 Jun 2015 05:18:37 -0000 From: Stephen Hemminger These functions were tagged as deprecated in 2.0 so they can be removed in 2.1 Signed-off-by: Stephen Hemminger --- app/test/Makefile | 6 ------ app/test/test_kni.c | 36 -------------------------------- lib/librte_kni/rte_kni.c | 50 -------------------------------------------- lib/librte_kni/rte_kni.h | 54 ------------------------------------------------ 4 files changed, 146 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index 3c777bf..81bd226 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -142,12 +142,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -# Disable warnings of deprecated-declarations in test_kni.c -ifeq ($(CC), icc) -CFLAGS_test_kni.o += -wd1478 -else -CFLAGS_test_kni.o += -Wno-deprecated-declarations -endif CFLAGS += -D_GNU_SOURCE # Disable VTA for memcpy test diff --git a/app/test/test_kni.c b/app/test/test_kni.c index 506b543..9dad988 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -398,17 +398,6 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp) printf("fail to create kni\n"); return -1; } - if (rte_kni_get_port_id(kni) != port_id) { - printf("fail to get port id\n"); - ret = -1; - goto fail_kni; - } - - if (rte_kni_info_get(RTE_MAX_ETHPORTS)) { - printf("Unexpectedly get a KNI successfully\n"); - ret = -1; - goto fail_kni; - } test_kni_ctx = kni; test_kni_processing_flag = 0; @@ -591,14 +580,6 @@ test_kni(void) goto fail; } - /* test of getting port id according to NULL kni context */ - if (rte_kni_get_port_id(NULL) < RTE_MAX_ETHPORTS) { - ret = -1; - printf("unexpectedly get port id successfully by NULL kni " - "pointer\n"); - goto fail; - } - /* test of releasing NULL kni context */ ret = rte_kni_release(NULL); if (ret == 0) { @@ -645,23 +626,6 @@ test_kni(void) goto fail; } - /* test the interface of creating a KNI, for backward compatibility */ - memset(&ops, 0, sizeof(ops)); - ops = kni_ops; - kni = rte_kni_create(port_id, MAX_PACKET_SZ, mp, &ops); - if (!kni) { - ret = -1; - printf("Fail to create a KNI device for port %d\n", port_id); - goto fail; - } - - ret = rte_kni_release(kni); - if (ret < 0) { - printf("Fail to release a KNI device\n"); - goto fail; - } - - ret = 0; fail: rte_eth_dev_stop(port_id); diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 4e70fa0..f9bd9c1 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -305,31 +305,6 @@ kni_fail: max_kni_ifaces); } -/* It is deprecated and just for backward compatibility */ -struct rte_kni * -rte_kni_create(uint8_t port_id, - unsigned mbuf_size, - struct rte_mempool *pktmbuf_pool, - struct rte_kni_ops *ops) -{ - struct rte_kni_conf conf; - struct rte_eth_dev_info info; - - memset(&info, 0, sizeof(info)); - memset(&conf, 0, sizeof(conf)); - rte_eth_dev_info_get(port_id, &info); - - snprintf(conf.name, sizeof(conf.name), "vEth%u", port_id); - conf.addr = info.pci_dev->addr; - conf.id = info.pci_dev->id; - conf.group_id = (uint16_t)port_id; - conf.mbuf_size = mbuf_size; - - /* Save the port id for request handling */ - ops->port_id = port_id; - - return rte_kni_alloc(pktmbuf_pool, &conf, ops); -} struct rte_kni * rte_kni_alloc(struct rte_mempool *pktmbuf_pool, @@ -644,16 +619,6 @@ kni_allocate_mbufs(struct rte_kni *kni) } } -/* It is deprecated and just for backward compatibility */ -uint8_t -rte_kni_get_port_id(struct rte_kni *kni) -{ - if (!kni) - return ~0x0; - - return kni->ops.port_id; -} - struct rte_kni * rte_kni_get(const char *name) { @@ -674,21 +639,6 @@ rte_kni_get(const char *name) return NULL; } -/* - * It is deprecated and just for backward compatibility. - */ -struct rte_kni * -rte_kni_info_get(uint8_t port_id) -{ - char name[RTE_MEMZONE_NAMESIZE]; - - if (port_id >= RTE_MAX_ETHPORTS) - return NULL; - - snprintf(name, RTE_MEMZONE_NAMESIZE, "vEth%u", port_id); - - return rte_kni_get(name); -} static enum kni_ops_status kni_check_request_register(struct rte_kni_ops *ops) diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index 603e2cd..f65ce24 100644 --- a/lib/librte_kni/rte_kni.h +++ b/lib/librte_kni/rte_kni.h @@ -129,30 +129,6 @@ extern struct rte_kni *rte_kni_alloc(struct rte_mempool *pktmbuf_pool, struct rte_kni_ops *ops); /** - * It create a KNI device for specific port. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param port_id - * Port ID. - * @param mbuf_size - * mbuf size. - * @param pktmbuf_pool - * The mempool for allocting mbufs for packets. - * @param ops - * The pointer to the callbacks for the KNI kernel requests. - * - * @return - * - The pointer to the context of a KNI interface. - * - NULL indicate error. - */ -extern struct rte_kni *rte_kni_create(uint8_t port_id, - unsigned mbuf_size, - struct rte_mempool *pktmbuf_pool, - struct rte_kni_ops *ops) \ - __attribute__ ((deprecated)); - -/** * Release KNI interface according to the context. It will also release the * paired KNI interface in kernel space. All processing on the specific KNI * context need to be stopped before calling this interface. @@ -221,21 +197,6 @@ extern unsigned rte_kni_tx_burst(struct rte_kni *kni, struct rte_mbuf **mbufs, unsigned num); /** - * Get the port id from KNI interface. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param kni - * The KNI interface context. - * - * @return - * On success: The port id. - * On failure: ~0x0 - */ -extern uint8_t rte_kni_get_port_id(struct rte_kni *kni) \ - __attribute__ ((deprecated)); - -/** * Get the KNI context of its name. * * @param name @@ -248,21 +209,6 @@ extern uint8_t rte_kni_get_port_id(struct rte_kni *kni) \ extern struct rte_kni *rte_kni_get(const char *name); /** - * Get the KNI context of the specific port. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param port_id - * the port id. - * - * @return - * On success: Pointer to KNI interface. - * On failure: NULL - */ -extern struct rte_kni *rte_kni_info_get(uint8_t port_id) \ - __attribute__ ((deprecated)); - -/** * Register KNI request handling for a specified port,and it can * be called by master process or slave process. * -- 2.1.4