Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754970AbeAMMm1 (ORCPT + 1 other); Sat, 13 Jan 2018 07:42:27 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38169 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754872AbeAMMm0 (ORCPT ); Sat, 13 Jan 2018 07:42:26 -0500 X-Google-Smtp-Source: ACJfBosjzx7WK9se4Rq9xwHhoI5qRv8WtNTlVBN8HFjAiaDZvVtnbIYKls3b2NchIQBLVYl24s8E3Q== From: Karim Eshapa To: ast@kernel.org Cc: daniel@iogearbox.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: bpf: Change structure passing and assignment Date: Sat, 13 Jan 2018 14:42:19 +0200 Message-Id: <1515847339-4712-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: I noticed that most of functions here have structure arguements and return structure, all these structures passed and returned are delt in passing and assignment like memcpy a structure.In addition it takes size in stack while passing. so why not we use pointers to structure as argumentsor there is actual need to do such things and you intentionaly want to deal with copies of strucuteres. ex: struct tnum tnum_add(struct tnum a, struct tnum b) { } Thanks, Karim