From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2AC742B84 for ; Tue, 23 May 2023 17:46:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AF0940A80; Tue, 23 May 2023 17:46:38 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 8B3F440689 for ; Tue, 23 May 2023 17:46:36 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1ae852a5330so30292025ad.3 for ; Tue, 23 May 2023 08:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684856795; x=1687448795; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BNZ0HhkqNm2GvBI95TIQkkY0wlGsIjTFrAMy8XXbwXw=; b=PfIkcE/HByRGKXboiHfUPY+SdgRNyijkBxShQ1BFwHxRr9MS0E8Nkf0+u7s7SqDZke BzblYlTHM5gtXK/nRkn4z8vrTpIb99yJvLZJsEeraUSsfCLPljcyeoAtgCx+xoU1vB5Z UdFgN24DjjVLT9xK7QOXWc7/NVda8hnsxKCl/IJNkLW2c+KaEs1JYPhFh80Fbflbw/X9 6fkhxanZl5EBcExsPhykHXQn0NdivDc5VGqVbPxj9JN2sIhyXMnNOFn5gBzF6yhdZNAE kGN+sUqwwp9p4lwvLKRqrhYEwzFTGDwNcEsOK9MTmKtGB17iuBYPJCHgILnw/IEj5j3M cYNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684856795; x=1687448795; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BNZ0HhkqNm2GvBI95TIQkkY0wlGsIjTFrAMy8XXbwXw=; b=JzJchWloYtEr/3jmtgNVMvZkpGFOd5abnMlmGyipHejf1YX+YKENw4CNPO5RxL1UrC iSyeABwT883AtZlziZCdR36NlJ/1lj6KDihnDikkOO527P3T6UMA8CfPDEaxC8UoNW5E U15OfinxlD0CyNjmIpSumPK+emB4QzEDJU0xmxkDduLBhU6QSF8RjO4bPNk64MkpJQtW 1cb4ODG9nKnKaUhgOjZuo354v0L7wC88WTItujyMh6pFJ2ChitKpIadCwJpGO6jW4K9t tmhJM6f9ktgmEeURbvkE/ls8UPq+PJZo1CikfM3K5OFSV8gP+WZEgNm9opeFwJ5stjWN TlHQ== X-Gm-Message-State: AC+VfDxs3xn/K31TYb2IEfP7QGwHY4O9Qwrlj721NFcUiaYr3FDqhPdX /DqSUH/mc3lS3d0Gl4+qOW3BJQTqJ8TY1NH2RTq/LheHLSI= X-Google-Smtp-Source: ACHHUZ4QAJdKl3zNz7bIzfn2sisBM6fzWcnn/0V1qR3FWHnOneJJ3BKnNC/aRl8G7qB78jU++jApR8dX4Qvjd2P+qu8= X-Received: by 2002:a17:902:e751:b0:1af:c0b9:d956 with SMTP id p17-20020a170902e75100b001afc0b9d956mr5186991plf.40.1684856795375; Tue, 23 May 2023 08:46:35 -0700 (PDT) MIME-Version: 1.0 From: Igor de Paula Date: Tue, 23 May 2023 16:46:24 +0100 Message-ID: Subject: help with virtio_port To: users@dpdk.org Content-Type: multipart/alternative; boundary="000000000000c92e0605fc5e4a6b" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --000000000000c92e0605fc5e4a6b Content-Type: text/plain; charset="UTF-8" Hi, I am running the DPDK version: 21.08.0 and Ubuntu 20.04.3 LTS. I have an application that uses KNI to interface with the kernel. I want to replace it with virtio_user ports as KNI will be deprecated in the future. Most of the functionality I am able to replace but there is one thing I am struggling with. In KNI we can add functions that will be called in case the network stack makes a request. The following code shows this: struct rte_kni *kni; struct rte_kni_conf conf; struct rte_kni_ops ops; struct rte_eth_dev_info dev_info; int ret; /* Clear conf at first */ memset(&conf, 0, sizeof(conf)); conf.core_id = 0; memset(&ops, 0, sizeof(ops)); ops.port_id = ppo->id; ops.config_promiscusity = ippe_ppo_set_kni_promiscuous_mode; ops.change_mtu = ippe_ppo_set_kni_mtu; ops.config_network_if = ippe_ppo_set_kni_interface; ops.config_mac_address = ippe_ppo_set_kni_mac_address; kni = rte_kni_alloc(pktmbuf_pool[0], &conf, &ops); And there is a handle_request function supplied by KNI that calls these functions when need be, I haven't found any documentation on how to replace this functionality. I am no expert in how to set up and interact with the kernel stack, Some help on how to achieve this would be appreciated. --000000000000c92e0605fc5e4a6b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I am running the DPDK version: 21.08.0 and Ubuntu 2= 0.04.3 LTS.
I have an application that uses KNI to interface with the ke= rnel.
I want to replace it with virtio_user ports as KNI will be depreca= ted=C2=A0in the future.
Most of the functionality I am able to replace b= ut there is one thing I am struggling with.
In KNI we can add functions= that will be called in case the network stack makes a request. The followi= ng code shows this:
struct rte_kni *kni;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = struct rte_kni_conf conf;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct rte_kni_ops= ops;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct rte_eth_dev_info dev_info;
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 int ret;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Clea= r conf at first */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 memset(&conf, 0, size= of(conf));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 conf.core_id =3D 0;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 memset(&ops, 0, sizeof(ops));
=C2=A0 =C2=A0 =C2=A0= =C2=A0 ops.port_id =3D ppo->id;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ops.conf= ig_promiscusity =3D ippe_ppo_set_kni_promiscuous_mode;
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 ops.change_mtu =3D ippe_ppo_set_kni_mtu;
=C2=A0 =C2=A0 =C2=A0= =C2=A0 ops.config_network_if =3D ippe_ppo_set_kni_interface;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 ops.config_mac_address =3D ippe_ppo_set_kni_mac_address;<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 kni =3D rte_kni_alloc(pktmbuf_pool[0], &= conf, &ops);


And there is a handle_request function supplied= by KNI that calls these functions when need be,
I haven't found any= documentation on how to replace this functionality. I am no expert in how = to set up and interact with the kernel stack, Some help on how to achieve t= his would be appreciated.
--000000000000c92e0605fc5e4a6b--