From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EFDE6A0096 for ; Wed, 10 Apr 2019 12:30:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8BCA34F94; Wed, 10 Apr 2019 12:30:11 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id 5E56A4CAB for ; Wed, 10 Apr 2019 12:30:10 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id y6so1566170ljd.12 for ; Wed, 10 Apr 2019 03:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z9/WNPktsZsGRpF0NzVKTMkf5rAIARhp8k398NE7j+U=; b=URQsKGBRVG4Oqi/2oqICYJZni0XvE7dG6v/KHGC7BDNVDRorJNxl7gR9YMiP4732cS JtxRRWC/FQLYxKpzlmHcjZ4TIuCeBAKz+Q1wrkMNIt32dlrKoQFZ7ayY/5eUrKqtGdl/ 8RMWz1Bl1wex3bGx3oop63SotWp4nZvU9P1hhsfHJjOSxjh9FDuNHtrqVV7bAKB5SRwM 50tgaqsNk3taKKo0LRFbTRClCu7jno9Idh/HNNJ8myklufZaIbbMSgJacoI1xDu+BYgX X7b4j9c6r9qyBiANJ1TbbhQiD2zPghRfbaFZCzy7VVcMDdgiPnWHwhwgi3YW1nvOfVSu VXPA== 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:mime-version:content-transfer-encoding; bh=z9/WNPktsZsGRpF0NzVKTMkf5rAIARhp8k398NE7j+U=; b=mO7sLash/3scbZPymj2iM7QtqlZUcI88/uTgtq1OArTgH+wz4m90AoxSu+kt7cPsDO WrxclpnL5RQKfdK+a7vAjBQwHRqJ0J/ABRMsk7OKn93bNs+z8nskscO8px1PtWyWftaU Ifk+QT7SaddRUC1IW8pYun+Z5W+O0vpoahA74pmsO3ljF3nmPSK4iIeAz5q5AsWePPGd ul4ha+oIkDPE1tUu0Wp9leS6cnJr2PZ1WUOfPqXqBZ2ZJsoy4q1xYUQlvjnvEafnbPYY fXFf6U70dl+AU/iNl0gnw/10k+1hhchuoDg9/zlwgI/wbFw1tRO4Q2KwkFI6iqh0rF/7 hWPQ== X-Gm-Message-State: APjAAAWaKDx1IFSV4by1ZmE5xd8xbpQ2JR/knpiY1L9XxHTs4Bn8VviH 0gseEmYtnT/TL6HXKK42ERyNWN9KWRA= X-Google-Smtp-Source: APXvYqwmUj3RwI/TWR8ujwFKPxsJazF3jA9Ou1bK6S/sYNpGeqaSlXGn6gS7pTrUTRyV/MSjVLPxUA== X-Received: by 2002:a2e:89c8:: with SMTP id c8mr22665418ljk.73.1554892209544; Wed, 10 Apr 2019 03:30:09 -0700 (PDT) Received: from localhost.localdomain ([212.48.63.198]) by smtp.gmail.com with ESMTPSA id u17sm7594267lfu.63.2019.04.10.03.30.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 03:30:07 -0700 (PDT) From: Igor Ryzhov To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Wed, 10 Apr 2019 13:30:03 +0300 Message-Id: <20190410103003.42385-1-iryzhov@nfware.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20180927000224.4011-1-iryzhov@nfware.com> References: <20180927000224.4011-1-iryzhov@nfware.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190410103003.SU8CLgTQw4BTZXbdtQ0lb1g9EoJrrrWBiuDXW_VFULk@z> It allows applications running packet sockets over KNI interfaces to get source Ethernet addresses of packets received using recvfrom function. Signed-off-by: Igor Ryzhov --- v2: Use eth_header_parse instead of own implementation. --- kernel/linux/kni/kni_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index be9e6b0b9..ad8365877 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -744,6 +744,7 @@ kni_net_change_carrier(struct net_device *dev, bool new_carrier) static const struct header_ops kni_net_header_ops = { .create = kni_net_header, + .parse = eth_header_parse, #ifdef HAVE_REBUILD_HEADER .rebuild = kni_net_rebuild_header, #endif /* < 4.1.0 */ -- 2.21.0