From: sfeldma@gmail.com
To: netdev@vger.kernel.org, davem@davemloft.net, jiri@resnulli.us,
roopa@cumulusnetworks.com, alexander.h.duyck@redhat.com
Subject: [PATCH net-next v4 2/8] netdevice: add IPv4 fib add/del ops
Date: Thu, 5 Mar 2015 21:21:14 -0800 [thread overview]
Message-ID: <1425619280-27492-3-git-send-email-sfeldma@gmail.com> (raw)
In-Reply-To: <1425619280-27492-1-git-send-email-sfeldma@gmail.com>
From: Scott Feldman <sfeldma@gmail.com>
Add two new ndo ops for IPv4 fib offload support, add and del. Add uses
modifiy semantics if fib entry already offloaded. Drivers implementing the new
ndo ops will return err<0 if programming device fails, for example if device's
tables are full.
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
include/linux/netdevice.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 625c8d7..4541378 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -768,6 +768,8 @@ struct netdev_phys_item_id {
typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
struct sk_buff *skb);
+struct fib_info;
+
/*
* This structure defines the management hooks for network devices.
* The following hooks can be defined; unless noted otherwise, they are
@@ -1031,6 +1033,14 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
* int (*ndo_switch_port_stp_update)(struct net_device *dev, u8 state);
* Called to notify switch device port of bridge port STP
* state change.
+ * int (*ndo_sw_parent_fib_ipv4_add)(struct net_device *dev, __be32 dst,
+ * int dst_len, struct fib_info *fi,
+ * u8 tos, u8 type, u32 tb_id);
+ * Called to add/modify IPv4 route to switch device.
+ * int (*ndo_sw_parent_fib_ipv4_del)(struct net_device *dev, __be32 dst,
+ * int dst_len, struct fib_info *fi,
+ * u8 tos, u8 type, u32 tb_id);
+ * Called to delete IPv4 route from switch device.
*/
struct net_device_ops {
int (*ndo_init)(struct net_device *dev);
@@ -1192,6 +1202,18 @@ struct net_device_ops {
struct netdev_phys_item_id *psid);
int (*ndo_switch_port_stp_update)(struct net_device *dev,
u8 state);
+ int (*ndo_switch_fib_ipv4_add)(struct net_device *dev,
+ __be32 dst,
+ int dst_len,
+ struct fib_info *fi,
+ u8 tos, u8 type,
+ u32 tb_id);
+ int (*ndo_switch_fib_ipv4_del)(struct net_device *dev,
+ __be32 dst,
+ int dst_len,
+ struct fib_info *fi,
+ u8 tos, u8 type,
+ u32 tb_id);
#endif
};
--
1.7.10.4
next prev parent reply other threads:[~2015-03-06 5:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 5:21 [PATCH net-next v4 0/8] switchdev: add IPv4 routing offload sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 1/8] rtnetlink: add RTNH_F_EXTERNAL flag for fib offload sfeldma
2015-03-06 5:21 ` sfeldma [this message]
2015-03-06 14:55 ` [PATCH net-next v4 2/8] netdevice: add IPv4 fib add/del ops Jamal Hadi Salim
2015-03-06 19:59 ` Scott Feldman
2015-03-08 14:31 ` roopa
2015-03-08 22:16 ` Scott Feldman
2015-03-09 6:22 ` roopa
2015-03-09 8:38 ` Scott Feldman
2015-03-09 13:47 ` Jamal Hadi Salim
2015-03-09 18:07 ` Scott Feldman
2015-03-06 5:21 ` [PATCH net-next v4 3/8] switchdev: add IPv4 fib ndo ops wrappers sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 4/8] switchdev: don't support custom ip rules, for now sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 5/8] switchdev: implement IPv4 fib ndo wrappers sfeldma
2015-03-06 7:24 ` Jiri Pirko
2015-03-06 9:38 ` Scott Feldman
2015-03-06 11:53 ` Jiri Pirko
2015-03-06 5:21 ` [PATCH net-next v4 6/8] ipv4: add net bool fib_offload_disabled sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 7/8] fib: hook IPv4 fib for hardware offload sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 8/8] rocker: implement IPv4 fib offloading sfeldma
2015-03-06 5:27 ` [PATCH net-next v4 0/8] switchdev: add IPv4 routing offload David Miller
2015-03-06 15:43 ` Alexander Duyck
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=1425619280-27492-3-git-send-email-sfeldma@gmail.com \
--to=sfeldma@gmail.com \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).