|
@@ -86,8 +86,8 @@ extern const struct nfp_app_type app_flower;
|
|
|
* @repr_clean: representor about to be unregistered
|
|
|
* @repr_open: representor netdev open callback
|
|
|
* @repr_stop: representor netdev stop callback
|
|
|
- * @change_mtu: MTU change on a netdev has been requested (veto-only, change
|
|
|
- * is not guaranteed to be committed)
|
|
|
+ * @check_mtu: MTU change request on a netdev (verify it is valid)
|
|
|
+ * @repr_change_mtu: MTU change request on repr (make and verify change)
|
|
|
* @start: start application logic
|
|
|
* @stop: stop application logic
|
|
|
* @ctrl_msg_rx: control message handler
|
|
@@ -124,8 +124,10 @@ struct nfp_app_type {
|
|
|
int (*repr_open)(struct nfp_app *app, struct nfp_repr *repr);
|
|
|
int (*repr_stop)(struct nfp_app *app, struct nfp_repr *repr);
|
|
|
|
|
|
- int (*change_mtu)(struct nfp_app *app, struct net_device *netdev,
|
|
|
- int new_mtu);
|
|
|
+ int (*check_mtu)(struct nfp_app *app, struct net_device *netdev,
|
|
|
+ int new_mtu);
|
|
|
+ int (*repr_change_mtu)(struct nfp_app *app, struct net_device *netdev,
|
|
|
+ int new_mtu);
|
|
|
|
|
|
int (*start)(struct nfp_app *app);
|
|
|
void (*stop)(struct nfp_app *app);
|
|
@@ -247,11 +249,20 @@ nfp_app_repr_clean(struct nfp_app *app, struct net_device *netdev)
|
|
|
}
|
|
|
|
|
|
static inline int
|
|
|
-nfp_app_change_mtu(struct nfp_app *app, struct net_device *netdev, int new_mtu)
|
|
|
+nfp_app_check_mtu(struct nfp_app *app, struct net_device *netdev, int new_mtu)
|
|
|
{
|
|
|
- if (!app || !app->type->change_mtu)
|
|
|
+ if (!app || !app->type->check_mtu)
|
|
|
return 0;
|
|
|
- return app->type->change_mtu(app, netdev, new_mtu);
|
|
|
+ return app->type->check_mtu(app, netdev, new_mtu);
|
|
|
+}
|
|
|
+
|
|
|
+static inline int
|
|
|
+nfp_app_repr_change_mtu(struct nfp_app *app, struct net_device *netdev,
|
|
|
+ int new_mtu)
|
|
|
+{
|
|
|
+ if (!app || !app->type->repr_change_mtu)
|
|
|
+ return 0;
|
|
|
+ return app->type->repr_change_mtu(app, netdev, new_mtu);
|
|
|
}
|
|
|
|
|
|
static inline int nfp_app_start(struct nfp_app *app, struct nfp_net *ctrl)
|