From: Jiri Pirko <jiri@resnulli.us>
To: Vadym Kochan <vadym.kochan@plvision.eu>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Oleksandr Mazur <oleksandr.mazur@plvision.eu>,
Serhiy Boiko <serhiy.boiko@plvision.eu>,
Serhiy Pshyk <serhiy.pshyk@plvision.eu>,
Volodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>,
Taras Chornyi <taras.chornyi@plvision.eu>,
Andrii Savka <andrii.savka@plvision.eu>,
Jiri Pirko <jiri@mellanox.com>,
Ido Schimmel <idosch@mellanox.com>, Andrew Lunn <andrew@lunn.ch>,
Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Subject: Re: [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices
Date: Tue, 12 May 2020 17:02:10 +0200 [thread overview]
Message-ID: <20200512150210.GO2245@nanopsycho> (raw)
In-Reply-To: <20200512145037.GB31516@plvision.eu>
Tue, May 12, 2020 at 04:50:37PM CEST, vadym.kochan@plvision.eu wrote:
>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 ?)
Ah, I see. I think it is okay as it is.
Thanks!
>
>>
>>
>> >+{
>> >+ 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
>> >
next prev parent reply other threads:[~2020-05-12 15:02 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 23:20 [RFC next-next v2 0/5] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x) Vadym Kochan
2020-04-30 23:20 ` [RFC next-next v2 1/5] net: marvell: prestera: Add driver for Prestera family ASIC devices Vadym Kochan
2020-05-11 10:32 ` Jiri Pirko
2020-05-11 11:11 ` Vadym Kochan
2020-05-11 11:29 ` Jiri Pirko
2020-05-11 12:42 ` Andrew Lunn
2020-05-11 13:02 ` Vadym Kochan
2020-05-11 13:53 ` Andrew Lunn
2020-05-11 14:11 ` Vadym Kochan
2020-05-11 15:32 ` Jiri Pirko
2020-05-11 16:43 ` Andrew Lunn
2020-05-11 17:24 ` Jiri Pirko
2020-05-12 14:53 ` Vadym Kochan
2020-05-12 15:03 ` Jiri Pirko
2020-05-12 15:07 ` Vadym Kochan
2020-05-12 15:21 ` Jiri Pirko
2020-05-11 12:57 ` Jiri Pirko
2020-05-11 19:24 ` Vadym Kochan
2020-05-12 5:55 ` Jiri Pirko
2020-05-12 7:15 ` Vadym Kochan
2020-05-12 11:13 ` Jiri Pirko
2020-05-12 14:50 ` Vadym Kochan
2020-05-12 15:02 ` Jiri Pirko [this message]
2020-04-30 23:20 ` [RFC next-next v2 2/5] net: marvell: prestera: Add PCI interface support Vadym Kochan
2020-05-01 0:00 ` Andrew Lunn
2020-05-01 6:22 ` Vadym Kochan
2020-05-01 13:25 ` Andrew Lunn
2020-05-11 11:23 ` Jiri Pirko
2020-05-26 16:26 ` Vadym Kochan
2020-05-27 5:53 ` Jiri Pirko
2020-05-27 8:55 ` Vadym Kochan
2020-05-27 12:01 ` Mickey Rachamim
2020-05-28 10:29 ` Jiri Pirko
2020-04-30 23:20 ` [RFC next-next v2 3/5] net: marvell: prestera: Add ethtool " Vadym Kochan
2020-05-11 17:31 ` Jiri Pirko
2020-04-30 23:20 ` [RFC next-next v2 4/5] net: marvell: prestera: Add Switchdev driver implementation Vadym Kochan
2020-04-30 23:20 ` [RFC next-next v2 5/5] dt-bindings: marvell,prestera: Add address mapping for Prestera Switchdev PCIe driver Vadym Kochan
2020-05-01 0:01 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200512150210.GO2245@nanopsycho \
--to=jiri@resnulli.us \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=andrew@lunn.ch \
--cc=andrii.savka@plvision.eu \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=oleksandr.mazur@plvision.eu \
--cc=serhiy.boiko@plvision.eu \
--cc=serhiy.pshyk@plvision.eu \
--cc=taras.chornyi@plvision.eu \
--cc=vadym.kochan@plvision.eu \
--cc=volodymyr.mytnyk@plvision.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.