* [patch net-next] i40e: remove dead fdb code
@ 2014-11-20 13:10 Jiri Pirko
2014-11-20 17:39 ` Jesse Brandeburg
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2014-11-20 13:10 UTC (permalink / raw)
To: netdev
Cc: davem, jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
carolyn.wyborny, donald.c.skidmore, gregory.v.rose, matthew.vick,
john.ronciak, mitch.a.williams, linux.nics, e1000-devel
This code is not used now and also it contains some weird ifdefs. So
remove it for now. It can be added when needed.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 98 -----------------------------
1 file changed, 98 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index c998d82..3368bf8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7521,97 +7521,6 @@ static int i40e_get_phys_port_id(struct net_device *netdev,
return 0;
}
-#ifdef HAVE_FDB_OPS
-#ifdef USE_CONST_DEV_UC_CHAR
-static int i40e_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
- struct net_device *dev,
- const unsigned char *addr,
- u16 flags)
-#else
-static int i40e_ndo_fdb_add(struct ndmsg *ndm,
- struct net_device *dev,
- unsigned char *addr,
- u16 flags)
-#endif
-{
- struct i40e_netdev_priv *np = netdev_priv(dev);
- struct i40e_pf *pf = np->vsi->back;
- int err = 0;
-
- if (!(pf->flags & I40E_FLAG_SRIOV_ENABLED))
- return -EOPNOTSUPP;
-
- /* Hardware does not support aging addresses so if a
- * ndm_state is given only allow permanent addresses
- */
- if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
- netdev_info(dev, "FDB only supports static addresses\n");
- return -EINVAL;
- }
-
- if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
- err = dev_uc_add_excl(dev, addr);
- else if (is_multicast_ether_addr(addr))
- err = dev_mc_add_excl(dev, addr);
- else
- err = -EINVAL;
-
- /* Only return duplicate errors if NLM_F_EXCL is set */
- if (err == -EEXIST && !(flags & NLM_F_EXCL))
- err = 0;
-
- return err;
-}
-
-#ifndef USE_DEFAULT_FDB_DEL_DUMP
-#ifdef USE_CONST_DEV_UC_CHAR
-static int i40e_ndo_fdb_del(struct ndmsg *ndm,
- struct net_device *dev,
- const unsigned char *addr)
-#else
-static int i40e_ndo_fdb_del(struct ndmsg *ndm,
- struct net_device *dev,
- unsigned char *addr)
-#endif
-{
- struct i40e_netdev_priv *np = netdev_priv(dev);
- struct i40e_pf *pf = np->vsi->back;
- int err = -EOPNOTSUPP;
-
- if (ndm->ndm_state & NUD_PERMANENT) {
- netdev_info(dev, "FDB only supports static addresses\n");
- return -EINVAL;
- }
-
- if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
- if (is_unicast_ether_addr(addr))
- err = dev_uc_del(dev, addr);
- else if (is_multicast_ether_addr(addr))
- err = dev_mc_del(dev, addr);
- else
- err = -EINVAL;
- }
-
- return err;
-}
-
-static int i40e_ndo_fdb_dump(struct sk_buff *skb,
- struct netlink_callback *cb,
- struct net_device *dev,
- struct net_device *filter_dev,
- int idx)
-{
- struct i40e_netdev_priv *np = netdev_priv(dev);
- struct i40e_pf *pf = np->vsi->back;
-
- if (pf->flags & I40E_FLAG_SRIOV_ENABLED)
- idx = ndo_dflt_fdb_dump(skb, cb, dev, filter_dev, idx);
-
- return idx;
-}
-
-#endif /* USE_DEFAULT_FDB_DEL_DUMP */
-#endif /* HAVE_FDB_OPS */
static const struct net_device_ops i40e_netdev_ops = {
.ndo_open = i40e_open,
.ndo_stop = i40e_close,
@@ -7645,13 +7554,6 @@ static const struct net_device_ops i40e_netdev_ops = {
.ndo_del_vxlan_port = i40e_del_vxlan_port,
#endif
.ndo_get_phys_port_id = i40e_get_phys_port_id,
-#ifdef HAVE_FDB_OPS
- .ndo_fdb_add = i40e_ndo_fdb_add,
-#ifndef USE_DEFAULT_FDB_DEL_DUMP
- .ndo_fdb_del = i40e_ndo_fdb_del,
- .ndo_fdb_dump = i40e_ndo_fdb_dump,
-#endif
-#endif
};
/**
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch net-next] i40e: remove dead fdb code
2014-11-20 13:10 [patch net-next] i40e: remove dead fdb code Jiri Pirko
@ 2014-11-20 17:39 ` Jesse Brandeburg
2014-11-21 7:44 ` Jiri Pirko
0 siblings, 1 reply; 3+ messages in thread
From: Jesse Brandeburg @ 2014-11-20 17:39 UTC (permalink / raw)
To: Jiri Pirko
Cc: linux.nics, e1000-devel, netdev, bruce.w.allan, john.ronciak,
davem
On Thu, 20 Nov 2014 14:10:29 +0100
Jiri Pirko <jiri@resnulli.us> wrote:
> This code is not used now and also it contains some weird ifdefs. So
> remove it for now. It can be added when needed.
>
First, thanks for looking at our code.
but, NAK, the code just needs to have the #ifdefs removed.
In addition the fdb_del and fdb_dump functions are un-necessary and
were submitted by mistake.
I will draft up a patch today and send it (and Jeff can take it through
Jeff Kirsher's i40e tree, if thats okay with DaveM)
Thanks,
Jesse
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch net-next] i40e: remove dead fdb code
2014-11-20 17:39 ` Jesse Brandeburg
@ 2014-11-21 7:44 ` Jiri Pirko
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2014-11-21 7:44 UTC (permalink / raw)
To: Jesse Brandeburg
Cc: netdev, davem, jeffrey.t.kirsher, bruce.w.allan, carolyn.wyborny,
donald.c.skidmore, gregory.v.rose, matthew.vick, john.ronciak,
mitch.a.williams, linux.nics, e1000-devel
Thu, Nov 20, 2014 at 06:39:46PM CET, jesse.brandeburg@intel.com wrote:
>On Thu, 20 Nov 2014 14:10:29 +0100
>Jiri Pirko <jiri@resnulli.us> wrote:
>
>> This code is not used now and also it contains some weird ifdefs. So
>> remove it for now. It can be added when needed.
>>
>
>First, thanks for looking at our code.
>
>but, NAK, the code just needs to have the #ifdefs removed.
>
>In addition the fdb_del and fdb_dump functions are un-necessary and
>were submitted by mistake.
So it need more than ifdefs removal. That's what I thought :)
>
>I will draft up a patch today and send it (and Jeff can take it through
>Jeff Kirsher's i40e tree, if thats okay with DaveM)
>
>Thanks,
> Jesse
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-21 7:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 13:10 [patch net-next] i40e: remove dead fdb code Jiri Pirko
2014-11-20 17:39 ` Jesse Brandeburg
2014-11-21 7:44 ` Jiri Pirko
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).