add return code to sfe_ipv4_create_rule
sfe_ipv4_create_rule returns nothing (void), but the function has a
chance for failure. if the function fails, this could cause the
fast-classifier to become out-of-sync with respect to the offloaded
state of the connection.
this causes two issues:
1. this is partially handled by repeatedly calling
_create_rule for the connection, which seems inefficient.
2. offloaded state is propagated back to userspace
Change-Id: I6184344a8278379e064b128d6d4086e2c2fa169a
Signed-off-by: Nicolas Costa <ncosta@codeaurora.org>
diff --git a/shortcut-fe/sfe_ipv4.h b/shortcut-fe/sfe_ipv4.h
index dc50efa..d7d87fc 100644
--- a/shortcut-fe/sfe_ipv4.h
+++ b/shortcut-fe/sfe_ipv4.h
@@ -89,7 +89,7 @@
extern int sfe_ipv4_recv(struct net_device *dev, struct sk_buff *skb);
extern int sfe_pppoe_recv(struct net_device *dev, struct sk_buff *skb);
-extern void sfe_ipv4_create_rule(struct sfe_ipv4_create *sic);
+extern int sfe_ipv4_create_rule(struct sfe_ipv4_create *sic);
extern void sfe_ipv4_destroy_rule(struct sfe_ipv4_destroy *sid);
extern void sfe_ipv4_destroy_all_rules_for_dev(struct net_device *dev);
extern void sfe_ipv4_register_sync_rule_callback(sfe_ipv4_sync_rule_callback_t callback);