lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 12 May 2020 17:50:37 +0300 From: Vadym Kochan <vadym.kochan@...ision.eu> To: Jiri Pirko <jiri@...nulli.us> Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Oleksandr Mazur <oleksandr.mazur@...ision.eu>, Serhiy Boiko <serhiy.boiko@...ision.eu>, Serhiy Pshyk <serhiy.pshyk@...ision.eu>, Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>, Taras Chornyi <taras.chornyi@...ision.eu>, Andrii Savka <andrii.savka@...ision.eu>, Jiri Pirko <jiri@...lanox.com>, Ido Schimmel <idosch@...lanox.com>, Andrew Lunn <andrew@...n.ch>, Chris Packham <Chris.Packham@...iedtelesis.co.nz> Subject: Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices On Mon, May 11, 2020 at 02:57:23PM +0200, Jiri Pirko wrote: > [...] > > >+netdev_tx_t prestera_rxtx_xmit(struct prestera_port *port, struct sk_buff *skb) > > Why this has "rx" in the name?? This is just a following of a module prefix which is prestera_rxtx_, do you think it is better to avoid using of "rx" in "xmit" func ?) > > > >+{ > >+ struct prestera_dsa dsa; > >+ > >+ dsa.hw_dev_num = port->dev_id; > >+ dsa.port_num = port->hw_id; > >+ > >+ if (skb_cow_head(skb, PRESTERA_DSA_HLEN) < 0) > >+ return NET_XMIT_DROP; > >+ > >+ skb_push(skb, PRESTERA_DSA_HLEN); > >+ memmove(skb->data, skb->data + PRESTERA_DSA_HLEN, 2 * ETH_ALEN); > >+ > >+ if (prestera_dsa_build(&dsa, skb->data + 2 * ETH_ALEN) != 0) > >+ return NET_XMIT_DROP; > >+ > >+ return prestera_sdma_xmit(&port->sw->rxtx->sdma, skb); > >+} > >diff --git a/drivers/net/ethernet/marvell/prestera/prestera_rxtx.h b/drivers/net/ethernet/marvell/prestera/prestera_rxtx.h > >new file mode 100644 > >index 000000000000..bbbadfa5accf > >--- /dev/null > >+++ b/drivers/net/ethernet/marvell/prestera/prestera_rxtx.h > >@@ -0,0 +1,21 @@ > >+/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 > >+ * > >+ * Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved. > >+ * > >+ */ > >+ > >+#ifndef _PRESTERA_RXTX_H_ > >+#define _PRESTERA_RXTX_H_ > >+ > >+#include <linux/netdevice.h> > >+ > >+#include "prestera.h" > >+ > >+int prestera_rxtx_switch_init(struct prestera_switch *sw); > >+void prestera_rxtx_switch_fini(struct prestera_switch *sw); > >+ > >+int prestera_rxtx_port_init(struct prestera_port *port); > >+ > >+netdev_tx_t prestera_rxtx_xmit(struct prestera_port *port, struct sk_buff *skb); > >+ > >+#endif /* _PRESTERA_RXTX_H_ */ > >-- > >2.17.1 > >
Powered by blists - more mailing lists