vxlan: remove redundant enable/disable API from vxlan

The enable/disable API is redundant and increases the library
in binary size and documentation. There should be one sensible way
to do something, not several.

Yes, there is prior act to that like rtnl_link_vxlan_disable_proxy().
That doesn't mean it should be repeated.
This commit is contained in:
Thomas Haller 2016-11-05 16:31:24 +01:00
parent 23b17dd26e
commit 66b1dd64d0
3 changed files with 0 additions and 234 deletions

View File

@ -84,51 +84,33 @@ extern int rtnl_link_vxlan_get_port(struct rtnl_link *, uint32_t *);
extern int rtnl_link_vxlan_set_udp_csum(struct rtnl_link *, uint8_t);
extern int rtnl_link_vxlan_get_udp_csum(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_udp_csum(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_udp_csum(struct rtnl_link *);
extern int rtnl_link_vxlan_set_udp_zero_csum6_tx(struct rtnl_link *, uint8_t);
extern int rtnl_link_vxlan_get_udp_zero_csum6_tx(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_udp_zero_csum6_tx(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_udp_zero_csum6_tx(struct rtnl_link *);
extern int rtnl_link_vxlan_set_udp_zero_csum6_rx(struct rtnl_link *, uint8_t);
extern int rtnl_link_vxlan_get_udp_zero_csum6_rx(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_udp_zero_csum6_rx(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_udp_zero_csum6_rx(struct rtnl_link *);
extern int rtnl_link_vxlan_set_remcsum_tx(struct rtnl_link *, uint8_t);
extern int rtnl_link_vxlan_get_remcsum_tx(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_remcsum_tx(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_remcsum_tx(struct rtnl_link *);
extern int rtnl_link_vxlan_set_remcsum_rx(struct rtnl_link *, uint8_t);
extern int rtnl_link_vxlan_get_remcsum_rx(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_remcsum_rx(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_remcsum_rx(struct rtnl_link *);
extern int rtnl_link_vxlan_set_gbp(struct rtnl_link *, int);
extern int rtnl_link_vxlan_get_gbp(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_gbp(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_gbp(struct rtnl_link *);
extern int rtnl_link_vxlan_set_remcsum_nopartial(struct rtnl_link *, int);
extern int rtnl_link_vxlan_get_remcsum_nopartial(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_remcsum_nopartial(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_remcsum_nopartial(struct rtnl_link *);
extern int rtnl_link_vxlan_set_collect_metadata(struct rtnl_link *, uint8_t);
extern int rtnl_link_vxlan_get_collect_metadata(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_collect_metadata(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_collect_metadata(struct rtnl_link *);
extern int rtnl_link_vxlan_set_label(struct rtnl_link *, uint32_t);
extern int rtnl_link_vxlan_get_label(struct rtnl_link *, uint32_t *);
extern int rtnl_link_vxlan_set_gpe(struct rtnl_link *, int);
extern int rtnl_link_vxlan_get_gpe(struct rtnl_link *);
extern int rtnl_link_vxlan_enable_gpe(struct rtnl_link *);
extern int rtnl_link_vxlan_disable_gpe(struct rtnl_link *);
#ifdef __cplusplus
}

View File

@ -1515,28 +1515,6 @@ int rtnl_link_vxlan_get_udp_csum(struct rtnl_link *link)
return vxi->vxi_udp_csum;
}
/**
* Enable UDP checksums
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_udp_csum(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_udp_csum(link, 1);
}
/**
* Disable UDP checksums
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_udp_csum(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_udp_csum(link, 0);
}
/**
* Set skip UDP checksum transmitted over IPv6 status to use for VXLAN
* @arg link Link object
@ -1574,28 +1552,6 @@ int rtnl_link_vxlan_get_udp_zero_csum6_tx(struct rtnl_link *link)
return vxi->vxi_udp_zero_csum6_tx;
}
/**
* Enable skip UDP checksum transmitted over IPv6
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_udp_zero_csum6_tx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_udp_zero_csum6_tx(link, 1);
}
/**
* Disable skip UDP checksum transmitted over IPv6
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_udp_zero_csum6_tx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_udp_zero_csum6_tx(link, 0);
}
/**
* Set skip UDP checksum received over IPv6 status to use for VXLAN
* @arg link Link object
@ -1633,28 +1589,6 @@ int rtnl_link_vxlan_get_udp_zero_csum6_rx(struct rtnl_link *link)
return vxi->vxi_udp_zero_csum6_rx;
}
/**
* Enable skip UDP checksum received over IPv6
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_udp_zero_csum6_rx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_udp_zero_csum6_rx(link, 1);
}
/**
* Disable skip UDP checksum received over IPv6
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_udp_zero_csum6_rx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_udp_zero_csum6_rx(link, 0);
}
/**
* Set remote offload transmit checksum status to use for VXLAN
* @arg link Link object
@ -1692,28 +1626,6 @@ int rtnl_link_vxlan_get_remcsum_tx(struct rtnl_link *link)
return vxi->vxi_remcsum_tx;
}
/**
* Enable remote offload transmit checksums
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_remcsum_tx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_remcsum_tx(link, 1);
}
/**
* Disable remote offload transmit checksums
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_remcsum_tx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_remcsum_tx(link, 0);
}
/**
* Set remote offload receive checksum status to use for VXLAN
* @arg link Link object
@ -1751,28 +1663,6 @@ int rtnl_link_vxlan_get_remcsum_rx(struct rtnl_link *link)
return vxi->vxi_remcsum_rx;
}
/**
* Enable remote offload receive checksums
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_remcsum_rx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_remcsum_rx(link, 1);
}
/**
* Disable remote offload receive checksums
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_remcsum_rx(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_remcsum_rx(link, 0);
}
/**
* Set group-based policy extension flag to use for VXLAN
* @arg link Link object
@ -1809,28 +1699,6 @@ int rtnl_link_vxlan_get_gbp(struct rtnl_link *link)
return !!(vxi->ce_mask & VXLAN_ATTR_GBP);
}
/**
* Enable group-based policy extension
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_gbp(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_gbp(link, 1);
}
/**
* Disable group-based policy extension
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_gbp(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_gbp(link, 0);
}
/**
* Set no-partial remote offload checksum flag to use for VXLAN
* @arg link Link object
@ -1867,28 +1735,6 @@ int rtnl_link_vxlan_get_remcsum_nopartial(struct rtnl_link *link)
return !!(vxi->ce_mask & VXLAN_ATTR_REMCSUM_NOPARTIAL);
}
/**
* Enable no-partial remote offload checksum
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_remcsum_nopartial(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_remcsum_nopartial(link, 1);
}
/**
* Disable no-partial remote offload checksum
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_remcsum_nopartial(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_remcsum_nopartial(link, 0);
}
/**
* Set collect metadata status to use for VXLAN
* @arg link Link object
@ -1926,28 +1772,6 @@ int rtnl_link_vxlan_get_collect_metadata(struct rtnl_link *link)
return vxi->vxi_collect_metadata;
}
/**
* Enable collect metadata
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_collect_metadata(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_collect_metadata(link, 1);
}
/**
* Disable collect metadata
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_collect_metadata(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_collect_metadata(link, 0);
}
/**
* Set flow label to use for VXLAN
* @arg link Link object
@ -2027,28 +1851,6 @@ int rtnl_link_vxlan_get_gpe(struct rtnl_link *link)
return !!(vxi->ce_mask & VXLAN_ATTR_GPE);
}
/**
* Enable generic protocol extension
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_enable_gpe(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_gpe(link, 1);
}
/**
* Disable generic protocol extension
* @arg link Link object
*
* @return 0 on success or a negative error code
*/
int rtnl_link_vxlan_disable_gpe(struct rtnl_link *link)
{
return rtnl_link_vxlan_set_gpe(link, 0);
}
/** @} */
static void __init vxlan_init(void)

View File

@ -964,24 +964,6 @@ global:
rtnl_link_macvlan_macmode2str;
rtnl_link_macvlan_set_macmode;
rtnl_link_macvlan_str2macmode;
rtnl_link_vxlan_disable_collect_metadata;
rtnl_link_vxlan_disable_gbp;
rtnl_link_vxlan_disable_gpe;
rtnl_link_vxlan_disable_remcsum_nopartial;
rtnl_link_vxlan_disable_remcsum_rx;
rtnl_link_vxlan_disable_remcsum_tx;
rtnl_link_vxlan_disable_udp_csum;
rtnl_link_vxlan_disable_udp_zero_csum6_rx;
rtnl_link_vxlan_disable_udp_zero_csum6_tx;
rtnl_link_vxlan_enable_collect_metadata;
rtnl_link_vxlan_enable_gbp;
rtnl_link_vxlan_enable_gpe;
rtnl_link_vxlan_enable_remcsum_nopartial;
rtnl_link_vxlan_enable_remcsum_rx;
rtnl_link_vxlan_enable_remcsum_tx;
rtnl_link_vxlan_enable_udp_csum;
rtnl_link_vxlan_enable_udp_zero_csum6_rx;
rtnl_link_vxlan_enable_udp_zero_csum6_tx;
rtnl_link_vxlan_get_collect_metadata;
rtnl_link_vxlan_get_gbp;
rtnl_link_vxlan_get_gpe;